提交 8e9d169c 编写于 作者: I isidor

editor commands: start using 'textInputFocus'

Also rename variable textFocus to editorTextFocus
上级 afc3bba5
......@@ -325,7 +325,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.LeftArrow,
linux: { primary: 0 }
}
......@@ -344,7 +344,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.RightArrow,
linux: { primary: 0 }
}
......@@ -376,7 +376,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.UpArrow,
linux: { primary: 0 }
}
......@@ -388,7 +388,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.PageUp,
linux: { primary: 0 }
}
......@@ -414,7 +414,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.DownArrow,
linux: { primary: 0 }
}
......@@ -426,7 +426,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.PageDown,
linux: { primary: 0 }
}
......@@ -502,7 +502,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyCode.LeftArrow,
mac: { primary: KeyCode.LeftArrow, secondary: [KeyMod.WinCtrl | KeyCode.KEY_B] }
}
......@@ -519,7 +519,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.Shift | KeyCode.LeftArrow
}
}));
......@@ -535,7 +535,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyCode.RightArrow,
mac: { primary: KeyCode.RightArrow, secondary: [KeyMod.WinCtrl | KeyCode.KEY_F] }
}
......@@ -552,7 +552,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.Shift | KeyCode.RightArrow
}
}));
......@@ -568,7 +568,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyCode.UpArrow,
mac: { primary: KeyCode.UpArrow, secondary: [KeyMod.WinCtrl | KeyCode.KEY_P] }
}
......@@ -585,7 +585,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.Shift | KeyCode.UpArrow,
secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.UpArrow],
mac: { primary: KeyMod.Shift | KeyCode.UpArrow },
......@@ -604,7 +604,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyCode.PageUp
}
}));
......@@ -620,7 +620,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.Shift | KeyCode.PageUp
}
}));
......@@ -636,7 +636,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyCode.DownArrow,
mac: { primary: KeyCode.DownArrow, secondary: [KeyMod.WinCtrl | KeyCode.KEY_N] }
}
......@@ -653,7 +653,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.Shift | KeyCode.DownArrow,
secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.DownArrow],
mac: { primary: KeyMod.Shift | KeyCode.DownArrow },
......@@ -672,7 +672,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyCode.PageDown
}
}));
......@@ -688,7 +688,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.Shift | KeyCode.PageDown
}
}));
......@@ -813,7 +813,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyCode.Home,
mac: { primary: KeyCode.Home, secondary: [KeyMod.CtrlCmd | KeyCode.LeftArrow] }
}
......@@ -825,7 +825,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.Shift | KeyCode.Home,
mac: { primary: KeyMod.Shift | KeyCode.Home, secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.LeftArrow] }
}
......@@ -838,7 +838,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: 0,
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_A }
}
......@@ -892,7 +892,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyCode.End,
mac: { primary: KeyCode.End, secondary: [KeyMod.CtrlCmd | KeyCode.RightArrow] }
}
......@@ -904,7 +904,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.Shift | KeyCode.End,
mac: { primary: KeyMod.Shift | KeyCode.End, secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.RightArrow] }
}
......@@ -917,7 +917,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: 0,
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_E }
}
......@@ -972,7 +972,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyCode.Home,
mac: { primary: KeyMod.CtrlCmd | KeyCode.UpArrow }
}
......@@ -984,7 +984,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Home,
mac: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.UpArrow }
}
......@@ -1016,7 +1016,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyCode.End,
mac: { primary: KeyMod.CtrlCmd | KeyCode.DownArrow }
}
......@@ -1028,7 +1028,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.End,
mac: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.DownArrow }
}
......@@ -1112,7 +1112,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyCode.UpArrow,
mac: { primary: KeyMod.WinCtrl | KeyCode.PageUp }
}
......@@ -1137,7 +1137,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyCode.PageUp,
win: { primary: KeyMod.Alt | KeyCode.PageUp },
linux: { primary: KeyMod.Alt | KeyCode.PageUp }
......@@ -1163,7 +1163,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyCode.DownArrow,
mac: { primary: KeyMod.WinCtrl | KeyCode.PageDown }
}
......@@ -1188,7 +1188,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyCode.PageDown,
win: { primary: KeyMod.Alt | KeyCode.PageDown },
linux: { primary: KeyMod.Alt | KeyCode.PageDown }
......@@ -1351,7 +1351,7 @@ export namespace CoreNavigationCommands {
precondition: null,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyCode.KEY_I
}
});
......@@ -1376,7 +1376,7 @@ export namespace CoreNavigationCommands {
precondition: EditorContextKeys.hasNonEmptySelection,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyCode.Escape,
secondary: [KeyMod.Shift | KeyCode.Escape]
}
......@@ -1403,7 +1403,7 @@ export namespace CoreNavigationCommands {
precondition: EditorContextKeys.hasMultipleSelections,
kbOpts: {
weight: CORE_WEIGHT + 1,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyCode.Escape,
secondary: [KeyMod.Shift | KeyCode.Escape]
}
......@@ -1521,7 +1521,7 @@ export namespace CoreEditingCommands {
precondition: EditorContextKeys.writable,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: null,
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_O }
}
......@@ -1542,7 +1542,7 @@ export namespace CoreEditingCommands {
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: ContextKeyExpr.and(
EditorContextKeys.textFocus,
EditorContextKeys.editorTextFocus,
EditorContextKeys.tabDoesNotMoveFocus
),
primary: KeyMod.Shift | KeyCode.Tab
......@@ -1565,7 +1565,7 @@ export namespace CoreEditingCommands {
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: ContextKeyExpr.and(
EditorContextKeys.textFocus,
EditorContextKeys.editorTextFocus,
EditorContextKeys.tabDoesNotMoveFocus
),
primary: KeyCode.Tab
......@@ -1587,7 +1587,7 @@ export namespace CoreEditingCommands {
precondition: EditorContextKeys.writable,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyCode.Backspace,
secondary: [KeyMod.Shift | KeyCode.Backspace],
mac: { primary: KeyCode.Backspace, secondary: [KeyMod.Shift | KeyCode.Backspace, KeyMod.WinCtrl | KeyCode.KEY_H, KeyMod.WinCtrl | KeyCode.Backspace] }
......@@ -1613,7 +1613,7 @@ export namespace CoreEditingCommands {
precondition: EditorContextKeys.writable,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyCode.Delete,
mac: { primary: KeyCode.Delete, secondary: [KeyMod.WinCtrl | KeyCode.KEY_D, KeyMod.WinCtrl | KeyCode.Delete] }
}
......@@ -1743,7 +1743,7 @@ registerCommand(new EditorOrNativeTextInputCommand({
precondition: EditorContextKeys.writable,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyCode.KEY_Z
}
}));
......@@ -1756,7 +1756,7 @@ registerCommand(new EditorOrNativeTextInputCommand({
precondition: EditorContextKeys.writable,
kbOpts: {
weight: CORE_WEIGHT,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyCode.KEY_Y,
secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_Z],
mac: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_Z }
......
......@@ -1069,7 +1069,7 @@ class EditorContextKeysManager extends Disposable {
contextKeyService.createKey('editorId', editor.getId());
this._editorFocus = EditorContextKeys.focus.bindTo(contextKeyService);
this._textInputFocus = EditorContextKeys.textInputFocus.bindTo(contextKeyService);
this._editorTextFocus = EditorContextKeys.textFocus.bindTo(contextKeyService);
this._editorTextFocus = EditorContextKeys.editorTextFocus.bindTo(contextKeyService);
this._editorTabMovesFocus = EditorContextKeys.tabMovesFocus.bindTo(contextKeyService);
this._editorReadonly = EditorContextKeys.readOnly.bindTo(contextKeyService);
this._hasMultipleSelections = EditorContextKeys.hasMultipleSelections.bindTo(contextKeyService);
......
......@@ -10,7 +10,7 @@ export namespace EditorContextKeys {
/**
* A context key that is set when the editor's text has focus (cursor is blinking).
*/
export const textFocus = new RawContextKey<boolean>('editorTextFocus', false);
export const editorTextFocus = new RawContextKey<boolean>('editorTextFocus', false);
/**
* A context key that is set when the editor's text or an editor's widget has focus.
*/
......
......@@ -33,7 +33,7 @@ class JumpToBracketAction extends EditorAction {
alias: 'Go to Bracket',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_BACKSLASH
}
});
......
......@@ -22,7 +22,7 @@ class TransposeLettersAction extends EditorAction {
alias: 'Transpose Letters',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: 0,
mac: {
primary: KeyMod.WinCtrl | KeyCode.KEY_T
......
......@@ -60,7 +60,7 @@ class ExecCommandCutAction extends ExecCommandAction {
constructor() {
let kbOpts: ICommandKeybindingsOptions = {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyCode.KEY_X,
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_X, secondary: [KeyMod.Shift | KeyCode.Delete] }
};
......@@ -97,7 +97,7 @@ class ExecCommandCopyAction extends ExecCommandAction {
constructor() {
let kbOpts: ICommandKeybindingsOptions = {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyCode.KEY_C,
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_C, secondary: [KeyMod.CtrlCmd | KeyCode.Insert] }
};
......@@ -135,7 +135,7 @@ class ExecCommandPasteAction extends ExecCommandAction {
constructor() {
let kbOpts: ICommandKeybindingsOptions = {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyCode.KEY_V,
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_V, secondary: [KeyMod.Shift | KeyCode.Insert] }
};
......@@ -168,7 +168,7 @@ class ExecCommandCopyWithSyntaxHighlightingAction extends ExecCommandAction {
alias: 'Copy With Syntax Highlighting',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: null
}
});
......
......@@ -51,7 +51,7 @@ class ToggleCommentLineAction extends CommentLineAction {
alias: 'Toggle Line Comment',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyCode.US_SLASH
}
});
......@@ -66,7 +66,7 @@ class AddLineCommentAction extends CommentLineAction {
alias: 'Add Line Comment',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_C)
}
});
......@@ -81,7 +81,7 @@ class RemoveLineCommentAction extends CommentLineAction {
alias: 'Remove Line Comment',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_U)
}
});
......@@ -97,7 +97,7 @@ class BlockCommentAction extends EditorAction {
alias: 'Toggle Block Comment',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A,
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_A }
}
......
......@@ -224,7 +224,7 @@ class ShowContextMenu extends EditorAction {
alias: 'Show Editor Context Menu',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.Shift | KeyCode.F10
}
});
......
......@@ -114,7 +114,7 @@ export class CursorUndo extends EditorCommand {
id: 'cursorUndo',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyCode.KEY_U
}
});
......
......@@ -437,7 +437,7 @@ class UnfoldAction extends FoldingAction<FoldingArguments> {
alias: 'Unfold',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_CLOSE_SQUARE_BRACKET,
mac: {
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.US_CLOSE_SQUARE_BRACKET
......@@ -480,7 +480,7 @@ class UnFoldRecursivelyAction extends FoldingAction<void> {
alias: 'Unfold Recursively',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.US_CLOSE_SQUARE_BRACKET)
}
});
......@@ -500,7 +500,7 @@ class FoldAction extends FoldingAction<FoldingArguments> {
alias: 'Fold',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_OPEN_SQUARE_BRACKET,
mac: {
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.US_OPEN_SQUARE_BRACKET
......@@ -543,7 +543,7 @@ class FoldRecursivelyAction extends FoldingAction<void> {
alias: 'Fold Recursively',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.US_OPEN_SQUARE_BRACKET)
}
});
......@@ -564,7 +564,7 @@ class FoldAllBlockCommentsAction extends FoldingAction<void> {
alias: 'Fold All Block Comments',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.US_SLASH)
}
});
......@@ -592,7 +592,7 @@ class FoldAllRegionsAction extends FoldingAction<void> {
alias: 'Fold All Regions',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_8)
}
});
......@@ -620,7 +620,7 @@ class UnfoldAllRegionsAction extends FoldingAction<void> {
alias: 'Unfold All Regions',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_9)
}
});
......@@ -648,7 +648,7 @@ class FoldAllAction extends FoldingAction<void> {
alias: 'Fold All',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_0)
}
});
......@@ -668,7 +668,7 @@ class UnfoldAllAction extends FoldingAction<void> {
alias: 'Unfold All',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_J)
}
});
......@@ -711,7 +711,7 @@ for (let i = 1; i <= 7; i++) {
alias: `Fold Level ${i}`,
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | (KeyCode.KEY_0 + i))
}
})
......
......@@ -304,7 +304,7 @@ export class FormatDocumentAction extends AbstractFormatAction {
alias: 'Format Document',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_F,
// secondary: [KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_D)],
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_I }
......@@ -333,7 +333,7 @@ export class FormatSelectionAction extends AbstractFormatAction {
alias: 'Format Code',
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasNonEmptySelection),
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_F)
},
menuOpts: {
......
......@@ -193,7 +193,7 @@ export class GoToDefinitionAction extends DefinitionAction {
EditorContextKeys.hasDefinitionProvider,
EditorContextKeys.isInEmbeddedEditor.toNegated()),
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: goToDeclarationKb
},
menuOpts: {
......@@ -217,7 +217,7 @@ export class OpenDefinitionToSideAction extends DefinitionAction {
EditorContextKeys.hasDefinitionProvider,
EditorContextKeys.isInEmbeddedEditor.toNegated()),
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, goToDeclarationKb)
}
});
......@@ -235,7 +235,7 @@ export class PeekDefinitionAction extends DefinitionAction {
PeekContext.notInPeekEditor,
EditorContextKeys.isInEmbeddedEditor.toNegated()),
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.Alt | KeyCode.F12,
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.F10 }
},
......@@ -276,7 +276,7 @@ export class GoToImplementationAction extends ImplementationAction {
EditorContextKeys.hasImplementationProvider,
EditorContextKeys.isInEmbeddedEditor.toNegated()),
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyCode.F12
}
});
......@@ -296,7 +296,7 @@ export class PeekImplementationAction extends ImplementationAction {
EditorContextKeys.hasImplementationProvider,
EditorContextKeys.isInEmbeddedEditor.toNegated()),
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.F12
}
});
......@@ -332,7 +332,7 @@ export class GoToTypeDefintionAction extends TypeDefinitionAction {
EditorContextKeys.hasTypeDefinitionProvider,
EditorContextKeys.isInEmbeddedEditor.toNegated()),
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: 0
},
menuOpts: {
......@@ -356,7 +356,7 @@ export class PeekTypeDefinitionAction extends TypeDefinitionAction {
EditorContextKeys.hasTypeDefinitionProvider,
EditorContextKeys.isInEmbeddedEditor.toNegated()),
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: 0
}
});
......
......@@ -193,7 +193,7 @@ class ShowHoverAction extends EditorAction {
alias: 'Show Hover',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_I)
}
});
......
......@@ -148,7 +148,7 @@ class InPlaceReplaceUp extends EditorAction {
alias: 'Replace with Previous Value',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_COMMA
}
});
......@@ -172,7 +172,7 @@ class InPlaceReplaceDown extends EditorAction {
alias: 'Replace with Next Value',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_DOT
}
});
......
......@@ -58,7 +58,7 @@ class CopyLinesUpAction extends AbstractCopyLinesAction {
alias: 'Copy Line Up',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.Alt | KeyMod.Shift | KeyCode.UpArrow,
linux: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.Shift | KeyCode.UpArrow }
}
......@@ -74,7 +74,7 @@ class CopyLinesDownAction extends AbstractCopyLinesAction {
alias: 'Copy Line Down',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.Alt | KeyMod.Shift | KeyCode.DownArrow,
linux: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.Shift | KeyCode.DownArrow }
}
......@@ -117,7 +117,7 @@ class MoveLinesUpAction extends AbstractMoveLinesAction {
alias: 'Move Line Up',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.Alt | KeyCode.UpArrow,
linux: { primary: KeyMod.Alt | KeyCode.UpArrow }
}
......@@ -133,7 +133,7 @@ class MoveLinesDownAction extends AbstractMoveLinesAction {
alias: 'Move Line Down',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.Alt | KeyCode.DownArrow,
linux: { primary: KeyMod.Alt | KeyCode.DownArrow }
}
......@@ -203,7 +203,7 @@ export class TrimTrailingWhitespaceAction extends EditorAction {
alias: 'Trim Trailing Whitespace',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_X)
}
});
......@@ -286,7 +286,7 @@ class DeleteLinesAction extends AbstractRemoveLinesAction {
alias: 'Delete Line',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_K
}
});
......@@ -315,7 +315,7 @@ export class IndentLinesAction extends EditorAction {
alias: 'Indent Line',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyCode.US_CLOSE_SQUARE_BRACKET
}
});
......@@ -336,7 +336,7 @@ class OutdentLinesAction extends EditorAction {
alias: 'Outdent Line',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyCode.US_OPEN_SQUARE_BRACKET
}
});
......@@ -355,7 +355,7 @@ export class InsertLineBeforeAction extends EditorAction {
alias: 'Insert Line Above',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Enter
}
});
......@@ -375,7 +375,7 @@ export class InsertLineAfterAction extends EditorAction {
alias: 'Insert Line Below',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyCode.Enter
}
});
......@@ -434,7 +434,7 @@ export class DeleteAllLeftAction extends AbstractDeleteAllToBoundaryAction {
alias: 'Delete All Left',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: null,
mac: { primary: KeyMod.CtrlCmd | KeyCode.Backspace }
}
......@@ -487,7 +487,7 @@ export class DeleteAllRightAction extends AbstractDeleteAllToBoundaryAction {
alias: 'Delete All Right',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: null,
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_K, secondary: [KeyMod.CtrlCmd | KeyCode.Delete] }
}
......@@ -544,7 +544,7 @@ export class JoinLinesAction extends EditorAction {
alias: 'Join Lines',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: 0,
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_J }
}
......
......@@ -34,7 +34,7 @@ export class InsertCursorAbove extends EditorAction {
alias: 'Add Cursor Above',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.UpArrow,
linux: {
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.UpArrow,
......@@ -70,7 +70,7 @@ export class InsertCursorBelow extends EditorAction {
alias: 'Add Cursor Below',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.DownArrow,
linux: {
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.DownArrow,
......@@ -107,7 +107,7 @@ class InsertCursorAtEndOfEachLineSelected extends EditorAction {
alias: 'Add Cursors to Line Ends',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_I
}
});
......@@ -603,7 +603,7 @@ export class CompatChangeAll extends MultiCursorSelectionControllerAction {
alias: 'Change All Occurrences',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyCode.F2
},
menuOpts: {
......
......@@ -67,7 +67,7 @@ export class TriggerParameterHintsAction extends EditorAction {
alias: 'Trigger Parameter Hints',
precondition: EditorContextKeys.hasSignatureHelpProvider,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Space
}
});
......@@ -94,7 +94,7 @@ registerEditorCommand(new ParameterHintsCommand({
handler: x => x.cancel(),
kbOpts: {
weight: weight,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyCode.Escape,
secondary: [KeyMod.Shift | KeyCode.Escape]
}
......@@ -105,7 +105,7 @@ registerEditorCommand(new ParameterHintsCommand({
handler: x => x.previous(),
kbOpts: {
weight: weight,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyCode.UpArrow,
secondary: [KeyMod.Alt | KeyCode.UpArrow],
mac: { primary: KeyCode.UpArrow, secondary: [KeyMod.Alt | KeyCode.UpArrow, KeyMod.WinCtrl | KeyCode.KEY_P] }
......@@ -117,7 +117,7 @@ registerEditorCommand(new ParameterHintsCommand({
handler: x => x.next(),
kbOpts: {
weight: weight,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyCode.DownArrow,
secondary: [KeyMod.Alt | KeyCode.DownArrow],
mac: { primary: KeyCode.DownArrow, secondary: [KeyMod.Alt | KeyCode.DownArrow, KeyMod.WinCtrl | KeyCode.KEY_N] }
......
......@@ -149,7 +149,7 @@ export class QuickFixAction extends EditorAction {
alias: 'Quick Fix',
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCodeActionsProvider),
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyCode.US_DOT
}
});
......@@ -232,7 +232,7 @@ export class RefactorAction extends EditorAction {
alias: 'Refactor',
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCodeActionsProvider),
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_R
}
});
......
......@@ -68,7 +68,7 @@ export class ReferenceAction extends EditorAction {
PeekContext.notInPeekEditor,
EditorContextKeys.isInEmbeddedEditor.toNegated()),
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.Shift | KeyCode.F12
},
menuOpts: {
......
......@@ -216,7 +216,7 @@ export class RenameAction extends EditorAction {
alias: 'Rename Symbol',
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasRenameProvider),
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyCode.F2
},
menuOpts: {
......
......@@ -171,7 +171,7 @@ class GrowSelectionAction extends AbstractSmartSelect {
alias: 'Expand Select',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.RightArrow,
mac: { primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyMod.Shift | KeyCode.RightArrow }
}
......@@ -187,7 +187,7 @@ class ShrinkSelectionAction extends AbstractSmartSelect {
alias: 'Shrink Select',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.LeftArrow,
mac: { primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyMod.Shift | KeyCode.LeftArrow }
}
......
......@@ -216,7 +216,7 @@ registerEditorCommand(new CommandCtor({
handler: ctrl => ctrl.next(),
kbOpts: {
weight: KeybindingsRegistry.WEIGHT.editorContrib(30),
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyCode.Tab
}
}));
......@@ -226,7 +226,7 @@ registerEditorCommand(new CommandCtor({
handler: ctrl => ctrl.prev(),
kbOpts: {
weight: KeybindingsRegistry.WEIGHT.editorContrib(30),
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.Shift | KeyCode.Tab
}
}));
......@@ -236,7 +236,7 @@ registerEditorCommand(new CommandCtor({
handler: ctrl => ctrl.cancel(),
kbOpts: {
weight: KeybindingsRegistry.WEIGHT.editorContrib(30),
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyCode.Escape,
secondary: [KeyMod.Shift | KeyCode.Escape]
}
......
......@@ -318,7 +318,7 @@ export class TriggerSuggestAction extends EditorAction {
alias: 'Trigger Suggest',
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCompletionItemProvider),
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyCode.Space,
mac: { primary: KeyMod.WinCtrl | KeyCode.Space }
}
......@@ -350,7 +350,7 @@ registerEditorCommand(new SuggestCommand({
handler: x => x.acceptSelectedSuggestion(),
kbOpts: {
weight: weight,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyCode.Tab
}
}));
......@@ -361,7 +361,7 @@ registerEditorCommand(new SuggestCommand({
handler: x => x.acceptSelectedSuggestion(),
kbOpts: {
weight: weight,
kbExpr: ContextKeyExpr.and(EditorContextKeys.textFocus, SuggestContext.AcceptSuggestionsOnEnter, SuggestContext.MakesTextEdit),
kbExpr: ContextKeyExpr.and(EditorContextKeys.editorTextFocus, SuggestContext.AcceptSuggestionsOnEnter, SuggestContext.MakesTextEdit),
primary: KeyCode.Enter
}
}));
......@@ -372,7 +372,7 @@ registerEditorCommand(new SuggestCommand({
handler: x => x.cancelSuggestWidget(),
kbOpts: {
weight: weight,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyCode.Escape,
secondary: [KeyMod.Shift | KeyCode.Escape]
}
......@@ -384,7 +384,7 @@ registerEditorCommand(new SuggestCommand({
handler: c => c.selectNextSuggestion(),
kbOpts: {
weight: weight,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyCode.DownArrow,
secondary: [KeyMod.CtrlCmd | KeyCode.DownArrow],
mac: { primary: KeyCode.DownArrow, secondary: [KeyMod.CtrlCmd | KeyCode.DownArrow, KeyMod.WinCtrl | KeyCode.KEY_N] }
......@@ -397,7 +397,7 @@ registerEditorCommand(new SuggestCommand({
handler: c => c.selectNextPageSuggestion(),
kbOpts: {
weight: weight,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyCode.PageDown,
secondary: [KeyMod.CtrlCmd | KeyCode.PageDown]
}
......@@ -409,7 +409,7 @@ registerEditorCommand(new SuggestCommand({
handler: c => c.selectLastSuggestion(),
kbOpts: {
weight: weight,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyCode.End
}
}));
......@@ -420,7 +420,7 @@ registerEditorCommand(new SuggestCommand({
handler: c => c.selectPrevSuggestion(),
kbOpts: {
weight: weight,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyCode.UpArrow,
secondary: [KeyMod.CtrlCmd | KeyCode.UpArrow],
mac: { primary: KeyCode.UpArrow, secondary: [KeyMod.CtrlCmd | KeyCode.UpArrow, KeyMod.WinCtrl | KeyCode.KEY_P] }
......@@ -433,7 +433,7 @@ registerEditorCommand(new SuggestCommand({
handler: c => c.selectPrevPageSuggestion(),
kbOpts: {
weight: weight,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyCode.PageUp,
secondary: [KeyMod.CtrlCmd | KeyCode.PageUp]
}
......@@ -445,7 +445,7 @@ registerEditorCommand(new SuggestCommand({
handler: c => c.selectFirstSuggestion(),
kbOpts: {
weight: weight,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyCode.Home
}
}));
......@@ -456,7 +456,7 @@ registerEditorCommand(new SuggestCommand({
handler: x => x.toggleSuggestionDetails(),
kbOpts: {
weight: weight,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyCode.Space,
mac: { primary: KeyMod.WinCtrl | KeyCode.Space }
}
......@@ -468,7 +468,7 @@ registerEditorCommand(new SuggestCommand({
handler: x => x.toggleSuggestionFocus(),
kbOpts: {
weight: weight,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Space,
mac: { primary: KeyMod.WinCtrl | KeyMod.Alt | KeyCode.Space }
}
......
......@@ -477,7 +477,7 @@ class NextWordHighlightAction extends WordHighlightNavigationAction {
alias: 'Go to Next Symbol Highlight',
precondition: ctxHasWordHighlights,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyCode.F7
}
});
......@@ -492,7 +492,7 @@ class PrevWordHighlightAction extends WordHighlightNavigationAction {
alias: 'Go to Previous Symbol Highlight',
precondition: ctxHasWordHighlights,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyMod.Shift | KeyCode.F7
}
});
......
......@@ -98,7 +98,7 @@ export class CursorWordStartLeft extends WordLeftCommand {
id: 'cursorWordStartLeft',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyCode.LeftArrow,
mac: { primary: KeyMod.Alt | KeyCode.LeftArrow }
}
......@@ -136,7 +136,7 @@ export class CursorWordStartLeftSelect extends WordLeftCommand {
id: 'cursorWordStartLeftSelect',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.LeftArrow,
mac: { primary: KeyMod.Alt | KeyMod.Shift | KeyCode.LeftArrow }
}
......@@ -185,7 +185,7 @@ export class CursorWordEndRight extends WordRightCommand {
id: 'cursorWordEndRight',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyCode.RightArrow,
mac: { primary: KeyMod.Alt | KeyCode.RightArrow }
}
......@@ -223,7 +223,7 @@ export class CursorWordEndRightSelect extends WordRightCommand {
id: 'cursorWordEndRightSelect',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.RightArrow,
mac: { primary: KeyMod.Alt | KeyMod.Shift | KeyCode.RightArrow }
}
......@@ -328,7 +328,7 @@ export class DeleteWordLeft extends DeleteWordLeftCommand {
id: 'deleteWordLeft',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyCode.Backspace,
mac: { primary: KeyMod.Alt | KeyCode.Backspace }
}
......@@ -366,7 +366,7 @@ export class DeleteWordRight extends DeleteWordRightCommand {
id: 'deleteWordRight',
precondition: EditorContextKeys.writable,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyCode.Delete,
mac: { primary: KeyMod.Alt | KeyCode.Delete }
}
......
......@@ -70,7 +70,7 @@ function registerActiveEditorMoveCommand(): void {
KeybindingsRegistry.registerCommandAndKeybindingRule({
id: EditorCommands.MoveActiveEditor,
weight: KeybindingsRegistry.WEIGHT.workbenchContrib(),
when: EditorContextKeys.textFocus,
when: EditorContextKeys.editorTextFocus,
primary: null,
handler: (accessor, args: any) => moveActiveEditor(args, accessor),
description: {
......
......@@ -177,7 +177,7 @@ export function registerCommands(): void {
KeybindingsRegistry.registerCommandAndKeybindingRule({
weight: KeybindingsRegistry.WEIGHT.workbenchContrib(),
primary: KeyMod.Shift | KeyCode.F9,
when: EditorContextKeys.textFocus,
when: EditorContextKeys.editorTextFocus,
id: COLUMN_BREAKPOINT_COMMAND_ID,
handler: (accessor) => {
const debugService = accessor.get(IDebugService);
......
......@@ -24,7 +24,7 @@ class ToggleBreakpointAction extends EditorAction {
alias: 'Debug: Toggle Breakpoint',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyCode.F9
}
});
......@@ -172,7 +172,7 @@ class ShowDebugHoverAction extends EditorAction {
alias: 'Debug: Show Hover',
precondition: CONTEXT_IN_DEBUG_MODE,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_I)
}
});
......
......@@ -333,7 +333,7 @@ class ReplHistoryPreviousAction extends EditorAction {
alias: 'History Previous',
precondition: debug.CONTEXT_IN_DEBUG_REPL,
kbOpts: {
kbExpr: ContextKeyExpr.and(EditorContextKeys.textFocus, debug.CONTEXT_ON_FIRST_DEBUG_REPL_LINE),
kbExpr: ContextKeyExpr.and(EditorContextKeys.editorTextFocus, debug.CONTEXT_ON_FIRST_DEBUG_REPL_LINE),
primary: KeyCode.UpArrow,
weight: 50
},
......@@ -357,7 +357,7 @@ class ReplHistoryNextAction extends EditorAction {
alias: 'History Next',
precondition: debug.CONTEXT_IN_DEBUG_REPL,
kbOpts: {
kbExpr: ContextKeyExpr.and(EditorContextKeys.textFocus, debug.CONTEXT_ON_LAST_DEBUG_REPL_LINE),
kbExpr: ContextKeyExpr.and(EditorContextKeys.editorTextFocus, debug.CONTEXT_ON_LAST_DEBUG_REPL_LINE),
primary: KeyCode.DownArrow,
weight: 50
},
......@@ -381,7 +381,7 @@ class AcceptReplInputAction extends EditorAction {
alias: 'REPL Accept Input',
precondition: debug.CONTEXT_IN_DEBUG_REPL,
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyCode.Enter
}
});
......@@ -421,7 +421,7 @@ registerEditorCommand(new SuggestCommand({
handler: x => x.acceptSelectedSuggestion(),
kbOpts: {
weight: 50,
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyCode.RightArrow
}
}));
......@@ -23,7 +23,7 @@ class ExpandAbbreviationAction extends EmmetEditorAction {
kbOpts: {
primary: KeyCode.Tab,
kbExpr: ContextKeyExpr.and(
EditorContextKeys.textFocus,
EditorContextKeys.editorTextFocus,
EditorContextKeys.tabDoesNotMoveFocus,
ContextKeyExpr.has('config.emmet.triggerExpansionOnTab')
)
......
......@@ -364,7 +364,7 @@ class DefineKeybindingCommand extends EditorCommand {
id: DefineKeybindingCommand.ID,
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.languageId.isEqualTo('jsonc')),
kbOpts: {
kbExpr: EditorContextKeys.textFocus,
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_K)
}
});
......
......@@ -373,7 +373,7 @@ export class ShowPreviousChangeAction extends EditorAction {
label: nls.localize('show previous change', "Show Previous Change"),
alias: 'Show Previous Change',
precondition: null,
kbOpts: { kbExpr: EditorContextKeys.textFocus, primary: KeyMod.Shift | KeyMod.Alt | KeyCode.F3 }
kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Shift | KeyMod.Alt | KeyCode.F3 }
});
}
......@@ -407,7 +407,7 @@ export class ShowNextChangeAction extends EditorAction {
label: nls.localize('show next change', "Show Next Change"),
alias: 'Show Next Change',
precondition: null,
kbOpts: { kbExpr: EditorContextKeys.textFocus, primary: KeyMod.Alt | KeyCode.F3 }
kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Alt | KeyCode.F3 }
});
}
......@@ -441,7 +441,7 @@ export class MoveToPreviousChangeAction extends EditorAction {
label: nls.localize('move to previous change', "Move to Previous Change"),
alias: 'Move to Previous Change',
precondition: null,
kbOpts: { kbExpr: EditorContextKeys.textFocus, primary: KeyMod.Shift | KeyMod.Alt | KeyCode.F5 }
kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Shift | KeyMod.Alt | KeyCode.F5 }
});
}
......@@ -483,7 +483,7 @@ export class MoveToNextChangeAction extends EditorAction {
label: nls.localize('move to next change', "Move to Next Change"),
alias: 'Move to Next Change',
precondition: null,
kbOpts: { kbExpr: EditorContextKeys.textFocus, primary: KeyMod.Alt | KeyCode.F5 }
kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Alt | KeyCode.F5 }
});
}
......
......@@ -144,7 +144,7 @@ registerEditorCommand(new TabCompletionCommand({
kbOpts: {
weight: KeybindingsRegistry.WEIGHT.editorContrib(),
kbExpr: ContextKeyExpr.and(
EditorContextKeys.textFocus,
EditorContextKeys.editorTextFocus,
EditorContextKeys.tabDoesNotMoveFocus,
SnippetController2.InSnippetMode.toNegated()
),
......
......@@ -44,13 +44,13 @@ Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench)
.registerWorkbenchContribution(WalkThroughSnippetContentProvider, LifecyclePhase.Starting);
Registry.as<IWorkbenchActionRegistry>(Extensions.WorkbenchActions)
.registerWorkbenchAction(new SyncActionDescriptor(WalkThroughArrowUpAction, WalkThroughArrowUpAction.ID, WalkThroughArrowUpAction.LABEL, { primary: KeyCode.UpArrow }, ContextKeyExpr.and(WALK_THROUGH_FOCUS, EditorContextKeys.textFocus.toNegated())), 'Interactive Playground: Scroll Up (Line)', localize('interactivePlayground', "Interactive Playground"));
.registerWorkbenchAction(new SyncActionDescriptor(WalkThroughArrowUpAction, WalkThroughArrowUpAction.ID, WalkThroughArrowUpAction.LABEL, { primary: KeyCode.UpArrow }, ContextKeyExpr.and(WALK_THROUGH_FOCUS, EditorContextKeys.editorTextFocus.toNegated())), 'Interactive Playground: Scroll Up (Line)', localize('interactivePlayground', "Interactive Playground"));
Registry.as<IWorkbenchActionRegistry>(Extensions.WorkbenchActions)
.registerWorkbenchAction(new SyncActionDescriptor(WalkThroughArrowDownAction, WalkThroughArrowDownAction.ID, WalkThroughArrowDownAction.LABEL, { primary: KeyCode.DownArrow }, ContextKeyExpr.and(WALK_THROUGH_FOCUS, EditorContextKeys.textFocus.toNegated())), 'Interactive Playground: Scroll Down (Line)', localize('interactivePlayground', "Interactive Playground"));
.registerWorkbenchAction(new SyncActionDescriptor(WalkThroughArrowDownAction, WalkThroughArrowDownAction.ID, WalkThroughArrowDownAction.LABEL, { primary: KeyCode.DownArrow }, ContextKeyExpr.and(WALK_THROUGH_FOCUS, EditorContextKeys.editorTextFocus.toNegated())), 'Interactive Playground: Scroll Down (Line)', localize('interactivePlayground', "Interactive Playground"));
Registry.as<IWorkbenchActionRegistry>(Extensions.WorkbenchActions)
.registerWorkbenchAction(new SyncActionDescriptor(WalkThroughPageUpAction, WalkThroughPageUpAction.ID, WalkThroughPageUpAction.LABEL, { primary: KeyCode.PageUp }, ContextKeyExpr.and(WALK_THROUGH_FOCUS, EditorContextKeys.textFocus.toNegated())), 'Interactive Playground: Scroll Up (Page)', localize('interactivePlayground', "Interactive Playground"));
.registerWorkbenchAction(new SyncActionDescriptor(WalkThroughPageUpAction, WalkThroughPageUpAction.ID, WalkThroughPageUpAction.LABEL, { primary: KeyCode.PageUp }, ContextKeyExpr.and(WALK_THROUGH_FOCUS, EditorContextKeys.editorTextFocus.toNegated())), 'Interactive Playground: Scroll Up (Page)', localize('interactivePlayground', "Interactive Playground"));
Registry.as<IWorkbenchActionRegistry>(Extensions.WorkbenchActions)
.registerWorkbenchAction(new SyncActionDescriptor(WalkThroughPageDownAction, WalkThroughPageDownAction.ID, WalkThroughPageDownAction.LABEL, { primary: KeyCode.PageDown }, ContextKeyExpr.and(WALK_THROUGH_FOCUS, EditorContextKeys.textFocus.toNegated())), 'Interactive Playground: Scroll Down (Page)', localize('interactivePlayground', "Interactive Playground"));
.registerWorkbenchAction(new SyncActionDescriptor(WalkThroughPageDownAction, WalkThroughPageDownAction.ID, WalkThroughPageDownAction.LABEL, { primary: KeyCode.PageDown }, ContextKeyExpr.and(WALK_THROUGH_FOCUS, EditorContextKeys.editorTextFocus.toNegated())), 'Interactive Playground: Scroll Down (Page)', localize('interactivePlayground', "Interactive Playground"));
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册