Rename KeyCode enum members to more closely resemble ScanCode enum members
This commit is contained in:
parent
36e0bf5a99
commit
cdfee23440
|
@ -24,11 +24,11 @@ function extractKeyCode(e: KeyboardEvent): KeyCode {
|
|||
return KeyCode.PauseBreak;
|
||||
} else if (browser.isFirefox) {
|
||||
if (keyCode === 59) {
|
||||
return KeyCode.US_SEMICOLON;
|
||||
return KeyCode.Semicolon;
|
||||
} else if (keyCode === 107) {
|
||||
return KeyCode.US_EQUAL;
|
||||
return KeyCode.Equal;
|
||||
} else if (keyCode === 109) {
|
||||
return KeyCode.US_MINUS;
|
||||
return KeyCode.Minus;
|
||||
} else if (platform.isMacintosh && keyCode === 224) {
|
||||
return KeyCode.Meta;
|
||||
}
|
||||
|
|
|
@ -283,7 +283,7 @@ class KeyboardController<T> implements IDisposable {
|
|||
this.onKeyDown.filter(e => e.keyCode === KeyCode.Escape).on(this.onEscape, this, this.disposables);
|
||||
|
||||
if (options.multipleSelectionSupport !== false) {
|
||||
this.onKeyDown.filter(e => (platform.isMacintosh ? e.metaKey : e.ctrlKey) && e.keyCode === KeyCode.KEY_A).on(this.onCtrlA, this, this.multipleSelectionDisposables);
|
||||
this.onKeyDown.filter(e => (platform.isMacintosh ? e.metaKey : e.ctrlKey) && e.keyCode === KeyCode.KeyA).on(this.onCtrlA, this, this.multipleSelectionDisposables);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -292,7 +292,7 @@ class KeyboardController<T> implements IDisposable {
|
|||
this.multipleSelectionDisposables.clear();
|
||||
|
||||
if (optionsUpdate.multipleSelectionSupport) {
|
||||
this.onKeyDown.filter(e => (platform.isMacintosh ? e.metaKey : e.ctrlKey) && e.keyCode === KeyCode.KEY_A).on(this.onCtrlA, this, this.multipleSelectionDisposables);
|
||||
this.onKeyDown.filter(e => (platform.isMacintosh ? e.metaKey : e.ctrlKey) && e.keyCode === KeyCode.KeyA).on(this.onCtrlA, this, this.multipleSelectionDisposables);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -378,10 +378,10 @@ export const DefaultKeyboardNavigationDelegate = new class implements IKeyboardN
|
|||
return false;
|
||||
}
|
||||
|
||||
return (event.keyCode >= KeyCode.KEY_A && event.keyCode <= KeyCode.KEY_Z)
|
||||
|| (event.keyCode >= KeyCode.KEY_0 && event.keyCode <= KeyCode.KEY_9)
|
||||
|| (event.keyCode >= KeyCode.NUMPAD_0 && event.keyCode <= KeyCode.NUMPAD_9)
|
||||
|| (event.keyCode >= KeyCode.US_SEMICOLON && event.keyCode <= KeyCode.US_QUOTE);
|
||||
return (event.keyCode >= KeyCode.KeyA && event.keyCode <= KeyCode.KeyZ)
|
||||
|| (event.keyCode >= KeyCode.Digit0 && event.keyCode <= KeyCode.Digit9)
|
||||
|| (event.keyCode >= KeyCode.Numpad0 && event.keyCode <= KeyCode.Numpad9)
|
||||
|| (event.keyCode >= KeyCode.Semicolon && event.keyCode <= KeyCode.Quote);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -751,7 +751,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
|
|||
this._register(onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.PageUp).on(this.onPageUp, this));
|
||||
this._register(onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.Home).on(this.onHome, this));
|
||||
this._register(onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.End).on(this.onEnd, this));
|
||||
this._register(onSelectDropDownKeyDown.filter(e => (e.keyCode >= KeyCode.KEY_0 && e.keyCode <= KeyCode.KEY_Z) || (e.keyCode >= KeyCode.US_SEMICOLON && e.keyCode <= KeyCode.NUMPAD_DIVIDE)).on(this.onCharacter, this));
|
||||
this._register(onSelectDropDownKeyDown.filter(e => (e.keyCode >= KeyCode.Digit0 && e.keyCode <= KeyCode.KeyZ) || (e.keyCode >= KeyCode.Semicolon && e.keyCode <= KeyCode.NumpadDivide)).on(this.onCharacter, this));
|
||||
|
||||
// SetUp list mouse controller - control navigation, disabled items, focus
|
||||
|
||||
|
|
|
@ -37,43 +37,43 @@ export const enum KeyCode {
|
|||
Insert,
|
||||
Delete,
|
||||
|
||||
KEY_0,
|
||||
KEY_1,
|
||||
KEY_2,
|
||||
KEY_3,
|
||||
KEY_4,
|
||||
KEY_5,
|
||||
KEY_6,
|
||||
KEY_7,
|
||||
KEY_8,
|
||||
KEY_9,
|
||||
Digit0,
|
||||
Digit1,
|
||||
Digit2,
|
||||
Digit3,
|
||||
Digit4,
|
||||
Digit5,
|
||||
Digit6,
|
||||
Digit7,
|
||||
Digit8,
|
||||
Digit9,
|
||||
|
||||
KEY_A,
|
||||
KEY_B,
|
||||
KEY_C,
|
||||
KEY_D,
|
||||
KEY_E,
|
||||
KEY_F,
|
||||
KEY_G,
|
||||
KEY_H,
|
||||
KEY_I,
|
||||
KEY_J,
|
||||
KEY_K,
|
||||
KEY_L,
|
||||
KEY_M,
|
||||
KEY_N,
|
||||
KEY_O,
|
||||
KEY_P,
|
||||
KEY_Q,
|
||||
KEY_R,
|
||||
KEY_S,
|
||||
KEY_T,
|
||||
KEY_U,
|
||||
KEY_V,
|
||||
KEY_W,
|
||||
KEY_X,
|
||||
KEY_Y,
|
||||
KEY_Z,
|
||||
KeyA,
|
||||
KeyB,
|
||||
KeyC,
|
||||
KeyD,
|
||||
KeyE,
|
||||
KeyF,
|
||||
KeyG,
|
||||
KeyH,
|
||||
KeyI,
|
||||
KeyJ,
|
||||
KeyK,
|
||||
KeyL,
|
||||
KeyM,
|
||||
KeyN,
|
||||
KeyO,
|
||||
KeyP,
|
||||
KeyQ,
|
||||
KeyR,
|
||||
KeyS,
|
||||
KeyT,
|
||||
KeyU,
|
||||
KeyV,
|
||||
KeyW,
|
||||
KeyX,
|
||||
KeyY,
|
||||
KeyZ,
|
||||
|
||||
Meta,
|
||||
ContextMenu,
|
||||
|
@ -105,57 +105,57 @@ export const enum KeyCode {
|
|||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the ';:' key
|
||||
*/
|
||||
US_SEMICOLON,
|
||||
Semicolon,
|
||||
/**
|
||||
* For any country/region, the '+' key
|
||||
* For the US standard keyboard, the '=+' key
|
||||
*/
|
||||
US_EQUAL,
|
||||
Equal,
|
||||
/**
|
||||
* For any country/region, the ',' key
|
||||
* For the US standard keyboard, the ',<' key
|
||||
*/
|
||||
US_COMMA,
|
||||
Comma,
|
||||
/**
|
||||
* For any country/region, the '-' key
|
||||
* For the US standard keyboard, the '-_' key
|
||||
*/
|
||||
US_MINUS,
|
||||
Minus,
|
||||
/**
|
||||
* For any country/region, the '.' key
|
||||
* For the US standard keyboard, the '.>' key
|
||||
*/
|
||||
US_DOT,
|
||||
Period,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the '/?' key
|
||||
*/
|
||||
US_SLASH,
|
||||
Slash,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the '`~' key
|
||||
*/
|
||||
US_BACKTICK,
|
||||
Backquote,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the '[{' key
|
||||
*/
|
||||
US_OPEN_SQUARE_BRACKET,
|
||||
BracketLeft,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the '\|' key
|
||||
*/
|
||||
US_BACKSLASH,
|
||||
Backslash,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the ']}' key
|
||||
*/
|
||||
US_CLOSE_SQUARE_BRACKET,
|
||||
BracketRight,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the ''"' key
|
||||
*/
|
||||
US_QUOTE,
|
||||
Quote,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
*/
|
||||
|
@ -163,25 +163,25 @@ export const enum KeyCode {
|
|||
/**
|
||||
* Either the angle bracket key or the backslash key on the RT 102-key keyboard.
|
||||
*/
|
||||
OEM_102,
|
||||
IntlBackslash,
|
||||
|
||||
NUMPAD_0, // VK_NUMPAD0, 0x60, Numeric keypad 0 key
|
||||
NUMPAD_1, // VK_NUMPAD1, 0x61, Numeric keypad 1 key
|
||||
NUMPAD_2, // VK_NUMPAD2, 0x62, Numeric keypad 2 key
|
||||
NUMPAD_3, // VK_NUMPAD3, 0x63, Numeric keypad 3 key
|
||||
NUMPAD_4, // VK_NUMPAD4, 0x64, Numeric keypad 4 key
|
||||
NUMPAD_5, // VK_NUMPAD5, 0x65, Numeric keypad 5 key
|
||||
NUMPAD_6, // VK_NUMPAD6, 0x66, Numeric keypad 6 key
|
||||
NUMPAD_7, // VK_NUMPAD7, 0x67, Numeric keypad 7 key
|
||||
NUMPAD_8, // VK_NUMPAD8, 0x68, Numeric keypad 8 key
|
||||
NUMPAD_9, // VK_NUMPAD9, 0x69, Numeric keypad 9 key
|
||||
Numpad0, // VK_NUMPAD0, 0x60, Numeric keypad 0 key
|
||||
Numpad1, // VK_NUMPAD1, 0x61, Numeric keypad 1 key
|
||||
Numpad2, // VK_NUMPAD2, 0x62, Numeric keypad 2 key
|
||||
Numpad3, // VK_NUMPAD3, 0x63, Numeric keypad 3 key
|
||||
Numpad4, // VK_NUMPAD4, 0x64, Numeric keypad 4 key
|
||||
Numpad5, // VK_NUMPAD5, 0x65, Numeric keypad 5 key
|
||||
Numpad6, // VK_NUMPAD6, 0x66, Numeric keypad 6 key
|
||||
Numpad7, // VK_NUMPAD7, 0x67, Numeric keypad 7 key
|
||||
Numpad8, // VK_NUMPAD8, 0x68, Numeric keypad 8 key
|
||||
Numpad9, // VK_NUMPAD9, 0x69, Numeric keypad 9 key
|
||||
|
||||
NUMPAD_MULTIPLY, // VK_MULTIPLY, 0x6A, Multiply key
|
||||
NUMPAD_ADD, // VK_ADD, 0x6B, Add key
|
||||
NumpadMultiply, // VK_MULTIPLY, 0x6A, Multiply key
|
||||
NumpadAdd, // VK_ADD, 0x6B, Add key
|
||||
NUMPAD_SEPARATOR, // VK_SEPARATOR, 0x6C, Separator key
|
||||
NUMPAD_SUBTRACT, // VK_SUBTRACT, 0x6D, Subtract key
|
||||
NUMPAD_DECIMAL, // VK_DECIMAL, 0x6E, Decimal key
|
||||
NUMPAD_DIVIDE, // VK_DIVIDE, 0x6F,
|
||||
NumpadSubtract, // VK_SUBTRACT, 0x6D, Subtract key
|
||||
NumpadDecimal, // VK_DECIMAL, 0x6E, Decimal key
|
||||
NumpadDivide, // VK_DIVIDE, 0x6F,
|
||||
|
||||
/**
|
||||
* Cover all key codes when IME is processing input.
|
||||
|
@ -476,9 +476,6 @@ for (let i = 0; i <= KeyCode.MAX_VALUE; i++) {
|
|||
|
||||
(function () {
|
||||
|
||||
// See https://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html
|
||||
// If an Input Method Editor is processing key input and the event is keydown, return 229.
|
||||
|
||||
// See https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx
|
||||
// See https://github.com/microsoft/node-native-keymap/blob/master/deps/chromium/keyboard_codes_win.h
|
||||
|
||||
|
@ -496,59 +493,59 @@ for (let i = 0; i <= KeyCode.MAX_VALUE; i++) {
|
|||
[0, 1, ScanCode.Turbo, 'Turbo', KeyCode.Unknown, empty, 0, empty, empty, empty],
|
||||
[0, 1, ScanCode.Sleep, 'Sleep', KeyCode.Unknown, empty, 0, 'VK_SLEEP', empty, empty],
|
||||
[0, 1, ScanCode.WakeUp, 'WakeUp', KeyCode.Unknown, empty, 0, empty, empty, empty],
|
||||
[31, 0, ScanCode.KeyA, 'KeyA', KeyCode.KEY_A, 'A', 65, 'VK_A', empty, empty],
|
||||
[32, 0, ScanCode.KeyB, 'KeyB', KeyCode.KEY_B, 'B', 66, 'VK_B', empty, empty],
|
||||
[33, 0, ScanCode.KeyC, 'KeyC', KeyCode.KEY_C, 'C', 67, 'VK_C', empty, empty],
|
||||
[34, 0, ScanCode.KeyD, 'KeyD', KeyCode.KEY_D, 'D', 68, 'VK_D', empty, empty],
|
||||
[35, 0, ScanCode.KeyE, 'KeyE', KeyCode.KEY_E, 'E', 69, 'VK_E', empty, empty],
|
||||
[36, 0, ScanCode.KeyF, 'KeyF', KeyCode.KEY_F, 'F', 70, 'VK_F', empty, empty],
|
||||
[37, 0, ScanCode.KeyG, 'KeyG', KeyCode.KEY_G, 'G', 71, 'VK_G', empty, empty],
|
||||
[38, 0, ScanCode.KeyH, 'KeyH', KeyCode.KEY_H, 'H', 72, 'VK_H', empty, empty],
|
||||
[39, 0, ScanCode.KeyI, 'KeyI', KeyCode.KEY_I, 'I', 73, 'VK_I', empty, empty],
|
||||
[40, 0, ScanCode.KeyJ, 'KeyJ', KeyCode.KEY_J, 'J', 74, 'VK_J', empty, empty],
|
||||
[41, 0, ScanCode.KeyK, 'KeyK', KeyCode.KEY_K, 'K', 75, 'VK_K', empty, empty],
|
||||
[42, 0, ScanCode.KeyL, 'KeyL', KeyCode.KEY_L, 'L', 76, 'VK_L', empty, empty],
|
||||
[43, 0, ScanCode.KeyM, 'KeyM', KeyCode.KEY_M, 'M', 77, 'VK_M', empty, empty],
|
||||
[44, 0, ScanCode.KeyN, 'KeyN', KeyCode.KEY_N, 'N', 78, 'VK_N', empty, empty],
|
||||
[45, 0, ScanCode.KeyO, 'KeyO', KeyCode.KEY_O, 'O', 79, 'VK_O', empty, empty],
|
||||
[46, 0, ScanCode.KeyP, 'KeyP', KeyCode.KEY_P, 'P', 80, 'VK_P', empty, empty],
|
||||
[47, 0, ScanCode.KeyQ, 'KeyQ', KeyCode.KEY_Q, 'Q', 81, 'VK_Q', empty, empty],
|
||||
[48, 0, ScanCode.KeyR, 'KeyR', KeyCode.KEY_R, 'R', 82, 'VK_R', empty, empty],
|
||||
[49, 0, ScanCode.KeyS, 'KeyS', KeyCode.KEY_S, 'S', 83, 'VK_S', empty, empty],
|
||||
[50, 0, ScanCode.KeyT, 'KeyT', KeyCode.KEY_T, 'T', 84, 'VK_T', empty, empty],
|
||||
[51, 0, ScanCode.KeyU, 'KeyU', KeyCode.KEY_U, 'U', 85, 'VK_U', empty, empty],
|
||||
[52, 0, ScanCode.KeyV, 'KeyV', KeyCode.KEY_V, 'V', 86, 'VK_V', empty, empty],
|
||||
[53, 0, ScanCode.KeyW, 'KeyW', KeyCode.KEY_W, 'W', 87, 'VK_W', empty, empty],
|
||||
[54, 0, ScanCode.KeyX, 'KeyX', KeyCode.KEY_X, 'X', 88, 'VK_X', empty, empty],
|
||||
[55, 0, ScanCode.KeyY, 'KeyY', KeyCode.KEY_Y, 'Y', 89, 'VK_Y', empty, empty],
|
||||
[56, 0, ScanCode.KeyZ, 'KeyZ', KeyCode.KEY_Z, 'Z', 90, 'VK_Z', empty, empty],
|
||||
[22, 0, ScanCode.Digit1, 'Digit1', KeyCode.KEY_1, '1', 49, 'VK_1', empty, empty],
|
||||
[23, 0, ScanCode.Digit2, 'Digit2', KeyCode.KEY_2, '2', 50, 'VK_2', empty, empty],
|
||||
[24, 0, ScanCode.Digit3, 'Digit3', KeyCode.KEY_3, '3', 51, 'VK_3', empty, empty],
|
||||
[25, 0, ScanCode.Digit4, 'Digit4', KeyCode.KEY_4, '4', 52, 'VK_4', empty, empty],
|
||||
[26, 0, ScanCode.Digit5, 'Digit5', KeyCode.KEY_5, '5', 53, 'VK_5', empty, empty],
|
||||
[27, 0, ScanCode.Digit6, 'Digit6', KeyCode.KEY_6, '6', 54, 'VK_6', empty, empty],
|
||||
[28, 0, ScanCode.Digit7, 'Digit7', KeyCode.KEY_7, '7', 55, 'VK_7', empty, empty],
|
||||
[29, 0, ScanCode.Digit8, 'Digit8', KeyCode.KEY_8, '8', 56, 'VK_8', empty, empty],
|
||||
[30, 0, ScanCode.Digit9, 'Digit9', KeyCode.KEY_9, '9', 57, 'VK_9', empty, empty],
|
||||
[21, 0, ScanCode.Digit0, 'Digit0', KeyCode.KEY_0, '0', 48, 'VK_0', empty, empty],
|
||||
[31, 0, ScanCode.KeyA, 'KeyA', KeyCode.KeyA, 'A', 65, 'VK_A', empty, empty],
|
||||
[32, 0, ScanCode.KeyB, 'KeyB', KeyCode.KeyB, 'B', 66, 'VK_B', empty, empty],
|
||||
[33, 0, ScanCode.KeyC, 'KeyC', KeyCode.KeyC, 'C', 67, 'VK_C', empty, empty],
|
||||
[34, 0, ScanCode.KeyD, 'KeyD', KeyCode.KeyD, 'D', 68, 'VK_D', empty, empty],
|
||||
[35, 0, ScanCode.KeyE, 'KeyE', KeyCode.KeyE, 'E', 69, 'VK_E', empty, empty],
|
||||
[36, 0, ScanCode.KeyF, 'KeyF', KeyCode.KeyF, 'F', 70, 'VK_F', empty, empty],
|
||||
[37, 0, ScanCode.KeyG, 'KeyG', KeyCode.KeyG, 'G', 71, 'VK_G', empty, empty],
|
||||
[38, 0, ScanCode.KeyH, 'KeyH', KeyCode.KeyH, 'H', 72, 'VK_H', empty, empty],
|
||||
[39, 0, ScanCode.KeyI, 'KeyI', KeyCode.KeyI, 'I', 73, 'VK_I', empty, empty],
|
||||
[40, 0, ScanCode.KeyJ, 'KeyJ', KeyCode.KeyJ, 'J', 74, 'VK_J', empty, empty],
|
||||
[41, 0, ScanCode.KeyK, 'KeyK', KeyCode.KeyK, 'K', 75, 'VK_K', empty, empty],
|
||||
[42, 0, ScanCode.KeyL, 'KeyL', KeyCode.KeyL, 'L', 76, 'VK_L', empty, empty],
|
||||
[43, 0, ScanCode.KeyM, 'KeyM', KeyCode.KeyM, 'M', 77, 'VK_M', empty, empty],
|
||||
[44, 0, ScanCode.KeyN, 'KeyN', KeyCode.KeyN, 'N', 78, 'VK_N', empty, empty],
|
||||
[45, 0, ScanCode.KeyO, 'KeyO', KeyCode.KeyO, 'O', 79, 'VK_O', empty, empty],
|
||||
[46, 0, ScanCode.KeyP, 'KeyP', KeyCode.KeyP, 'P', 80, 'VK_P', empty, empty],
|
||||
[47, 0, ScanCode.KeyQ, 'KeyQ', KeyCode.KeyQ, 'Q', 81, 'VK_Q', empty, empty],
|
||||
[48, 0, ScanCode.KeyR, 'KeyR', KeyCode.KeyR, 'R', 82, 'VK_R', empty, empty],
|
||||
[49, 0, ScanCode.KeyS, 'KeyS', KeyCode.KeyS, 'S', 83, 'VK_S', empty, empty],
|
||||
[50, 0, ScanCode.KeyT, 'KeyT', KeyCode.KeyT, 'T', 84, 'VK_T', empty, empty],
|
||||
[51, 0, ScanCode.KeyU, 'KeyU', KeyCode.KeyU, 'U', 85, 'VK_U', empty, empty],
|
||||
[52, 0, ScanCode.KeyV, 'KeyV', KeyCode.KeyV, 'V', 86, 'VK_V', empty, empty],
|
||||
[53, 0, ScanCode.KeyW, 'KeyW', KeyCode.KeyW, 'W', 87, 'VK_W', empty, empty],
|
||||
[54, 0, ScanCode.KeyX, 'KeyX', KeyCode.KeyX, 'X', 88, 'VK_X', empty, empty],
|
||||
[55, 0, ScanCode.KeyY, 'KeyY', KeyCode.KeyY, 'Y', 89, 'VK_Y', empty, empty],
|
||||
[56, 0, ScanCode.KeyZ, 'KeyZ', KeyCode.KeyZ, 'Z', 90, 'VK_Z', empty, empty],
|
||||
[22, 0, ScanCode.Digit1, 'Digit1', KeyCode.Digit1, '1', 49, 'VK_1', empty, empty],
|
||||
[23, 0, ScanCode.Digit2, 'Digit2', KeyCode.Digit2, '2', 50, 'VK_2', empty, empty],
|
||||
[24, 0, ScanCode.Digit3, 'Digit3', KeyCode.Digit3, '3', 51, 'VK_3', empty, empty],
|
||||
[25, 0, ScanCode.Digit4, 'Digit4', KeyCode.Digit4, '4', 52, 'VK_4', empty, empty],
|
||||
[26, 0, ScanCode.Digit5, 'Digit5', KeyCode.Digit5, '5', 53, 'VK_5', empty, empty],
|
||||
[27, 0, ScanCode.Digit6, 'Digit6', KeyCode.Digit6, '6', 54, 'VK_6', empty, empty],
|
||||
[28, 0, ScanCode.Digit7, 'Digit7', KeyCode.Digit7, '7', 55, 'VK_7', empty, empty],
|
||||
[29, 0, ScanCode.Digit8, 'Digit8', KeyCode.Digit8, '8', 56, 'VK_8', empty, empty],
|
||||
[30, 0, ScanCode.Digit9, 'Digit9', KeyCode.Digit9, '9', 57, 'VK_9', empty, empty],
|
||||
[21, 0, ScanCode.Digit0, 'Digit0', KeyCode.Digit0, '0', 48, 'VK_0', empty, empty],
|
||||
[3, 1, ScanCode.Enter, 'Enter', KeyCode.Enter, 'Enter', 13, 'VK_RETURN', empty, empty],
|
||||
[9, 1, ScanCode.Escape, 'Escape', KeyCode.Escape, 'Escape', 27, 'VK_ESCAPE', empty, empty],
|
||||
[1, 1, ScanCode.Backspace, 'Backspace', KeyCode.Backspace, 'Backspace', 8, 'VK_BACK', empty, empty],
|
||||
[2, 1, ScanCode.Tab, 'Tab', KeyCode.Tab, 'Tab', 9, 'VK_TAB', empty, empty],
|
||||
[10, 1, ScanCode.Space, 'Space', KeyCode.Space, 'Space', 32, 'VK_SPACE', empty, empty],
|
||||
[83, 0, ScanCode.Minus, 'Minus', KeyCode.US_MINUS, '-', 189, 'VK_OEM_MINUS', '-', 'OEM_MINUS'],
|
||||
[81, 0, ScanCode.Equal, 'Equal', KeyCode.US_EQUAL, '=', 187, 'VK_OEM_PLUS', '=', 'OEM_PLUS'],
|
||||
[87, 0, ScanCode.BracketLeft, 'BracketLeft', KeyCode.US_OPEN_SQUARE_BRACKET, '[', 219, 'VK_OEM_4', '[', 'OEM_4'],
|
||||
[89, 0, ScanCode.BracketRight, 'BracketRight', KeyCode.US_CLOSE_SQUARE_BRACKET, ']', 221, 'VK_OEM_6', ']', 'OEM_6'],
|
||||
[88, 0, ScanCode.Backslash, 'Backslash', KeyCode.US_BACKSLASH, '\\', 220, 'VK_OEM_5', '\\', 'OEM_5'],
|
||||
[0, 0, ScanCode.IntlHash, 'IntlHash', KeyCode.Unknown, empty, 0, empty, empty, empty],
|
||||
[80, 0, ScanCode.Semicolon, 'Semicolon', KeyCode.US_SEMICOLON, ';', 186, 'VK_OEM_1', ';', 'OEM_1'],
|
||||
[90, 0, ScanCode.Quote, 'Quote', KeyCode.US_QUOTE, '\'', 222, 'VK_OEM_7', '\'', 'OEM_7'],
|
||||
[86, 0, ScanCode.Backquote, 'Backquote', KeyCode.US_BACKTICK, '`', 192, 'VK_OEM_3', '`', 'OEM_3'],
|
||||
[82, 0, ScanCode.Comma, 'Comma', KeyCode.US_COMMA, ',', 188, 'VK_OEM_COMMA', ',', 'OEM_COMMA'],
|
||||
[84, 0, ScanCode.Period, 'Period', KeyCode.US_DOT, '.', 190, 'VK_OEM_PERIOD', '.', 'OEM_PERIOD'],
|
||||
[85, 0, ScanCode.Slash, 'Slash', KeyCode.US_SLASH, '/', 191, 'VK_OEM_2', '/', 'OEM_2'],
|
||||
[83, 0, ScanCode.Minus, 'Minus', KeyCode.Minus, '-', 189, 'VK_OEM_MINUS', '-', 'OEM_MINUS'],
|
||||
[81, 0, ScanCode.Equal, 'Equal', KeyCode.Equal, '=', 187, 'VK_OEM_PLUS', '=', 'OEM_PLUS'],
|
||||
[87, 0, ScanCode.BracketLeft, 'BracketLeft', KeyCode.BracketLeft, '[', 219, 'VK_OEM_4', '[', 'OEM_4'],
|
||||
[89, 0, ScanCode.BracketRight, 'BracketRight', KeyCode.BracketRight, ']', 221, 'VK_OEM_6', ']', 'OEM_6'],
|
||||
[88, 0, ScanCode.Backslash, 'Backslash', KeyCode.Backslash, '\\', 220, 'VK_OEM_5', '\\', 'OEM_5'],
|
||||
[0, 0, ScanCode.IntlHash, 'IntlHash', KeyCode.Unknown, empty, 0, empty, empty, empty], // has been dropped from the w3c spec
|
||||
[80, 0, ScanCode.Semicolon, 'Semicolon', KeyCode.Semicolon, ';', 186, 'VK_OEM_1', ';', 'OEM_1'],
|
||||
[90, 0, ScanCode.Quote, 'Quote', KeyCode.Quote, '\'', 222, 'VK_OEM_7', '\'', 'OEM_7'],
|
||||
[86, 0, ScanCode.Backquote, 'Backquote', KeyCode.Backquote, '`', 192, 'VK_OEM_3', '`', 'OEM_3'],
|
||||
[82, 0, ScanCode.Comma, 'Comma', KeyCode.Comma, ',', 188, 'VK_OEM_COMMA', ',', 'OEM_COMMA'],
|
||||
[84, 0, ScanCode.Period, 'Period', KeyCode.Period, '.', 190, 'VK_OEM_PERIOD', '.', 'OEM_PERIOD'],
|
||||
[85, 0, ScanCode.Slash, 'Slash', KeyCode.Slash, '/', 191, 'VK_OEM_2', '/', 'OEM_2'],
|
||||
[8, 1, ScanCode.CapsLock, 'CapsLock', KeyCode.CapsLock, 'CapsLock', 20, 'VK_CAPITAL', empty, empty],
|
||||
[59, 1, ScanCode.F1, 'F1', KeyCode.F1, 'F1', 112, 'VK_F1', empty, empty],
|
||||
[60, 1, ScanCode.F2, 'F2', KeyCode.F2, 'F2', 113, 'VK_F2', empty, empty],
|
||||
|
@ -576,23 +573,23 @@ for (let i = 0; i <= KeyCode.MAX_VALUE; i++) {
|
|||
[18, 1, ScanCode.ArrowDown, 'ArrowDown', KeyCode.DownArrow, 'DownArrow', 40, 'VK_DOWN', 'Down', empty],
|
||||
[16, 1, ScanCode.ArrowUp, 'ArrowUp', KeyCode.UpArrow, 'UpArrow', 38, 'VK_UP', 'Up', empty],
|
||||
[78, 1, ScanCode.NumLock, 'NumLock', KeyCode.NumLock, 'NumLock', 144, 'VK_NUMLOCK', empty, empty],
|
||||
[108, 1, ScanCode.NumpadDivide, 'NumpadDivide', KeyCode.NUMPAD_DIVIDE, 'NumPad_Divide', 111, 'VK_DIVIDE', empty, empty],
|
||||
[103, 1, ScanCode.NumpadMultiply, 'NumpadMultiply', KeyCode.NUMPAD_MULTIPLY, 'NumPad_Multiply', 106, 'VK_MULTIPLY', empty, empty],
|
||||
[106, 1, ScanCode.NumpadSubtract, 'NumpadSubtract', KeyCode.NUMPAD_SUBTRACT, 'NumPad_Subtract', 109, 'VK_SUBTRACT', empty, empty],
|
||||
[104, 1, ScanCode.NumpadAdd, 'NumpadAdd', KeyCode.NUMPAD_ADD, 'NumPad_Add', 107, 'VK_ADD', empty, empty],
|
||||
[108, 1, ScanCode.NumpadDivide, 'NumpadDivide', KeyCode.NumpadDivide, 'NumPad_Divide', 111, 'VK_DIVIDE', empty, empty],
|
||||
[103, 1, ScanCode.NumpadMultiply, 'NumpadMultiply', KeyCode.NumpadMultiply, 'NumPad_Multiply', 106, 'VK_MULTIPLY', empty, empty],
|
||||
[106, 1, ScanCode.NumpadSubtract, 'NumpadSubtract', KeyCode.NumpadSubtract, 'NumPad_Subtract', 109, 'VK_SUBTRACT', empty, empty],
|
||||
[104, 1, ScanCode.NumpadAdd, 'NumpadAdd', KeyCode.NumpadAdd, 'NumPad_Add', 107, 'VK_ADD', empty, empty],
|
||||
[3, 1, ScanCode.NumpadEnter, 'NumpadEnter', KeyCode.Enter, empty, 0, empty, empty, empty],
|
||||
[94, 1, ScanCode.Numpad1, 'Numpad1', KeyCode.NUMPAD_1, 'NumPad1', 97, 'VK_NUMPAD1', empty, empty],
|
||||
[95, 1, ScanCode.Numpad2, 'Numpad2', KeyCode.NUMPAD_2, 'NumPad2', 98, 'VK_NUMPAD2', empty, empty],
|
||||
[96, 1, ScanCode.Numpad3, 'Numpad3', KeyCode.NUMPAD_3, 'NumPad3', 99, 'VK_NUMPAD3', empty, empty],
|
||||
[97, 1, ScanCode.Numpad4, 'Numpad4', KeyCode.NUMPAD_4, 'NumPad4', 100, 'VK_NUMPAD4', empty, empty],
|
||||
[98, 1, ScanCode.Numpad5, 'Numpad5', KeyCode.NUMPAD_5, 'NumPad5', 101, 'VK_NUMPAD5', empty, empty],
|
||||
[99, 1, ScanCode.Numpad6, 'Numpad6', KeyCode.NUMPAD_6, 'NumPad6', 102, 'VK_NUMPAD6', empty, empty],
|
||||
[100, 1, ScanCode.Numpad7, 'Numpad7', KeyCode.NUMPAD_7, 'NumPad7', 103, 'VK_NUMPAD7', empty, empty],
|
||||
[101, 1, ScanCode.Numpad8, 'Numpad8', KeyCode.NUMPAD_8, 'NumPad8', 104, 'VK_NUMPAD8', empty, empty],
|
||||
[102, 1, ScanCode.Numpad9, 'Numpad9', KeyCode.NUMPAD_9, 'NumPad9', 105, 'VK_NUMPAD9', empty, empty],
|
||||
[93, 1, ScanCode.Numpad0, 'Numpad0', KeyCode.NUMPAD_0, 'NumPad0', 96, 'VK_NUMPAD0', empty, empty],
|
||||
[107, 1, ScanCode.NumpadDecimal, 'NumpadDecimal', KeyCode.NUMPAD_DECIMAL, 'NumPad_Decimal', 110, 'VK_DECIMAL', empty, empty],
|
||||
[92, 0, ScanCode.IntlBackslash, 'IntlBackslash', KeyCode.OEM_102, 'OEM_102', 226, 'VK_OEM_102', empty, empty],
|
||||
[94, 1, ScanCode.Numpad1, 'Numpad1', KeyCode.Numpad1, 'NumPad1', 97, 'VK_NUMPAD1', empty, empty],
|
||||
[95, 1, ScanCode.Numpad2, 'Numpad2', KeyCode.Numpad2, 'NumPad2', 98, 'VK_NUMPAD2', empty, empty],
|
||||
[96, 1, ScanCode.Numpad3, 'Numpad3', KeyCode.Numpad3, 'NumPad3', 99, 'VK_NUMPAD3', empty, empty],
|
||||
[97, 1, ScanCode.Numpad4, 'Numpad4', KeyCode.Numpad4, 'NumPad4', 100, 'VK_NUMPAD4', empty, empty],
|
||||
[98, 1, ScanCode.Numpad5, 'Numpad5', KeyCode.Numpad5, 'NumPad5', 101, 'VK_NUMPAD5', empty, empty],
|
||||
[99, 1, ScanCode.Numpad6, 'Numpad6', KeyCode.Numpad6, 'NumPad6', 102, 'VK_NUMPAD6', empty, empty],
|
||||
[100, 1, ScanCode.Numpad7, 'Numpad7', KeyCode.Numpad7, 'NumPad7', 103, 'VK_NUMPAD7', empty, empty],
|
||||
[101, 1, ScanCode.Numpad8, 'Numpad8', KeyCode.Numpad8, 'NumPad8', 104, 'VK_NUMPAD8', empty, empty],
|
||||
[102, 1, ScanCode.Numpad9, 'Numpad9', KeyCode.Numpad9, 'NumPad9', 105, 'VK_NUMPAD9', empty, empty],
|
||||
[93, 1, ScanCode.Numpad0, 'Numpad0', KeyCode.Numpad0, 'NumPad0', 96, 'VK_NUMPAD0', empty, empty],
|
||||
[107, 1, ScanCode.NumpadDecimal, 'NumpadDecimal', KeyCode.NumpadDecimal, 'NumPad_Decimal', 110, 'VK_DECIMAL', empty, empty],
|
||||
[92, 0, ScanCode.IntlBackslash, 'IntlBackslash', KeyCode.IntlBackslash, 'OEM_102', 226, 'VK_OEM_102', empty, empty],
|
||||
[58, 1, ScanCode.ContextMenu, 'ContextMenu', KeyCode.ContextMenu, 'ContextMenu', 93, empty, empty, empty],
|
||||
[0, 1, ScanCode.Power, 'Power', KeyCode.Unknown, empty, 0, empty, empty, empty],
|
||||
[0, 1, ScanCode.NumpadEqual, 'NumpadEqual', KeyCode.Unknown, empty, 0, empty, empty, empty],
|
||||
|
@ -683,6 +680,9 @@ for (let i = 0; i <= KeyCode.MAX_VALUE; i++) {
|
|||
[0, 1, ScanCode.MailReply, 'MailReply', KeyCode.Unknown, empty, 0, empty, empty, empty],
|
||||
[0, 1, ScanCode.MailForward, 'MailForward', KeyCode.Unknown, empty, 0, empty, empty, empty],
|
||||
[0, 1, ScanCode.MailSend, 'MailSend', KeyCode.Unknown, empty, 0, empty, empty, empty],
|
||||
|
||||
// See https://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html
|
||||
// If an Input Method Editor is processing key input and the event is keydown, return 229.
|
||||
[109, 1, ScanCode.None, empty, KeyCode.KEY_IN_COMPOSITION, 'KeyInComposition', 229, empty, empty, empty],
|
||||
[111, 1, ScanCode.None, empty, KeyCode.ABNT_C2, 'ABNT_C2', 194, 'VK_ABNT_C2', empty, empty],
|
||||
[91, 1, ScanCode.None, empty, KeyCode.OEM_8, 'OEM_8', 223, 'VK_OEM_8', empty, empty],
|
||||
|
@ -781,7 +781,7 @@ export namespace KeyCodeUtils {
|
|||
}
|
||||
|
||||
export function toElectronAccelerator(keyCode: KeyCode): string | null {
|
||||
if (keyCode >= KeyCode.NUMPAD_0 && keyCode <= KeyCode.NUMPAD_DIVIDE) {
|
||||
if (keyCode >= KeyCode.Numpad0 && keyCode <= KeyCode.NumpadDivide) {
|
||||
// [Electron Accelerators] Electron is able to parse numpad keys, but unfortunately it
|
||||
// renders them just as regular keys in menus. For example, num0 is rendered as "0",
|
||||
// numdiv is rendered as "/", numsub is rendered as "-".
|
||||
|
|
|
@ -294,7 +294,7 @@ export class QuickInputList {
|
|||
case KeyCode.Space:
|
||||
this.toggleCheckbox();
|
||||
break;
|
||||
case KeyCode.KEY_A:
|
||||
case KeyCode.KeyA:
|
||||
if (platform.isMacintosh ? e.metaKey : e.ctrlKey) {
|
||||
this.list.setFocus(range(this.list.length));
|
||||
}
|
||||
|
|
|
@ -16,20 +16,20 @@ suite('keyCodes', () => {
|
|||
|
||||
test('mapping for Minus', () => {
|
||||
// [147, 83, 0, ScanCode.Minus, 'Minus', KeyCode.US_MINUS, '-', 189, 'VK_OEM_MINUS', '-', 'OEM_MINUS'],
|
||||
assert.strictEqual(EVENT_KEY_CODE_MAP[189], KeyCode.US_MINUS);
|
||||
assert.strictEqual(NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE['VK_OEM_MINUS'], KeyCode.US_MINUS);
|
||||
assert.strictEqual(EVENT_KEY_CODE_MAP[189], KeyCode.Minus);
|
||||
assert.strictEqual(NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE['VK_OEM_MINUS'], KeyCode.Minus);
|
||||
assert.strictEqual(ScanCodeUtils.lowerCaseToEnum('minus'), ScanCode.Minus);
|
||||
assert.strictEqual(ScanCodeUtils.toEnum('Minus'), ScanCode.Minus);
|
||||
assert.strictEqual(ScanCodeUtils.toString(ScanCode.Minus), 'Minus');
|
||||
assert.strictEqual(IMMUTABLE_CODE_TO_KEY_CODE[ScanCode.Minus], KeyCode.DependsOnKbLayout);
|
||||
assert.strictEqual(IMMUTABLE_KEY_CODE_TO_CODE[KeyCode.US_MINUS], ScanCode.DependsOnKbLayout);
|
||||
assert.strictEqual(KeyCodeUtils.toString(KeyCode.US_MINUS), '-');
|
||||
assert.strictEqual(KeyCodeUtils.fromString('-'), KeyCode.US_MINUS);
|
||||
assert.strictEqual(KeyCodeUtils.toUserSettingsUS(KeyCode.US_MINUS), '-');
|
||||
assert.strictEqual(KeyCodeUtils.toUserSettingsGeneral(KeyCode.US_MINUS), 'OEM_MINUS');
|
||||
assert.strictEqual(KeyCodeUtils.fromUserSettings('-'), KeyCode.US_MINUS);
|
||||
assert.strictEqual(KeyCodeUtils.fromUserSettings('OEM_MINUS'), KeyCode.US_MINUS);
|
||||
assert.strictEqual(KeyCodeUtils.fromUserSettings('oem_minus'), KeyCode.US_MINUS);
|
||||
assert.strictEqual(IMMUTABLE_KEY_CODE_TO_CODE[KeyCode.Minus], ScanCode.DependsOnKbLayout);
|
||||
assert.strictEqual(KeyCodeUtils.toString(KeyCode.Minus), '-');
|
||||
assert.strictEqual(KeyCodeUtils.fromString('-'), KeyCode.Minus);
|
||||
assert.strictEqual(KeyCodeUtils.toUserSettingsUS(KeyCode.Minus), '-');
|
||||
assert.strictEqual(KeyCodeUtils.toUserSettingsGeneral(KeyCode.Minus), 'OEM_MINUS');
|
||||
assert.strictEqual(KeyCodeUtils.fromUserSettings('-'), KeyCode.Minus);
|
||||
assert.strictEqual(KeyCodeUtils.fromUserSettings('OEM_MINUS'), KeyCode.Minus);
|
||||
assert.strictEqual(KeyCodeUtils.fromUserSettings('oem_minus'), KeyCode.Minus);
|
||||
});
|
||||
|
||||
test('mapping for Space', () => {
|
||||
|
@ -82,10 +82,10 @@ suite('keyCodes', () => {
|
|||
);
|
||||
test(
|
||||
new ChordKeybinding([
|
||||
new SimpleKeybinding(false, false, false, true, KeyCode.KEY_Y),
|
||||
new SimpleKeybinding(false, false, false, false, KeyCode.KEY_Z)
|
||||
new SimpleKeybinding(false, false, false, true, KeyCode.KeyY),
|
||||
new SimpleKeybinding(false, false, false, false, KeyCode.KeyZ)
|
||||
]),
|
||||
KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_Y, KeyCode.KEY_Z)
|
||||
KeyChord(KeyMod.CtrlCmd | KeyCode.KeyY, KeyCode.KeyZ)
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -124,10 +124,10 @@ suite('keyCodes', () => {
|
|||
);
|
||||
test(
|
||||
new ChordKeybinding([
|
||||
new SimpleKeybinding(true, false, false, false, KeyCode.KEY_Y),
|
||||
new SimpleKeybinding(false, false, false, false, KeyCode.KEY_Z)
|
||||
new SimpleKeybinding(true, false, false, false, KeyCode.KeyY),
|
||||
new SimpleKeybinding(false, false, false, false, KeyCode.KeyZ)
|
||||
]),
|
||||
KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_Y, KeyCode.KEY_Z)
|
||||
KeyChord(KeyMod.CtrlCmd | KeyCode.KeyY, KeyCode.KeyZ)
|
||||
);
|
||||
|
||||
});
|
||||
|
|
|
@ -625,7 +625,7 @@ export namespace CoreNavigationCommands {
|
|||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyCode.LeftArrow,
|
||||
mac: { primary: KeyCode.LeftArrow, secondary: [KeyMod.WinCtrl | KeyCode.KEY_B] }
|
||||
mac: { primary: KeyCode.LeftArrow, secondary: [KeyMod.WinCtrl | KeyCode.KeyB] }
|
||||
}
|
||||
}));
|
||||
|
||||
|
@ -658,7 +658,7 @@ export namespace CoreNavigationCommands {
|
|||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyCode.RightArrow,
|
||||
mac: { primary: KeyCode.RightArrow, secondary: [KeyMod.WinCtrl | KeyCode.KEY_F] }
|
||||
mac: { primary: KeyCode.RightArrow, secondary: [KeyMod.WinCtrl | KeyCode.KeyF] }
|
||||
}
|
||||
}));
|
||||
|
||||
|
@ -691,7 +691,7 @@ export namespace CoreNavigationCommands {
|
|||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyCode.UpArrow,
|
||||
mac: { primary: KeyCode.UpArrow, secondary: [KeyMod.WinCtrl | KeyCode.KEY_P] }
|
||||
mac: { primary: KeyCode.UpArrow, secondary: [KeyMod.WinCtrl | KeyCode.KeyP] }
|
||||
}
|
||||
}));
|
||||
|
||||
|
@ -759,7 +759,7 @@ export namespace CoreNavigationCommands {
|
|||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyCode.DownArrow,
|
||||
mac: { primary: KeyCode.DownArrow, secondary: [KeyMod.WinCtrl | KeyCode.KEY_N] }
|
||||
mac: { primary: KeyCode.DownArrow, secondary: [KeyMod.WinCtrl | KeyCode.KeyN] }
|
||||
}
|
||||
}));
|
||||
|
||||
|
@ -979,7 +979,7 @@ export namespace CoreNavigationCommands {
|
|||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: 0,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_A }
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KeyA }
|
||||
}
|
||||
}));
|
||||
|
||||
|
@ -991,7 +991,7 @@ export namespace CoreNavigationCommands {
|
|||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: 0,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_A }
|
||||
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KeyA }
|
||||
}
|
||||
}));
|
||||
|
||||
|
@ -1112,7 +1112,7 @@ export namespace CoreNavigationCommands {
|
|||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: 0,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_E }
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KeyE }
|
||||
}
|
||||
}));
|
||||
|
||||
|
@ -1124,7 +1124,7 @@ export namespace CoreNavigationCommands {
|
|||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: 0,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_E }
|
||||
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KeyE }
|
||||
}
|
||||
}));
|
||||
|
||||
|
@ -1526,7 +1526,7 @@ export namespace CoreNavigationCommands {
|
|||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_L
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyL
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1749,7 +1749,7 @@ export namespace CoreEditingCommands {
|
|||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: 0,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_O }
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KeyO }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1816,7 +1816,7 @@ export namespace CoreEditingCommands {
|
|||
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] }
|
||||
mac: { primary: KeyCode.Backspace, secondary: [KeyMod.Shift | KeyCode.Backspace, KeyMod.WinCtrl | KeyCode.KeyH, KeyMod.WinCtrl | KeyCode.Backspace] }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1840,7 +1840,7 @@ export namespace CoreEditingCommands {
|
|||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyCode.Delete,
|
||||
mac: { primary: KeyCode.Delete, secondary: [KeyMod.WinCtrl | KeyCode.KEY_D, KeyMod.WinCtrl | KeyCode.Delete] }
|
||||
mac: { primary: KeyCode.Delete, secondary: [KeyMod.WinCtrl | KeyCode.KeyD, KeyMod.WinCtrl | KeyCode.Delete] }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -593,7 +593,7 @@ export const UndoCommand = registerCommand(new MultiCommand({
|
|||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: KeybindingWeight.EditorCore,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_Z
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyZ
|
||||
},
|
||||
menuOpts: [{
|
||||
menuId: MenuId.MenubarEditMenu,
|
||||
|
@ -615,9 +615,9 @@ export const RedoCommand = registerCommand(new MultiCommand({
|
|||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: KeybindingWeight.EditorCore,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_Y,
|
||||
secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_Z],
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_Z }
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyY,
|
||||
secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyZ],
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyZ }
|
||||
},
|
||||
menuOpts: [{
|
||||
menuId: MenuId.MenubarEditMenu,
|
||||
|
@ -640,7 +640,7 @@ export const SelectAllCommand = registerCommand(new MultiCommand({
|
|||
kbOpts: {
|
||||
weight: KeybindingWeight.EditorCore,
|
||||
kbExpr: null,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_A
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyA
|
||||
},
|
||||
menuOpts: [{
|
||||
menuId: MenuId.MenubarSelectionMenu,
|
||||
|
|
|
@ -408,42 +408,42 @@ export enum KeyCode {
|
|||
DownArrow = 18,
|
||||
Insert = 19,
|
||||
Delete = 20,
|
||||
KEY_0 = 21,
|
||||
KEY_1 = 22,
|
||||
KEY_2 = 23,
|
||||
KEY_3 = 24,
|
||||
KEY_4 = 25,
|
||||
KEY_5 = 26,
|
||||
KEY_6 = 27,
|
||||
KEY_7 = 28,
|
||||
KEY_8 = 29,
|
||||
KEY_9 = 30,
|
||||
KEY_A = 31,
|
||||
KEY_B = 32,
|
||||
KEY_C = 33,
|
||||
KEY_D = 34,
|
||||
KEY_E = 35,
|
||||
KEY_F = 36,
|
||||
KEY_G = 37,
|
||||
KEY_H = 38,
|
||||
KEY_I = 39,
|
||||
KEY_J = 40,
|
||||
KEY_K = 41,
|
||||
KEY_L = 42,
|
||||
KEY_M = 43,
|
||||
KEY_N = 44,
|
||||
KEY_O = 45,
|
||||
KEY_P = 46,
|
||||
KEY_Q = 47,
|
||||
KEY_R = 48,
|
||||
KEY_S = 49,
|
||||
KEY_T = 50,
|
||||
KEY_U = 51,
|
||||
KEY_V = 52,
|
||||
KEY_W = 53,
|
||||
KEY_X = 54,
|
||||
KEY_Y = 55,
|
||||
KEY_Z = 56,
|
||||
Digit0 = 21,
|
||||
Digit1 = 22,
|
||||
Digit2 = 23,
|
||||
Digit3 = 24,
|
||||
Digit4 = 25,
|
||||
Digit5 = 26,
|
||||
Digit6 = 27,
|
||||
Digit7 = 28,
|
||||
Digit8 = 29,
|
||||
Digit9 = 30,
|
||||
KeyA = 31,
|
||||
KeyB = 32,
|
||||
KeyC = 33,
|
||||
KeyD = 34,
|
||||
KeyE = 35,
|
||||
KeyF = 36,
|
||||
KeyG = 37,
|
||||
KeyH = 38,
|
||||
KeyI = 39,
|
||||
KeyJ = 40,
|
||||
KeyK = 41,
|
||||
KeyL = 42,
|
||||
KeyM = 43,
|
||||
KeyN = 44,
|
||||
KeyO = 45,
|
||||
KeyP = 46,
|
||||
KeyQ = 47,
|
||||
KeyR = 48,
|
||||
KeyS = 49,
|
||||
KeyT = 50,
|
||||
KeyU = 51,
|
||||
KeyV = 52,
|
||||
KeyW = 53,
|
||||
KeyX = 54,
|
||||
KeyY = 55,
|
||||
KeyZ = 56,
|
||||
Meta = 57,
|
||||
ContextMenu = 58,
|
||||
F1 = 59,
|
||||
|
@ -471,57 +471,57 @@ export enum KeyCode {
|
|||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the ';:' key
|
||||
*/
|
||||
US_SEMICOLON = 80,
|
||||
Semicolon = 80,
|
||||
/**
|
||||
* For any country/region, the '+' key
|
||||
* For the US standard keyboard, the '=+' key
|
||||
*/
|
||||
US_EQUAL = 81,
|
||||
Equal = 81,
|
||||
/**
|
||||
* For any country/region, the ',' key
|
||||
* For the US standard keyboard, the ',<' key
|
||||
*/
|
||||
US_COMMA = 82,
|
||||
Comma = 82,
|
||||
/**
|
||||
* For any country/region, the '-' key
|
||||
* For the US standard keyboard, the '-_' key
|
||||
*/
|
||||
US_MINUS = 83,
|
||||
Minus = 83,
|
||||
/**
|
||||
* For any country/region, the '.' key
|
||||
* For the US standard keyboard, the '.>' key
|
||||
*/
|
||||
US_DOT = 84,
|
||||
Period = 84,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the '/?' key
|
||||
*/
|
||||
US_SLASH = 85,
|
||||
Slash = 85,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the '`~' key
|
||||
*/
|
||||
US_BACKTICK = 86,
|
||||
Backquote = 86,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the '[{' key
|
||||
*/
|
||||
US_OPEN_SQUARE_BRACKET = 87,
|
||||
BracketLeft = 87,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the '\|' key
|
||||
*/
|
||||
US_BACKSLASH = 88,
|
||||
Backslash = 88,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the ']}' key
|
||||
*/
|
||||
US_CLOSE_SQUARE_BRACKET = 89,
|
||||
BracketRight = 89,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the ''"' key
|
||||
*/
|
||||
US_QUOTE = 90,
|
||||
Quote = 90,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
*/
|
||||
|
@ -529,23 +529,23 @@ export enum KeyCode {
|
|||
/**
|
||||
* Either the angle bracket key or the backslash key on the RT 102-key keyboard.
|
||||
*/
|
||||
OEM_102 = 92,
|
||||
NUMPAD_0 = 93,
|
||||
NUMPAD_1 = 94,
|
||||
NUMPAD_2 = 95,
|
||||
NUMPAD_3 = 96,
|
||||
NUMPAD_4 = 97,
|
||||
NUMPAD_5 = 98,
|
||||
NUMPAD_6 = 99,
|
||||
NUMPAD_7 = 100,
|
||||
NUMPAD_8 = 101,
|
||||
NUMPAD_9 = 102,
|
||||
NUMPAD_MULTIPLY = 103,
|
||||
NUMPAD_ADD = 104,
|
||||
IntlBackslash = 92,
|
||||
Numpad0 = 93,
|
||||
Numpad1 = 94,
|
||||
Numpad2 = 95,
|
||||
Numpad3 = 96,
|
||||
Numpad4 = 97,
|
||||
Numpad5 = 98,
|
||||
Numpad6 = 99,
|
||||
Numpad7 = 100,
|
||||
Numpad8 = 101,
|
||||
Numpad9 = 102,
|
||||
NumpadMultiply = 103,
|
||||
NumpadAdd = 104,
|
||||
NUMPAD_SEPARATOR = 105,
|
||||
NUMPAD_SUBTRACT = 106,
|
||||
NUMPAD_DECIMAL = 107,
|
||||
NUMPAD_DIVIDE = 108,
|
||||
NumpadSubtract = 106,
|
||||
NumpadDecimal = 107,
|
||||
NumpadDivide = 108,
|
||||
/**
|
||||
* Cover all key codes when IME is processing input.
|
||||
*/
|
||||
|
|
|
@ -102,7 +102,7 @@ class SetSelectionAnchor extends EditorAction {
|
|||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_B),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyB),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -139,7 +139,7 @@ class SelectFromAnchorToCursor extends EditorAction {
|
|||
precondition: SelectionAnchorSet,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_K),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyK),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
|
|
@ -35,7 +35,7 @@ class JumpToBracketAction extends EditorAction {
|
|||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_BACKSLASH,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Backslash,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
|
|
@ -26,7 +26,7 @@ class TransposeLettersAction extends EditorAction {
|
|||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: 0,
|
||||
mac: {
|
||||
primary: KeyMod.WinCtrl | KeyCode.KEY_T
|
||||
primary: KeyMod.WinCtrl | KeyCode.KeyT
|
||||
},
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
|
|
|
@ -40,8 +40,8 @@ export const CutAction = supportsCut ? registerCommand(new MultiCommand({
|
|||
// Do not bind cut keybindings in the browser,
|
||||
// since browsers do that for us and it avoids security prompts
|
||||
platform.isNative ? {
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_X,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_X, secondary: [KeyMod.Shift | KeyCode.Delete] },
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyX,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KeyX, secondary: [KeyMod.Shift | KeyCode.Delete] },
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
} : undefined
|
||||
),
|
||||
|
@ -77,8 +77,8 @@ export const CopyAction = supportsCopy ? registerCommand(new MultiCommand({
|
|||
// Do not bind copy keybindings in the browser,
|
||||
// since browsers do that for us and it avoids security prompts
|
||||
platform.isNative ? {
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_C,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_C, secondary: [KeyMod.CtrlCmd | KeyCode.Insert] },
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyC,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KeyC, secondary: [KeyMod.CtrlCmd | KeyCode.Insert] },
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
} : undefined
|
||||
),
|
||||
|
@ -115,9 +115,9 @@ export const PasteAction = supportsPaste ? registerCommand(new MultiCommand({
|
|||
// Do not bind paste keybindings in the browser,
|
||||
// since browsers do that for us and it avoids security prompts
|
||||
platform.isNative ? {
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_V,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_V, secondary: [KeyMod.Shift | KeyCode.Insert] },
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyCode.KEY_V, secondary: [KeyMod.Shift | KeyCode.Insert] },
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyV,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KeyV, secondary: [KeyMod.Shift | KeyCode.Insert] },
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyCode.KeyV, secondary: [KeyMod.Shift | KeyCode.Insert] },
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
} : undefined
|
||||
),
|
||||
|
|
|
@ -218,7 +218,7 @@ export class QuickFixAction extends EditorAction {
|
|||
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCodeActionsProvider),
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.US_DOT,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.Period,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -275,9 +275,9 @@ export class RefactorAction extends EditorAction {
|
|||
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCodeActionsProvider),
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_R,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyR,
|
||||
mac: {
|
||||
primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_R
|
||||
primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KeyR
|
||||
},
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
},
|
||||
|
@ -372,7 +372,7 @@ export class OrganizeImportsAction extends EditorAction {
|
|||
contextKeyForSupportedActions(CodeActionKind.SourceOrganizeImports)),
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_O,
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KeyO,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
},
|
||||
});
|
||||
|
@ -421,9 +421,9 @@ export class AutoFixAction extends EditorAction {
|
|||
contextKeyForSupportedActions(CodeActionKind.QuickFix)),
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.Alt | KeyMod.Shift | KeyCode.US_DOT,
|
||||
primary: KeyMod.Alt | KeyMod.Shift | KeyCode.Period,
|
||||
mac: {
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.US_DOT
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Period
|
||||
},
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
|
|
|
@ -15,17 +15,17 @@ import { USLayoutResolvedKeybinding } from 'vs/platform/keybinding/common/usLayo
|
|||
|
||||
suite('CodeActionKeybindingResolver', () => {
|
||||
const refactorKeybinding = createCodeActionKeybinding(
|
||||
KeyCode.KEY_A,
|
||||
KeyCode.KeyA,
|
||||
refactorCommandId,
|
||||
{ kind: CodeActionKind.Refactor.value });
|
||||
|
||||
const refactorExtractKeybinding = createCodeActionKeybinding(
|
||||
KeyCode.KEY_B,
|
||||
KeyCode.KeyB,
|
||||
refactorCommandId,
|
||||
{ kind: CodeActionKind.Refactor.append('extract').value });
|
||||
|
||||
const organizeImportsKeybinding = createCodeActionKeybinding(
|
||||
KeyCode.KEY_C,
|
||||
KeyCode.KeyC,
|
||||
organizeImportsCommandId,
|
||||
undefined);
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ class ToggleCommentLineAction extends CommentLineAction {
|
|||
precondition: EditorContextKeys.writable,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.US_SLASH,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.Slash,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
},
|
||||
menuOpts: {
|
||||
|
@ -105,7 +105,7 @@ class AddLineCommentAction extends CommentLineAction {
|
|||
precondition: EditorContextKeys.writable,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_C),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyC),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -121,7 +121,7 @@ class RemoveLineCommentAction extends CommentLineAction {
|
|||
precondition: EditorContextKeys.writable,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_U),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyU),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -138,8 +138,8 @@ class BlockCommentAction extends EditorAction {
|
|||
precondition: EditorContextKeys.writable,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A,
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_A },
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KeyA,
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyA },
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
},
|
||||
menuOpts: {
|
||||
|
|
|
@ -134,7 +134,7 @@ export class CursorUndo extends EditorAction {
|
|||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_U,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyU,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
|
|
@ -492,7 +492,7 @@ export const StartFindAction = registerMultiEditorAction(new MultiEditorAction({
|
|||
precondition: ContextKeyExpr.or(EditorContextKeys.focus, ContextKeyExpr.has('editorIsOpen')),
|
||||
kbOpts: {
|
||||
kbExpr: null,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_F,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyF,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
},
|
||||
menuOpts: {
|
||||
|
@ -532,7 +532,7 @@ export class StartFindWithSelectionAction extends EditorAction {
|
|||
kbExpr: null,
|
||||
primary: 0,
|
||||
mac: {
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_E,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyE,
|
||||
},
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
|
@ -589,7 +589,7 @@ export class NextMatchFindAction extends MatchFindAction {
|
|||
kbOpts: [{
|
||||
kbExpr: EditorContextKeys.focus,
|
||||
primary: KeyCode.F3,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyCode.KEY_G, secondary: [KeyCode.F3] },
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyCode.KeyG, secondary: [KeyCode.F3] },
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}, {
|
||||
kbExpr: ContextKeyExpr.and(EditorContextKeys.focus, CONTEXT_FIND_INPUT_FOCUSED),
|
||||
|
@ -621,7 +621,7 @@ export class PreviousMatchFindAction extends MatchFindAction {
|
|||
kbOpts: [{
|
||||
kbExpr: EditorContextKeys.focus,
|
||||
primary: KeyMod.Shift | KeyCode.F3,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_G, secondary: [KeyMod.Shift | KeyCode.F3] },
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyG, secondary: [KeyMod.Shift | KeyCode.F3] },
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}, {
|
||||
kbExpr: ContextKeyExpr.and(EditorContextKeys.focus, CONTEXT_FIND_INPUT_FOCUSED),
|
||||
|
@ -719,8 +719,8 @@ export const StartFindReplaceAction = registerMultiEditorAction(new MultiEditorA
|
|||
precondition: ContextKeyExpr.or(EditorContextKeys.focus, ContextKeyExpr.has('editorIsOpen')),
|
||||
kbOpts: {
|
||||
kbExpr: null,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_H,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_F },
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyH,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyF },
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
},
|
||||
menuOpts: {
|
||||
|
@ -869,7 +869,7 @@ registerEditorCommand(new FindCommand({
|
|||
kbOpts: {
|
||||
weight: KeybindingWeight.EditorContrib + 5,
|
||||
kbExpr: EditorContextKeys.focus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_1
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Digit1
|
||||
}
|
||||
}));
|
||||
|
||||
|
|
|
@ -32,24 +32,24 @@ export const CONTEXT_FIND_INPUT_FOCUSED = new RawContextKey<boolean>('findInputF
|
|||
export const CONTEXT_REPLACE_INPUT_FOCUSED = new RawContextKey<boolean>('replaceInputFocussed', false);
|
||||
|
||||
export const ToggleCaseSensitiveKeybinding: IKeybindings = {
|
||||
primary: KeyMod.Alt | KeyCode.KEY_C,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_C }
|
||||
primary: KeyMod.Alt | KeyCode.KeyC,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyC }
|
||||
};
|
||||
export const ToggleWholeWordKeybinding: IKeybindings = {
|
||||
primary: KeyMod.Alt | KeyCode.KEY_W,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_W }
|
||||
primary: KeyMod.Alt | KeyCode.KeyW,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyW }
|
||||
};
|
||||
export const ToggleRegexKeybinding: IKeybindings = {
|
||||
primary: KeyMod.Alt | KeyCode.KEY_R,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_R }
|
||||
primary: KeyMod.Alt | KeyCode.KeyR,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyR }
|
||||
};
|
||||
export const ToggleSearchScopeKeybinding: IKeybindings = {
|
||||
primary: KeyMod.Alt | KeyCode.KEY_L,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_L }
|
||||
primary: KeyMod.Alt | KeyCode.KeyL,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyL }
|
||||
};
|
||||
export const TogglePreserveCaseKeybinding: IKeybindings = {
|
||||
primary: KeyMod.Alt | KeyCode.KEY_P,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_P }
|
||||
primary: KeyMod.Alt | KeyCode.KeyP,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyP }
|
||||
};
|
||||
|
||||
export const FIND_IDS = {
|
||||
|
|
|
@ -575,9 +575,9 @@ class UnfoldAction extends FoldingAction<FoldingArguments> {
|
|||
precondition: CONTEXT_FOLDING_ENABLED,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_CLOSE_SQUARE_BRACKET,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.BracketRight,
|
||||
mac: {
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.US_CLOSE_SQUARE_BRACKET
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.BracketRight
|
||||
},
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
},
|
||||
|
@ -639,7 +639,7 @@ class UnFoldRecursivelyAction extends FoldingAction<void> {
|
|||
precondition: CONTEXT_FOLDING_ENABLED,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.US_CLOSE_SQUARE_BRACKET),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.BracketRight),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -660,9 +660,9 @@ class FoldAction extends FoldingAction<FoldingArguments> {
|
|||
precondition: CONTEXT_FOLDING_ENABLED,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_OPEN_SQUARE_BRACKET,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.BracketLeft,
|
||||
mac: {
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.US_OPEN_SQUARE_BRACKET
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.BracketLeft
|
||||
},
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
},
|
||||
|
@ -732,7 +732,7 @@ class ToggleFoldAction extends FoldingAction<void> {
|
|||
precondition: CONTEXT_FOLDING_ENABLED,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_L),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyL),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -755,7 +755,7 @@ class FoldRecursivelyAction extends FoldingAction<void> {
|
|||
precondition: CONTEXT_FOLDING_ENABLED,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.US_OPEN_SQUARE_BRACKET),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.BracketLeft),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -777,7 +777,7 @@ class FoldAllBlockCommentsAction extends FoldingAction<void> {
|
|||
precondition: CONTEXT_FOLDING_ENABLED,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.US_SLASH),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.Slash),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -810,7 +810,7 @@ class FoldAllRegionsAction extends FoldingAction<void> {
|
|||
precondition: CONTEXT_FOLDING_ENABLED,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_8),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.Digit8),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -843,7 +843,7 @@ class UnfoldAllRegionsAction extends FoldingAction<void> {
|
|||
precondition: CONTEXT_FOLDING_ENABLED,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_9),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.Digit9),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -876,7 +876,7 @@ class FoldAllRegionsExceptAction extends FoldingAction<void> {
|
|||
precondition: CONTEXT_FOLDING_ENABLED,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.US_MINUS),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.Minus),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -899,7 +899,7 @@ class UnfoldAllRegionsExceptAction extends FoldingAction<void> {
|
|||
precondition: CONTEXT_FOLDING_ENABLED,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.US_EQUAL),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.Equal),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -921,7 +921,7 @@ class FoldAllAction extends FoldingAction<void> {
|
|||
precondition: CONTEXT_FOLDING_ENABLED,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_0),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.Digit0),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -942,7 +942,7 @@ class UnfoldAllAction extends FoldingAction<void> {
|
|||
precondition: CONTEXT_FOLDING_ENABLED,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_J),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyJ),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -1085,7 +1085,7 @@ for (let i = 1; i <= 7; i++) {
|
|||
precondition: CONTEXT_FOLDING_ENABLED,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | (KeyCode.KEY_0 + i)),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | (KeyCode.Digit0 + i)),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
})
|
||||
|
|
|
@ -216,8 +216,8 @@ class FormatDocumentAction extends EditorAction {
|
|||
precondition: ContextKeyExpr.and(EditorContextKeys.notInCompositeEditor, EditorContextKeys.writable, EditorContextKeys.hasDocumentFormattingProvider),
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_F,
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_I },
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KeyF,
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyI },
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
},
|
||||
contextMenuOpts: {
|
||||
|
@ -249,7 +249,7 @@ class FormatSelectionAction extends EditorAction {
|
|||
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasDocumentSelectionFormattingProvider),
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_F),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyF),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
},
|
||||
contextMenuOpts: {
|
||||
|
|
|
@ -286,7 +286,7 @@ registerGoToAction(class OpenDefinitionToSideAction extends DefinitionAction {
|
|||
EditorContextKeys.isInWalkThroughSnippet.toNegated()),
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, goToDefinitionKb),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, goToDefinitionKb),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
|
|
@ -311,7 +311,7 @@ function withController(accessor: ServicesAccessor, fn: (controller: ReferencesC
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: 'togglePeekWidgetFocus',
|
||||
weight: KeybindingWeight.EditorContrib,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.F2),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.F2),
|
||||
when: ContextKeyExpr.or(ctxReferenceSearchVisible, PeekContext.inPeekEditor),
|
||||
handler(accessor) {
|
||||
withController(accessor, controller => {
|
||||
|
|
|
@ -244,7 +244,7 @@ class ShowHoverAction extends EditorAction {
|
|||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_I),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyI),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
|
|
@ -140,7 +140,7 @@ class InPlaceReplaceUp extends EditorAction {
|
|||
precondition: EditorContextKeys.writable,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_COMMA,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Comma,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -165,7 +165,7 @@ class InPlaceReplaceDown extends EditorAction {
|
|||
precondition: EditorContextKeys.writable,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_DOT,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Period,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
|
|
@ -227,7 +227,7 @@ export class ShowNextInlineSuggestionAction extends EditorAction {
|
|||
precondition: ContextKeyExpr.and(EditorContextKeys.writable, GhostTextController.inlineSuggestionVisible),
|
||||
kbOpts: {
|
||||
weight: 100,
|
||||
primary: KeyMod.Alt | KeyCode.US_CLOSE_SQUARE_BRACKET,
|
||||
primary: KeyMod.Alt | KeyCode.BracketRight,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -251,7 +251,7 @@ export class ShowPreviousInlineSuggestionAction extends EditorAction {
|
|||
precondition: ContextKeyExpr.and(EditorContextKeys.writable, GhostTextController.inlineSuggestionVisible),
|
||||
kbOpts: {
|
||||
weight: 100,
|
||||
primary: KeyMod.Alt | KeyCode.US_OPEN_SQUARE_BRACKET,
|
||||
primary: KeyMod.Alt | KeyCode.BracketLeft,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -294,7 +294,7 @@ export class TrimTrailingWhitespaceAction extends EditorAction {
|
|||
precondition: EditorContextKeys.writable,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_X),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyX),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -342,7 +342,7 @@ export class DeleteLinesAction extends EditorAction {
|
|||
precondition: EditorContextKeys.writable,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_K,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyK,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -444,7 +444,7 @@ export class IndentLinesAction extends EditorAction {
|
|||
precondition: EditorContextKeys.writable,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.US_CLOSE_SQUARE_BRACKET,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.BracketRight,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -470,7 +470,7 @@ class OutdentLinesAction extends EditorAction {
|
|||
precondition: EditorContextKeys.writable,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.US_OPEN_SQUARE_BRACKET,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.BracketLeft,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -662,7 +662,7 @@ export class DeleteAllRightAction extends AbstractDeleteAllToBoundaryAction {
|
|||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: 0,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_K, secondary: [KeyMod.CtrlCmd | KeyCode.Delete] },
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KeyK, secondary: [KeyMod.CtrlCmd | KeyCode.Delete] },
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -729,7 +729,7 @@ export class JoinLinesAction extends EditorAction {
|
|||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: 0,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_J },
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KeyJ },
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
|
|
@ -149,7 +149,7 @@ class InsertCursorAtEndOfEachLineSelected extends EditorAction {
|
|||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_I,
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KeyI,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
},
|
||||
menuOpts: {
|
||||
|
@ -693,7 +693,7 @@ export class AddSelectionToNextFindMatchAction extends MultiCursorSelectionContr
|
|||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.focus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_D,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyD,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
},
|
||||
menuOpts: {
|
||||
|
@ -738,7 +738,7 @@ export class MoveSelectionToNextFindMatchAction extends MultiCursorSelectionCont
|
|||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.focus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_D),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyD),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -771,7 +771,7 @@ export class SelectHighlightsAction extends MultiCursorSelectionControllerAction
|
|||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.focus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_L,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyL,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
},
|
||||
menuOpts: {
|
||||
|
|
|
@ -105,7 +105,7 @@ registerEditorCommand(new ParameterHintsCommand({
|
|||
kbExpr: EditorContextKeys.focus,
|
||||
primary: KeyCode.UpArrow,
|
||||
secondary: [KeyMod.Alt | KeyCode.UpArrow],
|
||||
mac: { primary: KeyCode.UpArrow, secondary: [KeyMod.Alt | KeyCode.UpArrow, KeyMod.WinCtrl | KeyCode.KEY_P] }
|
||||
mac: { primary: KeyCode.UpArrow, secondary: [KeyMod.Alt | KeyCode.UpArrow, KeyMod.WinCtrl | KeyCode.KeyP] }
|
||||
}
|
||||
}));
|
||||
registerEditorCommand(new ParameterHintsCommand({
|
||||
|
@ -117,6 +117,6 @@ registerEditorCommand(new ParameterHintsCommand({
|
|||
kbExpr: EditorContextKeys.focus,
|
||||
primary: KeyCode.DownArrow,
|
||||
secondary: [KeyMod.Alt | KeyCode.DownArrow],
|
||||
mac: { primary: KeyCode.DownArrow, secondary: [KeyMod.Alt | KeyCode.DownArrow, KeyMod.WinCtrl | KeyCode.KEY_N] }
|
||||
mac: { primary: KeyCode.DownArrow, secondary: [KeyMod.Alt | KeyCode.DownArrow, KeyMod.WinCtrl | KeyCode.KeyN] }
|
||||
}
|
||||
}));
|
||||
|
|
|
@ -193,8 +193,8 @@ export class SuggestController implements IEditorContribution {
|
|||
this._toDispose.add(widget.onDetailsKeyDown(e => {
|
||||
// cmd + c on macOS, ctrl + c on Win / Linux
|
||||
if (
|
||||
e.toKeybinding().equals(new SimpleKeybinding(true, false, false, false, KeyCode.KEY_C)) ||
|
||||
(platform.isMacintosh && e.toKeybinding().equals(new SimpleKeybinding(false, false, false, true, KeyCode.KEY_C)))
|
||||
e.toKeybinding().equals(new SimpleKeybinding(true, false, false, false, KeyCode.KeyC)) ||
|
||||
(platform.isMacintosh && e.toKeybinding().equals(new SimpleKeybinding(false, false, false, true, KeyCode.KeyC)))
|
||||
) {
|
||||
e.stopPropagation();
|
||||
return;
|
||||
|
@ -656,8 +656,8 @@ export class TriggerSuggestAction extends EditorAction {
|
|||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.Space,
|
||||
secondary: [KeyMod.CtrlCmd | KeyCode.KEY_I],
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.Space, secondary: [KeyMod.Alt | KeyCode.Escape, KeyMod.CtrlCmd | KeyCode.KEY_I] },
|
||||
secondary: [KeyMod.CtrlCmd | KeyCode.KeyI],
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.Space, secondary: [KeyMod.Alt | KeyCode.Escape, KeyMod.CtrlCmd | KeyCode.KeyI] },
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -777,7 +777,7 @@ registerEditorCommand(new SuggestCommand({
|
|||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyCode.DownArrow,
|
||||
secondary: [KeyMod.CtrlCmd | KeyCode.DownArrow],
|
||||
mac: { primary: KeyCode.DownArrow, secondary: [KeyMod.CtrlCmd | KeyCode.DownArrow, KeyMod.WinCtrl | KeyCode.KEY_N] }
|
||||
mac: { primary: KeyCode.DownArrow, secondary: [KeyMod.CtrlCmd | KeyCode.DownArrow, KeyMod.WinCtrl | KeyCode.KeyN] }
|
||||
}
|
||||
}));
|
||||
|
||||
|
@ -808,7 +808,7 @@ registerEditorCommand(new SuggestCommand({
|
|||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyCode.UpArrow,
|
||||
secondary: [KeyMod.CtrlCmd | KeyCode.UpArrow],
|
||||
mac: { primary: KeyCode.UpArrow, secondary: [KeyMod.CtrlCmd | KeyCode.UpArrow, KeyMod.WinCtrl | KeyCode.KEY_P] }
|
||||
mac: { primary: KeyCode.UpArrow, secondary: [KeyMod.CtrlCmd | KeyCode.UpArrow, KeyMod.WinCtrl | KeyCode.KeyP] }
|
||||
}
|
||||
}));
|
||||
|
||||
|
@ -838,8 +838,8 @@ registerEditorCommand(new SuggestCommand({
|
|||
weight: weight,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.Space,
|
||||
secondary: [KeyMod.CtrlCmd | KeyCode.KEY_I],
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.Space, secondary: [KeyMod.CtrlCmd | KeyCode.KEY_I] }
|
||||
secondary: [KeyMod.CtrlCmd | KeyCode.KeyI],
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.Space, secondary: [KeyMod.CtrlCmd | KeyCode.KeyI] }
|
||||
},
|
||||
menuOpts: [{
|
||||
menuId: suggestWidgetStatusbarMenu,
|
||||
|
@ -862,7 +862,7 @@ registerEditorCommand(new SuggestCommand({
|
|||
handler: x => x.toggleExplainMode(),
|
||||
kbOpts: {
|
||||
weight: KeybindingWeight.EditorContrib,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.US_SLASH,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.Slash,
|
||||
}
|
||||
}));
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ export class ToggleTabFocusModeAction extends EditorAction {
|
|||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: null,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_M,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_M },
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyM,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KeyM },
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
|
|
@ -141,7 +141,7 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget {
|
|||
return;
|
||||
}
|
||||
|
||||
if (e.equals(KeyMod.CtrlCmd | KeyCode.KEY_E)) {
|
||||
if (e.equals(KeyMod.CtrlCmd | KeyCode.KeyE)) {
|
||||
alert(AccessibilityHelpNLS.emergencyConfOn);
|
||||
|
||||
this._editor.updateOptions({
|
||||
|
@ -156,7 +156,7 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget {
|
|||
e.stopPropagation();
|
||||
}
|
||||
|
||||
if (e.equals(KeyMod.CtrlCmd | KeyCode.KEY_H)) {
|
||||
if (e.equals(KeyMod.CtrlCmd | KeyCode.KeyH)) {
|
||||
alert(AccessibilityHelpNLS.openingDocs);
|
||||
|
||||
let url = (<IStandaloneEditorConstructionOptions>this._editor.getRawOptions()).accessibilityHelpUrl;
|
||||
|
|
|
@ -45,8 +45,8 @@ export class GotoLineAction extends EditorAction {
|
|||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.focus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_G,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_G },
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyG,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KeyG },
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
|
|
@ -51,7 +51,7 @@ export class GotoLineAction extends EditorAction {
|
|||
precondition: EditorContextKeys.hasDocumentSymbolProvider,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.focus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_O,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyO,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
},
|
||||
contextMenuOpts: {
|
||||
|
|
126
src/vs/monaco.d.ts
vendored
126
src/vs/monaco.d.ts
vendored
|
@ -246,42 +246,42 @@ declare namespace monaco {
|
|||
DownArrow = 18,
|
||||
Insert = 19,
|
||||
Delete = 20,
|
||||
KEY_0 = 21,
|
||||
KEY_1 = 22,
|
||||
KEY_2 = 23,
|
||||
KEY_3 = 24,
|
||||
KEY_4 = 25,
|
||||
KEY_5 = 26,
|
||||
KEY_6 = 27,
|
||||
KEY_7 = 28,
|
||||
KEY_8 = 29,
|
||||
KEY_9 = 30,
|
||||
KEY_A = 31,
|
||||
KEY_B = 32,
|
||||
KEY_C = 33,
|
||||
KEY_D = 34,
|
||||
KEY_E = 35,
|
||||
KEY_F = 36,
|
||||
KEY_G = 37,
|
||||
KEY_H = 38,
|
||||
KEY_I = 39,
|
||||
KEY_J = 40,
|
||||
KEY_K = 41,
|
||||
KEY_L = 42,
|
||||
KEY_M = 43,
|
||||
KEY_N = 44,
|
||||
KEY_O = 45,
|
||||
KEY_P = 46,
|
||||
KEY_Q = 47,
|
||||
KEY_R = 48,
|
||||
KEY_S = 49,
|
||||
KEY_T = 50,
|
||||
KEY_U = 51,
|
||||
KEY_V = 52,
|
||||
KEY_W = 53,
|
||||
KEY_X = 54,
|
||||
KEY_Y = 55,
|
||||
KEY_Z = 56,
|
||||
Digit0 = 21,
|
||||
Digit1 = 22,
|
||||
Digit2 = 23,
|
||||
Digit3 = 24,
|
||||
Digit4 = 25,
|
||||
Digit5 = 26,
|
||||
Digit6 = 27,
|
||||
Digit7 = 28,
|
||||
Digit8 = 29,
|
||||
Digit9 = 30,
|
||||
KeyA = 31,
|
||||
KeyB = 32,
|
||||
KeyC = 33,
|
||||
KeyD = 34,
|
||||
KeyE = 35,
|
||||
KeyF = 36,
|
||||
KeyG = 37,
|
||||
KeyH = 38,
|
||||
KeyI = 39,
|
||||
KeyJ = 40,
|
||||
KeyK = 41,
|
||||
KeyL = 42,
|
||||
KeyM = 43,
|
||||
KeyN = 44,
|
||||
KeyO = 45,
|
||||
KeyP = 46,
|
||||
KeyQ = 47,
|
||||
KeyR = 48,
|
||||
KeyS = 49,
|
||||
KeyT = 50,
|
||||
KeyU = 51,
|
||||
KeyV = 52,
|
||||
KeyW = 53,
|
||||
KeyX = 54,
|
||||
KeyY = 55,
|
||||
KeyZ = 56,
|
||||
Meta = 57,
|
||||
ContextMenu = 58,
|
||||
F1 = 59,
|
||||
|
@ -309,57 +309,57 @@ declare namespace monaco {
|
|||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the ';:' key
|
||||
*/
|
||||
US_SEMICOLON = 80,
|
||||
Semicolon = 80,
|
||||
/**
|
||||
* For any country/region, the '+' key
|
||||
* For the US standard keyboard, the '=+' key
|
||||
*/
|
||||
US_EQUAL = 81,
|
||||
Equal = 81,
|
||||
/**
|
||||
* For any country/region, the ',' key
|
||||
* For the US standard keyboard, the ',<' key
|
||||
*/
|
||||
US_COMMA = 82,
|
||||
Comma = 82,
|
||||
/**
|
||||
* For any country/region, the '-' key
|
||||
* For the US standard keyboard, the '-_' key
|
||||
*/
|
||||
US_MINUS = 83,
|
||||
Minus = 83,
|
||||
/**
|
||||
* For any country/region, the '.' key
|
||||
* For the US standard keyboard, the '.>' key
|
||||
*/
|
||||
US_DOT = 84,
|
||||
Period = 84,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the '/?' key
|
||||
*/
|
||||
US_SLASH = 85,
|
||||
Slash = 85,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the '`~' key
|
||||
*/
|
||||
US_BACKTICK = 86,
|
||||
Backquote = 86,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the '[{' key
|
||||
*/
|
||||
US_OPEN_SQUARE_BRACKET = 87,
|
||||
BracketLeft = 87,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the '\|' key
|
||||
*/
|
||||
US_BACKSLASH = 88,
|
||||
Backslash = 88,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the ']}' key
|
||||
*/
|
||||
US_CLOSE_SQUARE_BRACKET = 89,
|
||||
BracketRight = 89,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the ''"' key
|
||||
*/
|
||||
US_QUOTE = 90,
|
||||
Quote = 90,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
*/
|
||||
|
@ -367,23 +367,23 @@ declare namespace monaco {
|
|||
/**
|
||||
* Either the angle bracket key or the backslash key on the RT 102-key keyboard.
|
||||
*/
|
||||
OEM_102 = 92,
|
||||
NUMPAD_0 = 93,
|
||||
NUMPAD_1 = 94,
|
||||
NUMPAD_2 = 95,
|
||||
NUMPAD_3 = 96,
|
||||
NUMPAD_4 = 97,
|
||||
NUMPAD_5 = 98,
|
||||
NUMPAD_6 = 99,
|
||||
NUMPAD_7 = 100,
|
||||
NUMPAD_8 = 101,
|
||||
NUMPAD_9 = 102,
|
||||
NUMPAD_MULTIPLY = 103,
|
||||
NUMPAD_ADD = 104,
|
||||
IntlBackslash = 92,
|
||||
Numpad0 = 93,
|
||||
Numpad1 = 94,
|
||||
Numpad2 = 95,
|
||||
Numpad3 = 96,
|
||||
Numpad4 = 97,
|
||||
Numpad5 = 98,
|
||||
Numpad6 = 99,
|
||||
Numpad7 = 100,
|
||||
Numpad8 = 101,
|
||||
Numpad9 = 102,
|
||||
NumpadMultiply = 103,
|
||||
NumpadAdd = 104,
|
||||
NUMPAD_SEPARATOR = 105,
|
||||
NUMPAD_SUBTRACT = 106,
|
||||
NUMPAD_DECIMAL = 107,
|
||||
NUMPAD_DIVIDE = 108,
|
||||
NumpadSubtract = 106,
|
||||
NumpadDecimal = 107,
|
||||
NumpadDivide = 108,
|
||||
/**
|
||||
* Cover all key codes when IME is processing input.
|
||||
*/
|
||||
|
|
|
@ -22,7 +22,7 @@ import { ILifecycleMainService } from 'vs/platform/lifecycle/electron-main/lifec
|
|||
import { IWindowsMainService } from 'vs/platform/windows/electron-main/windows';
|
||||
|
||||
function isSilentKeyCode(keyCode: KeyCode) {
|
||||
return keyCode < KeyCode.KEY_0;
|
||||
return keyCode < KeyCode.Digit0;
|
||||
}
|
||||
|
||||
export class Driver implements IDriver, IWindowDriverRegistry {
|
||||
|
|
|
@ -312,8 +312,8 @@ export abstract class AbstractKeybindingService extends Disposable implements IK
|
|||
}
|
||||
// weak check for certain ranges. this is properly implemented in a subclass
|
||||
// with access to the KeyboardMapperFactory.
|
||||
if ((event.keyCode >= KeyCode.KEY_A && event.keyCode <= KeyCode.KEY_Z)
|
||||
|| (event.keyCode >= KeyCode.KEY_0 && event.keyCode <= KeyCode.KEY_9)) {
|
||||
if ((event.keyCode >= KeyCode.KeyA && event.keyCode <= KeyCode.KeyZ)
|
||||
|| (event.keyCode >= KeyCode.Digit0 && event.keyCode <= KeyCode.Digit9)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -156,28 +156,28 @@ class KeybindingsRegistryImpl implements IKeybindingsRegistry {
|
|||
}
|
||||
|
||||
private static _mightProduceChar(keyCode: KeyCode): boolean {
|
||||
if (keyCode >= KeyCode.KEY_0 && keyCode <= KeyCode.KEY_9) {
|
||||
if (keyCode >= KeyCode.Digit0 && keyCode <= KeyCode.Digit9) {
|
||||
return true;
|
||||
}
|
||||
if (keyCode >= KeyCode.KEY_A && keyCode <= KeyCode.KEY_Z) {
|
||||
if (keyCode >= KeyCode.KeyA && keyCode <= KeyCode.KeyZ) {
|
||||
return true;
|
||||
}
|
||||
return (
|
||||
keyCode === KeyCode.US_SEMICOLON
|
||||
|| keyCode === KeyCode.US_EQUAL
|
||||
|| keyCode === KeyCode.US_COMMA
|
||||
|| keyCode === KeyCode.US_MINUS
|
||||
|| keyCode === KeyCode.US_DOT
|
||||
|| keyCode === KeyCode.US_SLASH
|
||||
|| keyCode === KeyCode.US_BACKTICK
|
||||
keyCode === KeyCode.Semicolon
|
||||
|| keyCode === KeyCode.Equal
|
||||
|| keyCode === KeyCode.Comma
|
||||
|| keyCode === KeyCode.Minus
|
||||
|| keyCode === KeyCode.Period
|
||||
|| keyCode === KeyCode.Slash
|
||||
|| keyCode === KeyCode.Backquote
|
||||
|| keyCode === KeyCode.ABNT_C1
|
||||
|| keyCode === KeyCode.ABNT_C2
|
||||
|| keyCode === KeyCode.US_OPEN_SQUARE_BRACKET
|
||||
|| keyCode === KeyCode.US_BACKSLASH
|
||||
|| keyCode === KeyCode.US_CLOSE_SQUARE_BRACKET
|
||||
|| keyCode === KeyCode.US_QUOTE
|
||||
|| keyCode === KeyCode.BracketLeft
|
||||
|| keyCode === KeyCode.Backslash
|
||||
|| keyCode === KeyCode.BracketRight
|
||||
|| keyCode === KeyCode.Quote
|
||||
|| keyCode === KeyCode.OEM_8
|
||||
|| keyCode === KeyCode.OEM_102
|
||||
|| keyCode === KeyCode.IntlBackslash
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -117,55 +117,55 @@ export class USLayoutResolvedKeybinding extends BaseResolvedKeybinding<SimpleKey
|
|||
}
|
||||
|
||||
switch (scanCode) {
|
||||
case ScanCode.KeyA: return KeyCode.KEY_A;
|
||||
case ScanCode.KeyB: return KeyCode.KEY_B;
|
||||
case ScanCode.KeyC: return KeyCode.KEY_C;
|
||||
case ScanCode.KeyD: return KeyCode.KEY_D;
|
||||
case ScanCode.KeyE: return KeyCode.KEY_E;
|
||||
case ScanCode.KeyF: return KeyCode.KEY_F;
|
||||
case ScanCode.KeyG: return KeyCode.KEY_G;
|
||||
case ScanCode.KeyH: return KeyCode.KEY_H;
|
||||
case ScanCode.KeyI: return KeyCode.KEY_I;
|
||||
case ScanCode.KeyJ: return KeyCode.KEY_J;
|
||||
case ScanCode.KeyK: return KeyCode.KEY_K;
|
||||
case ScanCode.KeyL: return KeyCode.KEY_L;
|
||||
case ScanCode.KeyM: return KeyCode.KEY_M;
|
||||
case ScanCode.KeyN: return KeyCode.KEY_N;
|
||||
case ScanCode.KeyO: return KeyCode.KEY_O;
|
||||
case ScanCode.KeyP: return KeyCode.KEY_P;
|
||||
case ScanCode.KeyQ: return KeyCode.KEY_Q;
|
||||
case ScanCode.KeyR: return KeyCode.KEY_R;
|
||||
case ScanCode.KeyS: return KeyCode.KEY_S;
|
||||
case ScanCode.KeyT: return KeyCode.KEY_T;
|
||||
case ScanCode.KeyU: return KeyCode.KEY_U;
|
||||
case ScanCode.KeyV: return KeyCode.KEY_V;
|
||||
case ScanCode.KeyW: return KeyCode.KEY_W;
|
||||
case ScanCode.KeyX: return KeyCode.KEY_X;
|
||||
case ScanCode.KeyY: return KeyCode.KEY_Y;
|
||||
case ScanCode.KeyZ: return KeyCode.KEY_Z;
|
||||
case ScanCode.Digit1: return KeyCode.KEY_1;
|
||||
case ScanCode.Digit2: return KeyCode.KEY_2;
|
||||
case ScanCode.Digit3: return KeyCode.KEY_3;
|
||||
case ScanCode.Digit4: return KeyCode.KEY_4;
|
||||
case ScanCode.Digit5: return KeyCode.KEY_5;
|
||||
case ScanCode.Digit6: return KeyCode.KEY_6;
|
||||
case ScanCode.Digit7: return KeyCode.KEY_7;
|
||||
case ScanCode.Digit8: return KeyCode.KEY_8;
|
||||
case ScanCode.Digit9: return KeyCode.KEY_9;
|
||||
case ScanCode.Digit0: return KeyCode.KEY_0;
|
||||
case ScanCode.Minus: return KeyCode.US_MINUS;
|
||||
case ScanCode.Equal: return KeyCode.US_EQUAL;
|
||||
case ScanCode.BracketLeft: return KeyCode.US_OPEN_SQUARE_BRACKET;
|
||||
case ScanCode.BracketRight: return KeyCode.US_CLOSE_SQUARE_BRACKET;
|
||||
case ScanCode.Backslash: return KeyCode.US_BACKSLASH;
|
||||
case ScanCode.KeyA: return KeyCode.KeyA;
|
||||
case ScanCode.KeyB: return KeyCode.KeyB;
|
||||
case ScanCode.KeyC: return KeyCode.KeyC;
|
||||
case ScanCode.KeyD: return KeyCode.KeyD;
|
||||
case ScanCode.KeyE: return KeyCode.KeyE;
|
||||
case ScanCode.KeyF: return KeyCode.KeyF;
|
||||
case ScanCode.KeyG: return KeyCode.KeyG;
|
||||
case ScanCode.KeyH: return KeyCode.KeyH;
|
||||
case ScanCode.KeyI: return KeyCode.KeyI;
|
||||
case ScanCode.KeyJ: return KeyCode.KeyJ;
|
||||
case ScanCode.KeyK: return KeyCode.KeyK;
|
||||
case ScanCode.KeyL: return KeyCode.KeyL;
|
||||
case ScanCode.KeyM: return KeyCode.KeyM;
|
||||
case ScanCode.KeyN: return KeyCode.KeyN;
|
||||
case ScanCode.KeyO: return KeyCode.KeyO;
|
||||
case ScanCode.KeyP: return KeyCode.KeyP;
|
||||
case ScanCode.KeyQ: return KeyCode.KeyQ;
|
||||
case ScanCode.KeyR: return KeyCode.KeyR;
|
||||
case ScanCode.KeyS: return KeyCode.KeyS;
|
||||
case ScanCode.KeyT: return KeyCode.KeyT;
|
||||
case ScanCode.KeyU: return KeyCode.KeyU;
|
||||
case ScanCode.KeyV: return KeyCode.KeyV;
|
||||
case ScanCode.KeyW: return KeyCode.KeyW;
|
||||
case ScanCode.KeyX: return KeyCode.KeyX;
|
||||
case ScanCode.KeyY: return KeyCode.KeyY;
|
||||
case ScanCode.KeyZ: return KeyCode.KeyZ;
|
||||
case ScanCode.Digit1: return KeyCode.Digit1;
|
||||
case ScanCode.Digit2: return KeyCode.Digit2;
|
||||
case ScanCode.Digit3: return KeyCode.Digit3;
|
||||
case ScanCode.Digit4: return KeyCode.Digit4;
|
||||
case ScanCode.Digit5: return KeyCode.Digit5;
|
||||
case ScanCode.Digit6: return KeyCode.Digit6;
|
||||
case ScanCode.Digit7: return KeyCode.Digit7;
|
||||
case ScanCode.Digit8: return KeyCode.Digit8;
|
||||
case ScanCode.Digit9: return KeyCode.Digit9;
|
||||
case ScanCode.Digit0: return KeyCode.Digit0;
|
||||
case ScanCode.Minus: return KeyCode.Minus;
|
||||
case ScanCode.Equal: return KeyCode.Equal;
|
||||
case ScanCode.BracketLeft: return KeyCode.BracketLeft;
|
||||
case ScanCode.BracketRight: return KeyCode.BracketRight;
|
||||
case ScanCode.Backslash: return KeyCode.Backslash;
|
||||
case ScanCode.IntlHash: return KeyCode.Unknown; // missing
|
||||
case ScanCode.Semicolon: return KeyCode.US_SEMICOLON;
|
||||
case ScanCode.Quote: return KeyCode.US_QUOTE;
|
||||
case ScanCode.Backquote: return KeyCode.US_BACKTICK;
|
||||
case ScanCode.Comma: return KeyCode.US_COMMA;
|
||||
case ScanCode.Period: return KeyCode.US_DOT;
|
||||
case ScanCode.Slash: return KeyCode.US_SLASH;
|
||||
case ScanCode.IntlBackslash: return KeyCode.OEM_102;
|
||||
case ScanCode.Semicolon: return KeyCode.Semicolon;
|
||||
case ScanCode.Quote: return KeyCode.Quote;
|
||||
case ScanCode.Backquote: return KeyCode.Backquote;
|
||||
case ScanCode.Comma: return KeyCode.Comma;
|
||||
case ScanCode.Period: return KeyCode.Period;
|
||||
case ScanCode.Slash: return KeyCode.Slash;
|
||||
case ScanCode.IntlBackslash: return KeyCode.IntlBackslash;
|
||||
}
|
||||
return KeyCode.Unknown;
|
||||
}
|
||||
|
|
|
@ -209,17 +209,17 @@ suite('AbstractKeybindingService', () => {
|
|||
test('issue #16498: chord mode is quit for invalid chords', () => {
|
||||
|
||||
let kbService = createTestKeybindingService([
|
||||
kbItem(KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_X), 'chordCommand'),
|
||||
kbItem(KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyX), 'chordCommand'),
|
||||
kbItem(KeyCode.Backspace, 'simpleCommand'),
|
||||
]);
|
||||
|
||||
// send Ctrl/Cmd + K
|
||||
let shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_K);
|
||||
let shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KeyK);
|
||||
assert.strictEqual(shouldPreventDefault, true);
|
||||
assert.deepStrictEqual(executeCommandCalls, []);
|
||||
assert.deepStrictEqual(showMessageCalls, []);
|
||||
assert.deepStrictEqual(statusMessageCalls, [
|
||||
`(${toUsLabel(KeyMod.CtrlCmd | KeyCode.KEY_K)}) was pressed. Waiting for second key of chord...`
|
||||
`(${toUsLabel(KeyMod.CtrlCmd | KeyCode.KeyK)}) was pressed. Waiting for second key of chord...`
|
||||
]);
|
||||
assert.deepStrictEqual(statusMessageCallsDisposed, []);
|
||||
executeCommandCalls = [];
|
||||
|
@ -233,10 +233,10 @@ suite('AbstractKeybindingService', () => {
|
|||
assert.deepStrictEqual(executeCommandCalls, []);
|
||||
assert.deepStrictEqual(showMessageCalls, []);
|
||||
assert.deepStrictEqual(statusMessageCalls, [
|
||||
`The key combination (${toUsLabel(KeyMod.CtrlCmd | KeyCode.KEY_K)}, ${toUsLabel(KeyCode.Backspace)}) is not a command.`
|
||||
`The key combination (${toUsLabel(KeyMod.CtrlCmd | KeyCode.KeyK)}, ${toUsLabel(KeyCode.Backspace)}) is not a command.`
|
||||
]);
|
||||
assert.deepStrictEqual(statusMessageCallsDisposed, [
|
||||
`(${toUsLabel(KeyMod.CtrlCmd | KeyCode.KEY_K)}) was pressed. Waiting for second key of chord...`
|
||||
`(${toUsLabel(KeyMod.CtrlCmd | KeyCode.KeyK)}) was pressed. Waiting for second key of chord...`
|
||||
]);
|
||||
executeCommandCalls = [];
|
||||
showMessageCalls = [];
|
||||
|
@ -304,8 +304,8 @@ suite('AbstractKeybindingService', () => {
|
|||
test('can trigger command that is sharing keybinding with chord', () => {
|
||||
|
||||
let kbService = createTestKeybindingService([
|
||||
kbItem(KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_X), 'chordCommand'),
|
||||
kbItem(KeyMod.CtrlCmd | KeyCode.KEY_K, 'simpleCommand', ContextKeyExpr.has('key1')),
|
||||
kbItem(KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyX), 'chordCommand'),
|
||||
kbItem(KeyMod.CtrlCmd | KeyCode.KeyK, 'simpleCommand', ContextKeyExpr.has('key1')),
|
||||
]);
|
||||
|
||||
|
||||
|
@ -313,7 +313,7 @@ suite('AbstractKeybindingService', () => {
|
|||
currentContextValue = createContext({
|
||||
key1: true
|
||||
});
|
||||
let shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_K);
|
||||
let shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KeyK);
|
||||
assert.strictEqual(shouldPreventDefault, true);
|
||||
assert.deepStrictEqual(executeCommandCalls, [{
|
||||
commandId: 'simpleCommand',
|
||||
|
@ -329,12 +329,12 @@ suite('AbstractKeybindingService', () => {
|
|||
|
||||
// send Ctrl/Cmd + K
|
||||
currentContextValue = createContext({});
|
||||
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_K);
|
||||
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KeyK);
|
||||
assert.strictEqual(shouldPreventDefault, true);
|
||||
assert.deepStrictEqual(executeCommandCalls, []);
|
||||
assert.deepStrictEqual(showMessageCalls, []);
|
||||
assert.deepStrictEqual(statusMessageCalls, [
|
||||
`(${toUsLabel(KeyMod.CtrlCmd | KeyCode.KEY_K)}) was pressed. Waiting for second key of chord...`
|
||||
`(${toUsLabel(KeyMod.CtrlCmd | KeyCode.KeyK)}) was pressed. Waiting for second key of chord...`
|
||||
]);
|
||||
assert.deepStrictEqual(statusMessageCallsDisposed, []);
|
||||
executeCommandCalls = [];
|
||||
|
@ -344,7 +344,7 @@ suite('AbstractKeybindingService', () => {
|
|||
|
||||
// send Ctrl/Cmd + X
|
||||
currentContextValue = createContext({});
|
||||
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_X);
|
||||
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KeyX);
|
||||
assert.strictEqual(shouldPreventDefault, true);
|
||||
assert.deepStrictEqual(executeCommandCalls, [{
|
||||
commandId: 'chordCommand',
|
||||
|
@ -353,7 +353,7 @@ suite('AbstractKeybindingService', () => {
|
|||
assert.deepStrictEqual(showMessageCalls, []);
|
||||
assert.deepStrictEqual(statusMessageCalls, []);
|
||||
assert.deepStrictEqual(statusMessageCallsDisposed, [
|
||||
`(${toUsLabel(KeyMod.CtrlCmd | KeyCode.KEY_K)}) was pressed. Waiting for second key of chord...`
|
||||
`(${toUsLabel(KeyMod.CtrlCmd | KeyCode.KeyK)}) was pressed. Waiting for second key of chord...`
|
||||
]);
|
||||
executeCommandCalls = [];
|
||||
showMessageCalls = [];
|
||||
|
@ -366,14 +366,14 @@ suite('AbstractKeybindingService', () => {
|
|||
test('cannot trigger chord if command is overwriting', () => {
|
||||
|
||||
let kbService = createTestKeybindingService([
|
||||
kbItem(KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_X), 'chordCommand', ContextKeyExpr.has('key1')),
|
||||
kbItem(KeyMod.CtrlCmd | KeyCode.KEY_K, 'simpleCommand'),
|
||||
kbItem(KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyX), 'chordCommand', ContextKeyExpr.has('key1')),
|
||||
kbItem(KeyMod.CtrlCmd | KeyCode.KeyK, 'simpleCommand'),
|
||||
]);
|
||||
|
||||
|
||||
// send Ctrl/Cmd + K
|
||||
currentContextValue = createContext({});
|
||||
let shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_K);
|
||||
let shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KeyK);
|
||||
assert.strictEqual(shouldPreventDefault, true);
|
||||
assert.deepStrictEqual(executeCommandCalls, [{
|
||||
commandId: 'simpleCommand',
|
||||
|
@ -391,7 +391,7 @@ suite('AbstractKeybindingService', () => {
|
|||
currentContextValue = createContext({
|
||||
key1: true
|
||||
});
|
||||
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_K);
|
||||
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KeyK);
|
||||
assert.strictEqual(shouldPreventDefault, true);
|
||||
assert.deepStrictEqual(executeCommandCalls, [{
|
||||
commandId: 'simpleCommand',
|
||||
|
@ -409,7 +409,7 @@ suite('AbstractKeybindingService', () => {
|
|||
currentContextValue = createContext({
|
||||
key1: true
|
||||
});
|
||||
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_X);
|
||||
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KeyX);
|
||||
assert.strictEqual(shouldPreventDefault, false);
|
||||
assert.deepStrictEqual(executeCommandCalls, []);
|
||||
assert.deepStrictEqual(showMessageCalls, []);
|
||||
|
@ -426,12 +426,12 @@ suite('AbstractKeybindingService', () => {
|
|||
test('can have spying command', () => {
|
||||
|
||||
let kbService = createTestKeybindingService([
|
||||
kbItem(KeyMod.CtrlCmd | KeyCode.KEY_K, '^simpleCommand'),
|
||||
kbItem(KeyMod.CtrlCmd | KeyCode.KeyK, '^simpleCommand'),
|
||||
]);
|
||||
|
||||
// send Ctrl/Cmd + K
|
||||
currentContextValue = createContext({});
|
||||
let shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_K);
|
||||
let shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KeyK);
|
||||
assert.strictEqual(shouldPreventDefault, false);
|
||||
assert.deepStrictEqual(executeCommandCalls, [{
|
||||
commandId: 'simpleCommand',
|
||||
|
|
|
@ -17,95 +17,95 @@ suite('KeybindingLabels', () => {
|
|||
|
||||
test('Windows US label', () => {
|
||||
// no modifier
|
||||
assertUSLabel(OperatingSystem.Windows, KeyCode.KEY_A, 'A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyCode.KeyA, 'A');
|
||||
|
||||
// one modifier
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyCode.KEY_A, 'Ctrl+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.Shift | KeyCode.KEY_A, 'Shift+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.Alt | KeyCode.KEY_A, 'Alt+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.WinCtrl | KeyCode.KEY_A, 'Windows+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyCode.KeyA, 'Ctrl+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.Shift | KeyCode.KeyA, 'Shift+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.Alt | KeyCode.KeyA, 'Alt+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.WinCtrl | KeyCode.KeyA, 'Windows+A');
|
||||
|
||||
// two modifiers
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_A, 'Ctrl+Shift+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_A, 'Ctrl+Alt+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Windows+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'Shift+Alt+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'Shift+Windows+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Alt+Windows+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyA, 'Ctrl+Shift+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyA, 'Ctrl+Alt+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KeyA, 'Ctrl+Windows+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.Shift | KeyMod.Alt | KeyCode.KeyA, 'Shift+Alt+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KeyA, 'Shift+Windows+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, 'Alt+Windows+A');
|
||||
|
||||
// three modifiers
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'Ctrl+Shift+Alt+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Shift+Windows+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Alt+Windows+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Shift+Alt+Windows+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KeyA, 'Ctrl+Shift+Alt+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KeyA, 'Ctrl+Shift+Windows+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, 'Ctrl+Alt+Windows+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, 'Shift+Alt+Windows+A');
|
||||
|
||||
// four modifiers
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Shift+Alt+Windows+A');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, 'Ctrl+Shift+Alt+Windows+A');
|
||||
|
||||
// chord
|
||||
assertUSLabel(OperatingSystem.Windows, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), 'Ctrl+A Ctrl+B');
|
||||
assertUSLabel(OperatingSystem.Windows, KeyChord(KeyMod.CtrlCmd | KeyCode.KeyA, KeyMod.CtrlCmd | KeyCode.KeyB), 'Ctrl+A Ctrl+B');
|
||||
});
|
||||
|
||||
test('Linux US label', () => {
|
||||
// no modifier
|
||||
assertUSLabel(OperatingSystem.Linux, KeyCode.KEY_A, 'A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyCode.KeyA, 'A');
|
||||
|
||||
// one modifier
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyCode.KEY_A, 'Ctrl+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.Shift | KeyCode.KEY_A, 'Shift+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.Alt | KeyCode.KEY_A, 'Alt+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.WinCtrl | KeyCode.KEY_A, 'Super+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyCode.KeyA, 'Ctrl+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.Shift | KeyCode.KeyA, 'Shift+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.Alt | KeyCode.KeyA, 'Alt+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.WinCtrl | KeyCode.KeyA, 'Super+A');
|
||||
|
||||
// two modifiers
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_A, 'Ctrl+Shift+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_A, 'Ctrl+Alt+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Super+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'Shift+Alt+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'Shift+Super+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Alt+Super+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyA, 'Ctrl+Shift+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyA, 'Ctrl+Alt+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KeyA, 'Ctrl+Super+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.Shift | KeyMod.Alt | KeyCode.KeyA, 'Shift+Alt+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KeyA, 'Shift+Super+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, 'Alt+Super+A');
|
||||
|
||||
// three modifiers
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'Ctrl+Shift+Alt+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Shift+Super+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Alt+Super+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Shift+Alt+Super+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KeyA, 'Ctrl+Shift+Alt+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KeyA, 'Ctrl+Shift+Super+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, 'Ctrl+Alt+Super+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, 'Shift+Alt+Super+A');
|
||||
|
||||
// four modifiers
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Shift+Alt+Super+A');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, 'Ctrl+Shift+Alt+Super+A');
|
||||
|
||||
// chord
|
||||
assertUSLabel(OperatingSystem.Linux, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), 'Ctrl+A Ctrl+B');
|
||||
assertUSLabel(OperatingSystem.Linux, KeyChord(KeyMod.CtrlCmd | KeyCode.KeyA, KeyMod.CtrlCmd | KeyCode.KeyB), 'Ctrl+A Ctrl+B');
|
||||
});
|
||||
|
||||
test('Mac US label', () => {
|
||||
// no modifier
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyCode.KEY_A, 'A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyCode.KeyA, 'A');
|
||||
|
||||
// one modifier
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyCode.KEY_A, '⌘A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.Shift | KeyCode.KEY_A, '⇧A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.Alt | KeyCode.KEY_A, '⌥A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.WinCtrl | KeyCode.KEY_A, '⌃A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyCode.KeyA, '⌘A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.Shift | KeyCode.KeyA, '⇧A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.Alt | KeyCode.KeyA, '⌥A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.WinCtrl | KeyCode.KeyA, '⌃A');
|
||||
|
||||
// two modifiers
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_A, '⇧⌘A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_A, '⌥⌘A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KEY_A, '⌃⌘A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, '⇧⌥A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, '⌃⇧A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, '⌃⌥A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyA, '⇧⌘A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyA, '⌥⌘A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KeyA, '⌃⌘A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.Shift | KeyMod.Alt | KeyCode.KeyA, '⇧⌥A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KeyA, '⌃⇧A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, '⌃⌥A');
|
||||
|
||||
// three modifiers
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, '⇧⌥⌘A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, '⌃⇧⌘A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, '⌃⌥⌘A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, '⌃⇧⌥A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KeyA, '⇧⌥⌘A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KeyA, '⌃⇧⌘A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, '⌃⌥⌘A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, '⌃⇧⌥A');
|
||||
|
||||
// four modifiers
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, '⌃⇧⌥⌘A');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, '⌃⇧⌥⌘A');
|
||||
|
||||
// chord
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), '⌘A ⌘B');
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyChord(KeyMod.CtrlCmd | KeyCode.KeyA, KeyMod.CtrlCmd | KeyCode.KeyB), '⌘A ⌘B');
|
||||
|
||||
// special keys
|
||||
assertUSLabel(OperatingSystem.Macintosh, KeyCode.LeftArrow, '←');
|
||||
|
@ -120,9 +120,9 @@ suite('KeybindingLabels', () => {
|
|||
assert.strictEqual(usResolvedKeybinding.getAriaLabel(), expected);
|
||||
}
|
||||
|
||||
assertAriaLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Control+Shift+Alt+Windows+A');
|
||||
assertAriaLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Control+Shift+Alt+Super+A');
|
||||
assertAriaLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Control+Shift+Alt+Command+A');
|
||||
assertAriaLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, 'Control+Shift+Alt+Windows+A');
|
||||
assertAriaLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, 'Control+Shift+Alt+Super+A');
|
||||
assertAriaLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, 'Control+Shift+Alt+Command+A');
|
||||
});
|
||||
|
||||
test('Electron Accelerator label', () => {
|
||||
|
@ -131,19 +131,19 @@ suite('KeybindingLabels', () => {
|
|||
assert.strictEqual(usResolvedKeybinding.getElectronAccelerator(), expected);
|
||||
}
|
||||
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Shift+Alt+Super+A');
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Shift+Alt+Super+A');
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Shift+Alt+Cmd+A');
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, 'Ctrl+Shift+Alt+Super+A');
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, 'Ctrl+Shift+Alt+Super+A');
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, 'Ctrl+Shift+Alt+Cmd+A');
|
||||
|
||||
// electron cannot handle chords
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Windows, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), null);
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Linux, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), null);
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Macintosh, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), null);
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Windows, KeyChord(KeyMod.CtrlCmd | KeyCode.KeyA, KeyMod.CtrlCmd | KeyCode.KeyB), null);
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Linux, KeyChord(KeyMod.CtrlCmd | KeyCode.KeyA, KeyMod.CtrlCmd | KeyCode.KeyB), null);
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Macintosh, KeyChord(KeyMod.CtrlCmd | KeyCode.KeyA, KeyMod.CtrlCmd | KeyCode.KeyB), null);
|
||||
|
||||
// electron cannot handle numpad keys
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Windows, KeyCode.NUMPAD_1, null);
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Linux, KeyCode.NUMPAD_1, null);
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Macintosh, KeyCode.NUMPAD_1, null);
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Windows, KeyCode.Numpad1, null);
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Linux, KeyCode.Numpad1, null);
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Macintosh, KeyCode.Numpad1, null);
|
||||
|
||||
// special
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Macintosh, KeyCode.LeftArrow, 'Left');
|
||||
|
@ -158,14 +158,14 @@ suite('KeybindingLabels', () => {
|
|||
assert.strictEqual(usResolvedKeybinding.getUserSettingsLabel(), expected);
|
||||
}
|
||||
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'ctrl+shift+alt+win+a');
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'ctrl+shift+alt+meta+a');
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'ctrl+shift+alt+cmd+a');
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, 'ctrl+shift+alt+win+a');
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, 'ctrl+shift+alt+meta+a');
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KeyA, 'ctrl+shift+alt+cmd+a');
|
||||
|
||||
// electron cannot handle chords
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Windows, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), 'ctrl+a ctrl+b');
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Linux, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), 'ctrl+a ctrl+b');
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Macintosh, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), 'cmd+a cmd+b');
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Windows, KeyChord(KeyMod.CtrlCmd | KeyCode.KeyA, KeyMod.CtrlCmd | KeyCode.KeyB), 'ctrl+a ctrl+b');
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Linux, KeyChord(KeyMod.CtrlCmd | KeyCode.KeyA, KeyMod.CtrlCmd | KeyCode.KeyB), 'ctrl+a ctrl+b');
|
||||
assertElectronAcceleratorLabel(OperatingSystem.Macintosh, KeyChord(KeyMod.CtrlCmd | KeyCode.KeyA, KeyMod.CtrlCmd | KeyCode.KeyB), 'cmd+a cmd+b');
|
||||
});
|
||||
|
||||
test('issue #91235: Do not end with a +', () => {
|
||||
|
|
|
@ -39,7 +39,7 @@ suite('KeybindingResolver', () => {
|
|||
}
|
||||
|
||||
test('resolve key', function () {
|
||||
let keybinding = KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_Z;
|
||||
let keybinding = KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyZ;
|
||||
let runtimeKeybinding = createSimpleKeybinding(keybinding, OS);
|
||||
let contextRules = ContextKeyExpr.equals('bar', 'baz');
|
||||
let keybindingItem = kbItem(keybinding, 'yes', null, contextRules, true);
|
||||
|
@ -54,7 +54,7 @@ suite('KeybindingResolver', () => {
|
|||
|
||||
test('resolve key with arguments', function () {
|
||||
let commandArgs = { text: 'no' };
|
||||
let keybinding = KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_Z;
|
||||
let keybinding = KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyZ;
|
||||
let runtimeKeybinding = createSimpleKeybinding(keybinding, OS);
|
||||
let contextRules = ContextKeyExpr.equals('bar', 'baz');
|
||||
let keybindingItem = kbItem(keybinding, 'yes', commandArgs, contextRules, true);
|
||||
|
@ -65,131 +65,131 @@ suite('KeybindingResolver', () => {
|
|||
|
||||
test('KeybindingResolver.combine simple 1', function () {
|
||||
let defaults = [
|
||||
kbItem(KeyCode.KEY_A, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true)
|
||||
kbItem(KeyCode.KeyA, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true)
|
||||
];
|
||||
let overrides = [
|
||||
kbItem(KeyCode.KEY_B, 'yes2', null, ContextKeyExpr.equals('2', 'b'), false)
|
||||
kbItem(KeyCode.KeyB, 'yes2', null, ContextKeyExpr.equals('2', 'b'), false)
|
||||
];
|
||||
let actual = KeybindingResolver.combine(defaults, overrides);
|
||||
assert.deepStrictEqual(actual, [
|
||||
kbItem(KeyCode.KEY_A, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KEY_B, 'yes2', null, ContextKeyExpr.equals('2', 'b'), false),
|
||||
kbItem(KeyCode.KeyA, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KeyB, 'yes2', null, ContextKeyExpr.equals('2', 'b'), false),
|
||||
]);
|
||||
});
|
||||
|
||||
test('KeybindingResolver.combine simple 2', function () {
|
||||
let defaults = [
|
||||
kbItem(KeyCode.KEY_A, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KEY_B, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
kbItem(KeyCode.KeyA, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KeyB, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
];
|
||||
let overrides = [
|
||||
kbItem(KeyCode.KEY_C, 'yes3', null, ContextKeyExpr.equals('3', 'c'), false)
|
||||
kbItem(KeyCode.KeyC, 'yes3', null, ContextKeyExpr.equals('3', 'c'), false)
|
||||
];
|
||||
let actual = KeybindingResolver.combine(defaults, overrides);
|
||||
assert.deepStrictEqual(actual, [
|
||||
kbItem(KeyCode.KEY_A, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KEY_B, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true),
|
||||
kbItem(KeyCode.KEY_C, 'yes3', null, ContextKeyExpr.equals('3', 'c'), false),
|
||||
kbItem(KeyCode.KeyA, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KeyB, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true),
|
||||
kbItem(KeyCode.KeyC, 'yes3', null, ContextKeyExpr.equals('3', 'c'), false),
|
||||
]);
|
||||
});
|
||||
|
||||
test('KeybindingResolver.combine removal with not matching when', function () {
|
||||
let defaults = [
|
||||
kbItem(KeyCode.KEY_A, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KEY_B, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
kbItem(KeyCode.KeyA, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KeyB, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
];
|
||||
let overrides = [
|
||||
kbItem(KeyCode.KEY_A, '-yes1', null, ContextKeyExpr.equals('1', 'b'), false)
|
||||
kbItem(KeyCode.KeyA, '-yes1', null, ContextKeyExpr.equals('1', 'b'), false)
|
||||
];
|
||||
let actual = KeybindingResolver.combine(defaults, overrides);
|
||||
assert.deepStrictEqual(actual, [
|
||||
kbItem(KeyCode.KEY_A, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KEY_B, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
kbItem(KeyCode.KeyA, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KeyB, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
]);
|
||||
});
|
||||
|
||||
test('KeybindingResolver.combine removal with not matching keybinding', function () {
|
||||
let defaults = [
|
||||
kbItem(KeyCode.KEY_A, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KEY_B, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
kbItem(KeyCode.KeyA, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KeyB, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
];
|
||||
let overrides = [
|
||||
kbItem(KeyCode.KEY_B, '-yes1', null, ContextKeyExpr.equals('1', 'a'), false)
|
||||
kbItem(KeyCode.KeyB, '-yes1', null, ContextKeyExpr.equals('1', 'a'), false)
|
||||
];
|
||||
let actual = KeybindingResolver.combine(defaults, overrides);
|
||||
assert.deepStrictEqual(actual, [
|
||||
kbItem(KeyCode.KEY_A, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KEY_B, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
kbItem(KeyCode.KeyA, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KeyB, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
]);
|
||||
});
|
||||
|
||||
test('KeybindingResolver.combine removal with matching keybinding and when', function () {
|
||||
let defaults = [
|
||||
kbItem(KeyCode.KEY_A, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KEY_B, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
kbItem(KeyCode.KeyA, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KeyB, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
];
|
||||
let overrides = [
|
||||
kbItem(KeyCode.KEY_A, '-yes1', null, ContextKeyExpr.equals('1', 'a'), false)
|
||||
kbItem(KeyCode.KeyA, '-yes1', null, ContextKeyExpr.equals('1', 'a'), false)
|
||||
];
|
||||
let actual = KeybindingResolver.combine(defaults, overrides);
|
||||
assert.deepStrictEqual(actual, [
|
||||
kbItem(KeyCode.KEY_B, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
kbItem(KeyCode.KeyB, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
]);
|
||||
});
|
||||
|
||||
test('KeybindingResolver.combine removal with unspecified keybinding', function () {
|
||||
let defaults = [
|
||||
kbItem(KeyCode.KEY_A, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KEY_B, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
kbItem(KeyCode.KeyA, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KeyB, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
];
|
||||
let overrides = [
|
||||
kbItem(0, '-yes1', null, ContextKeyExpr.equals('1', 'a'), false)
|
||||
];
|
||||
let actual = KeybindingResolver.combine(defaults, overrides);
|
||||
assert.deepStrictEqual(actual, [
|
||||
kbItem(KeyCode.KEY_B, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
kbItem(KeyCode.KeyB, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
]);
|
||||
});
|
||||
|
||||
test('KeybindingResolver.combine removal with unspecified when', function () {
|
||||
let defaults = [
|
||||
kbItem(KeyCode.KEY_A, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KEY_B, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
kbItem(KeyCode.KeyA, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KeyB, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
];
|
||||
let overrides = [
|
||||
kbItem(KeyCode.KEY_A, '-yes1', null, null!, false)
|
||||
kbItem(KeyCode.KeyA, '-yes1', null, null!, false)
|
||||
];
|
||||
let actual = KeybindingResolver.combine(defaults, overrides);
|
||||
assert.deepStrictEqual(actual, [
|
||||
kbItem(KeyCode.KEY_B, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
kbItem(KeyCode.KeyB, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
]);
|
||||
});
|
||||
|
||||
test('KeybindingResolver.combine removal with unspecified when and unspecified keybinding', function () {
|
||||
let defaults = [
|
||||
kbItem(KeyCode.KEY_A, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KEY_B, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
kbItem(KeyCode.KeyA, 'yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KeyB, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
];
|
||||
let overrides = [
|
||||
kbItem(0, '-yes1', null, null!, false)
|
||||
];
|
||||
let actual = KeybindingResolver.combine(defaults, overrides);
|
||||
assert.deepStrictEqual(actual, [
|
||||
kbItem(KeyCode.KEY_B, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
kbItem(KeyCode.KeyB, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
]);
|
||||
});
|
||||
|
||||
test('issue #612#issuecomment-222109084 cannot remove keybindings for commands with ^', function () {
|
||||
let defaults = [
|
||||
kbItem(KeyCode.KEY_A, '^yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KEY_B, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
kbItem(KeyCode.KeyA, '^yes1', null, ContextKeyExpr.equals('1', 'a'), true),
|
||||
kbItem(KeyCode.KeyB, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
];
|
||||
let overrides = [
|
||||
kbItem(KeyCode.KEY_A, '-yes1', null, null!, false)
|
||||
kbItem(KeyCode.KeyA, '-yes1', null, null!, false)
|
||||
];
|
||||
let actual = KeybindingResolver.combine(defaults, overrides);
|
||||
assert.deepStrictEqual(actual, [
|
||||
kbItem(KeyCode.KEY_B, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
kbItem(KeyCode.KeyB, 'yes2', null, ContextKeyExpr.equals('2', 'b'), true)
|
||||
]);
|
||||
});
|
||||
|
||||
|
@ -246,7 +246,7 @@ suite('KeybindingResolver', () => {
|
|||
let items = [
|
||||
// This one will never match because its "when" is always overwritten by another one
|
||||
_kbItem(
|
||||
KeyCode.KEY_X,
|
||||
KeyCode.KeyX,
|
||||
'first',
|
||||
ContextKeyExpr.and(
|
||||
ContextKeyExpr.equals('key1', true),
|
||||
|
@ -255,31 +255,31 @@ suite('KeybindingResolver', () => {
|
|||
),
|
||||
// This one always overwrites first
|
||||
_kbItem(
|
||||
KeyCode.KEY_X,
|
||||
KeyCode.KeyX,
|
||||
'second',
|
||||
ContextKeyExpr.equals('key2', true)
|
||||
),
|
||||
// This one is a secondary mapping for `second`
|
||||
_kbItem(
|
||||
KeyCode.KEY_Z,
|
||||
KeyCode.KeyZ,
|
||||
'second',
|
||||
null!
|
||||
),
|
||||
// This one sometimes overwrites first
|
||||
_kbItem(
|
||||
KeyCode.KEY_X,
|
||||
KeyCode.KeyX,
|
||||
'third',
|
||||
ContextKeyExpr.equals('key3', true)
|
||||
),
|
||||
// This one is always overwritten by another one
|
||||
_kbItem(
|
||||
KeyMod.CtrlCmd | KeyCode.KEY_Y,
|
||||
KeyMod.CtrlCmd | KeyCode.KeyY,
|
||||
'fourth',
|
||||
ContextKeyExpr.equals('key4', true)
|
||||
),
|
||||
// This one overwrites with a chord the previous one
|
||||
_kbItem(
|
||||
KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_Y, KeyCode.KEY_Z),
|
||||
KeyChord(KeyMod.CtrlCmd | KeyCode.KeyY, KeyCode.KeyZ),
|
||||
'fifth',
|
||||
null!
|
||||
),
|
||||
|
@ -290,32 +290,32 @@ suite('KeybindingResolver', () => {
|
|||
null!
|
||||
),
|
||||
_kbItem(
|
||||
KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_U),
|
||||
KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyU),
|
||||
'seventh',
|
||||
null!
|
||||
),
|
||||
_kbItem(
|
||||
KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_K),
|
||||
KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyK),
|
||||
'seventh',
|
||||
null!
|
||||
),
|
||||
_kbItem(
|
||||
KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_U),
|
||||
KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyU),
|
||||
'uncomment lines',
|
||||
null!
|
||||
),
|
||||
_kbItem(
|
||||
KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_C),
|
||||
KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyC),
|
||||
'comment lines',
|
||||
null!
|
||||
),
|
||||
_kbItem(
|
||||
KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_G, KeyMod.CtrlCmd | KeyCode.KEY_C),
|
||||
KeyChord(KeyMod.CtrlCmd | KeyCode.KeyG, KeyMod.CtrlCmd | KeyCode.KeyC),
|
||||
'unreachablechord',
|
||||
null!
|
||||
),
|
||||
_kbItem(
|
||||
KeyMod.CtrlCmd | KeyCode.KEY_G,
|
||||
KeyMod.CtrlCmd | KeyCode.KeyG,
|
||||
'eleven',
|
||||
null!
|
||||
)
|
||||
|
@ -360,31 +360,31 @@ suite('KeybindingResolver', () => {
|
|||
|
||||
testKey('first', []);
|
||||
|
||||
testKey('second', [KeyCode.KEY_Z, KeyCode.KEY_X]);
|
||||
testResolve(createContext({ key2: true }), KeyCode.KEY_X, 'second');
|
||||
testResolve(createContext({}), KeyCode.KEY_Z, 'second');
|
||||
testKey('second', [KeyCode.KeyZ, KeyCode.KeyX]);
|
||||
testResolve(createContext({ key2: true }), KeyCode.KeyX, 'second');
|
||||
testResolve(createContext({}), KeyCode.KeyZ, 'second');
|
||||
|
||||
testKey('third', [KeyCode.KEY_X]);
|
||||
testResolve(createContext({ key3: true }), KeyCode.KEY_X, 'third');
|
||||
testKey('third', [KeyCode.KeyX]);
|
||||
testResolve(createContext({ key3: true }), KeyCode.KeyX, 'third');
|
||||
|
||||
testKey('fourth', []);
|
||||
|
||||
testKey('fifth', [KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_Y, KeyCode.KEY_Z)]);
|
||||
testResolve(createContext({}), KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_Y, KeyCode.KEY_Z), 'fifth');
|
||||
testKey('fifth', [KeyChord(KeyMod.CtrlCmd | KeyCode.KeyY, KeyCode.KeyZ)]);
|
||||
testResolve(createContext({}), KeyChord(KeyMod.CtrlCmd | KeyCode.KeyY, KeyCode.KeyZ), 'fifth');
|
||||
|
||||
testKey('seventh', [KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_K)]);
|
||||
testResolve(createContext({}), KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_K), 'seventh');
|
||||
testKey('seventh', [KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyK)]);
|
||||
testResolve(createContext({}), KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyK), 'seventh');
|
||||
|
||||
testKey('uncomment lines', [KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_U)]);
|
||||
testResolve(createContext({}), KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_U), 'uncomment lines');
|
||||
testKey('uncomment lines', [KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyU)]);
|
||||
testResolve(createContext({}), KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyU), 'uncomment lines');
|
||||
|
||||
testKey('comment lines', [KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_C)]);
|
||||
testResolve(createContext({}), KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_C), 'comment lines');
|
||||
testKey('comment lines', [KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyC)]);
|
||||
testResolve(createContext({}), KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyC), 'comment lines');
|
||||
|
||||
testKey('unreachablechord', []);
|
||||
|
||||
testKey('eleven', [KeyMod.CtrlCmd | KeyCode.KEY_G]);
|
||||
testResolve(createContext({}), KeyMod.CtrlCmd | KeyCode.KEY_G, 'eleven');
|
||||
testKey('eleven', [KeyMod.CtrlCmd | KeyCode.KeyG]);
|
||||
testResolve(createContext({}), KeyMod.CtrlCmd | KeyCode.KeyG, 'eleven');
|
||||
|
||||
testKey('sixth', []);
|
||||
});
|
||||
|
|
|
@ -34,7 +34,7 @@ class KeybindingsReferenceAction extends Action2 {
|
|||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: null,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_R)
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyR)
|
||||
},
|
||||
menu: {
|
||||
id: MenuId.MenubarHelpMenu,
|
||||
|
|
|
@ -260,7 +260,7 @@ class ToggleSidebarVisibilityAction extends Action2 {
|
|||
f1: true,
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_B
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyB
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -365,8 +365,8 @@ registerAction2(class extends Action2 {
|
|||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: undefined,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KEY_W, },
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KEY_W, }
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KeyW, },
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KeyW, }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -397,7 +397,7 @@ registerAction2(class extends Action2 {
|
|||
f1: true,
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_Z)
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyZ)
|
||||
},
|
||||
toggled: InEditorZenModeContext,
|
||||
menu: {
|
||||
|
|
|
@ -72,7 +72,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
primary: KeyCode.DownArrow,
|
||||
mac: {
|
||||
primary: KeyCode.DownArrow,
|
||||
secondary: [KeyMod.WinCtrl | KeyCode.KEY_N]
|
||||
secondary: [KeyMod.WinCtrl | KeyCode.KeyN]
|
||||
},
|
||||
handler: (accessor, arg2) => {
|
||||
navigate(accessor.get(IListService).lastFocusedList, async widget => {
|
||||
|
@ -89,7 +89,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
primary: KeyCode.UpArrow,
|
||||
mac: {
|
||||
primary: KeyCode.UpArrow,
|
||||
secondary: [KeyMod.WinCtrl | KeyCode.KEY_P]
|
||||
secondary: [KeyMod.WinCtrl | KeyCode.KeyP]
|
||||
},
|
||||
handler: (accessor, arg2) => {
|
||||
navigate(accessor.get(IListService).lastFocusedList, async widget => {
|
||||
|
@ -458,7 +458,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
id: 'list.selectAll',
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListSupportsMultiSelectContextKey),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_A,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyA,
|
||||
handler: (accessor) => {
|
||||
const focused = accessor.get(IListService).lastFocusedList;
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ import { inQuickPickContext, defaultQuickAccessContext, getQuickNavigateHandler
|
|||
//#region Quick access management commands and keys
|
||||
|
||||
const globalQuickAccessKeybinding = {
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_P,
|
||||
secondary: [KeyMod.CtrlCmd | KeyCode.KEY_E],
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyCode.KEY_P, secondary: undefined }
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyP,
|
||||
secondary: [KeyMod.CtrlCmd | KeyCode.KeyE],
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyCode.KeyP, secondary: undefined }
|
||||
};
|
||||
|
||||
const QUICKACCESS_ACTION_ID = 'workbench.action.quickOpen';
|
||||
|
@ -122,8 +122,8 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
when: inQuickPickContext,
|
||||
primary: 0,
|
||||
win: { primary: KeyMod.Alt | KeyCode.LeftArrow },
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.US_MINUS },
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.US_MINUS },
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.Minus },
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Minus },
|
||||
handler: accessor => {
|
||||
const quickInputService = accessor.get(IQuickInputService);
|
||||
quickInputService.back();
|
||||
|
@ -207,7 +207,7 @@ class QuickAccessSelectNextAction extends BaseQuickAccessNavigateAction {
|
|||
weight: KeybindingWeight.WorkbenchContrib + 50,
|
||||
when: inQuickPickContext,
|
||||
primary: 0,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_N }
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KeyN }
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ class QuickAccessSelectPreviousAction extends BaseQuickAccessNavigateAction {
|
|||
weight: KeybindingWeight.WorkbenchContrib + 50,
|
||||
when: inQuickPickContext,
|
||||
primary: 0,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_P }
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KeyP }
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -234,8 +234,8 @@ export class OpenRecentAction extends BaseOpenRecentAction {
|
|||
f1: true,
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_R,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R }
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyR,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KeyR }
|
||||
},
|
||||
menu: {
|
||||
id: MenuId.MenubarRecentMenu,
|
||||
|
@ -282,7 +282,7 @@ class ToggleFullScreenAction extends Action2 {
|
|||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyCode.F11,
|
||||
mac: {
|
||||
primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KEY_F
|
||||
primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KeyF
|
||||
}
|
||||
},
|
||||
precondition: IsIOSContext.toNegated(),
|
||||
|
@ -315,7 +315,7 @@ export class ReloadWindowAction extends Action2 {
|
|||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib + 50,
|
||||
when: IsDevelopmentContext,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_R
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyR
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -368,8 +368,8 @@ class NewWindowAction extends Action2 {
|
|||
f1: true,
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: isWeb ? (KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.Shift | KeyCode.KEY_N) : KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_N,
|
||||
secondary: isWeb ? [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_N] : undefined
|
||||
primary: isWeb ? (KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.Shift | KeyCode.KeyN) : KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyN,
|
||||
secondary: isWeb ? [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyN] : undefined
|
||||
},
|
||||
menu: {
|
||||
id: MenuId.MenubarFileMenu,
|
||||
|
@ -424,8 +424,8 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
weight: KeybindingWeight.WorkbenchContrib + 50,
|
||||
handler: getQuickNavigateHandler(quickPickNavigateNextInRecentFilesPickerId, true),
|
||||
when: recentFilesPickerContext,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_R,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R }
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyR,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KeyR }
|
||||
});
|
||||
|
||||
const quickPickNavigatePreviousInRecentFilesPicker = 'workbench.action.quickOpenNavigatePreviousInRecentFilesPicker';
|
||||
|
@ -434,8 +434,8 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
weight: KeybindingWeight.WorkbenchContrib + 50,
|
||||
handler: getQuickNavigateHandler(quickPickNavigatePreviousInRecentFilesPicker, false),
|
||||
when: recentFilesPickerContext,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_R,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_R }
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyR,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KeyR }
|
||||
});
|
||||
|
||||
CommandsRegistry.registerCommand('workbench.action.toggleConfirmBeforeClose', accessor => {
|
||||
|
|
|
@ -38,7 +38,7 @@ export class OpenFileAction extends Action2 {
|
|||
precondition: IsMacNativeContext.toNegated(),
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_O
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyO
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -65,10 +65,10 @@ export class OpenFolderAction extends Action2 {
|
|||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: undefined,
|
||||
linux: {
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_O)
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyO)
|
||||
},
|
||||
win: {
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_O)
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyO)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -95,7 +95,7 @@ export class OpenFileFolderAction extends Action2 {
|
|||
precondition: ContextKeyExpr.and(IsMacNativeContext, OpenFolderWorkspaceSupportContext),
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_O
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyO
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ class CloseWorkspaceAction extends Action2 {
|
|||
precondition: ContextKeyExpr.and(WorkbenchStateContext.notEqualsTo('empty'), EmptyWorkspaceSupportContext),
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_F)
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyF)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -542,14 +542,14 @@ MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: 'breadcrumbs.focusAndSelect',
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_DOT,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Period,
|
||||
when: BreadcrumbsControl.CK_BreadcrumbsPossible,
|
||||
handler: accessor => focusAndSelectHandler(accessor, true)
|
||||
});
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: 'breadcrumbs.focus',
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_SEMICOLON,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Semicolon,
|
||||
when: BreadcrumbsControl.CK_BreadcrumbsPossible,
|
||||
handler: accessor => focusAndSelectHandler(accessor, false)
|
||||
});
|
||||
|
@ -559,7 +559,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: 'breadcrumbs.toggleToOn',
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_DOT,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Period,
|
||||
when: ContextKeyExpr.not('config.breadcrumbs.enabled'),
|
||||
handler: async accessor => {
|
||||
const instant = accessor.get(IInstantiationService);
|
||||
|
|
|
@ -162,33 +162,33 @@ quickAccessRegistry.registerQuickAccessProvider({
|
|||
|
||||
// Editor Status
|
||||
const registry = Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ChangeModeAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_M) }), 'Change Language Mode', undefined, ContextKeyExpr.not('notebookEditorFocused'));
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ChangeModeAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyM) }), 'Change Language Mode', undefined, ContextKeyExpr.not('notebookEditorFocused'));
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ChangeEOLAction), 'Change End of Line Sequence');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ChangeEncodingAction), 'Change File Encoding');
|
||||
|
||||
// Editor Management
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(OpenNextEditor, { primary: KeyMod.CtrlCmd | KeyCode.PageDown, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.RightArrow, secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_CLOSE_SQUARE_BRACKET] } }), 'View: Open Next Editor', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(OpenPreviousEditor, { primary: KeyMod.CtrlCmd | KeyCode.PageUp, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.LeftArrow, secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_OPEN_SQUARE_BRACKET] } }), 'View: Open Previous Editor', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(OpenNextEditorInGroup, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.PageDown), mac: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.RightArrow) } }), 'View: Open Next Editor in Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(OpenPreviousEditorInGroup, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.PageUp), mac: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.LeftArrow) } }), 'View: Open Previous Editor in Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(OpenNextEditor, { primary: KeyMod.CtrlCmd | KeyCode.PageDown, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.RightArrow, secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.BracketRight] } }), 'View: Open Next Editor', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(OpenPreviousEditor, { primary: KeyMod.CtrlCmd | KeyCode.PageUp, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.LeftArrow, secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.BracketLeft] } }), 'View: Open Previous Editor', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(OpenNextEditorInGroup, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.PageDown), mac: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.RightArrow) } }), 'View: Open Next Editor in Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(OpenPreviousEditorInGroup, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.PageUp), mac: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.LeftArrow) } }), 'View: Open Previous Editor in Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(OpenNextRecentlyUsedEditorAction), 'View: Open Next Recently Used Editor', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(OpenPreviousRecentlyUsedEditorAction), 'View: Open Previous Recently Used Editor', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(OpenNextRecentlyUsedEditorInGroupAction), 'View: Open Next Recently Used Editor In Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(OpenPreviousRecentlyUsedEditorInGroupAction), 'View: Open Previous Recently Used Editor In Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(OpenFirstEditorInGroup), 'View: Open First Editor in Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(OpenLastEditorInGroup, { primary: KeyMod.Alt | KeyCode.KEY_0, secondary: [KeyMod.CtrlCmd | KeyCode.KEY_9], mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_0, secondary: [KeyMod.CtrlCmd | KeyCode.KEY_9] } }), 'View: Open Last Editor in Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ReopenClosedEditorAction, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_T }), 'View: Reopen Closed Editor', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ShowAllEditorsByAppearanceAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_P), mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Tab } }), 'View: Show All Editors By Appearance', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(OpenLastEditorInGroup, { primary: KeyMod.Alt | KeyCode.Digit0, secondary: [KeyMod.CtrlCmd | KeyCode.Digit9], mac: { primary: KeyMod.WinCtrl | KeyCode.Digit0, secondary: [KeyMod.CtrlCmd | KeyCode.Digit9] } }), 'View: Open Last Editor in Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ReopenClosedEditorAction, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyT }), 'View: Reopen Closed Editor', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ShowAllEditorsByAppearanceAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyP), mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Tab } }), 'View: Show All Editors By Appearance', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ShowAllEditorsByMostRecentlyUsedAction), 'View: Show All Editors By Most Recently Used', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ShowEditorsInActiveGroupByMostRecentlyUsedAction), 'View: Show Editors in Active Group By Most Recently Used', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ClearRecentFilesAction), 'File: Clear Recently Opened', localize('file', "File"));
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(CloseAllEditorsAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_W) }), 'View: Close All Editors', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(CloseAllEditorGroupsAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_W) }), 'View: Close All Editor Groups', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(CloseAllEditorsAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyW) }), 'View: Close All Editors', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(CloseAllEditorGroupsAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyW) }), 'View: Close All Editor Groups', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(CloseLeftEditorsInGroupAction), 'View: Close Editors to the Left in Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(CloseEditorsInOtherGroupsAction), 'View: Close Editors in Other Groups', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(CloseEditorInAllGroupsAction), 'View: Close Editor in All Groups', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(SplitEditorAction, { primary: KeyMod.CtrlCmd | KeyCode.US_BACKSLASH }), 'View: Split Editor', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(SplitEditorOrthogonalAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.US_BACKSLASH) }), 'View: Split Editor Orthogonal', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(SplitEditorAction, { primary: KeyMod.CtrlCmd | KeyCode.Backslash }), 'View: Split Editor', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(SplitEditorOrthogonalAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.Backslash) }), 'View: Split Editor Orthogonal', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(SplitEditorLeftAction), 'View: Split Editor Left', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(SplitEditorRightAction), 'View: Split Editor Right', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(SplitEditorUpAction), 'Split Editor Up', CATEGORIES.View.value);
|
||||
|
@ -200,20 +200,20 @@ registry.registerWorkbenchAction(SyncActionDescriptor.from(ResetGroupSizesAction
|
|||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ToggleGroupSizesAction), 'View: Toggle Editor Group Sizes', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MaximizeGroupAction), 'View: Maximize Editor Group and Hide Side Bar', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MinimizeOtherGroupsAction), 'View: Maximize Editor Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveEditorLeftInGroupAction, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.PageUp, mac: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.LeftArrow) } }), 'View: Move Editor Left', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveEditorRightInGroupAction, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.PageDown, mac: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.RightArrow) } }), 'View: Move Editor Right', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveGroupLeftAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.LeftArrow) }), 'View: Move Editor Group Left', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveGroupRightAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.RightArrow) }), 'View: Move Editor Group Right', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveGroupUpAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.UpArrow) }), 'View: Move Editor Group Up', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveGroupDownAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.DownArrow) }), 'View: Move Editor Group Down', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveEditorLeftInGroupAction, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.PageUp, mac: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.LeftArrow) } }), 'View: Move Editor Left', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveEditorRightInGroupAction, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.PageDown, mac: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.RightArrow) } }), 'View: Move Editor Right', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveGroupLeftAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.LeftArrow) }), 'View: Move Editor Group Left', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveGroupRightAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.RightArrow) }), 'View: Move Editor Group Right', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveGroupUpAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.UpArrow) }), 'View: Move Editor Group Up', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveGroupDownAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.DownArrow) }), 'View: Move Editor Group Down', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(DuplicateGroupLeftAction), 'View: Duplicate Editor Group Left', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(DuplicateGroupRightAction), 'View: Duplicate Editor Group Right', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(DuplicateGroupUpAction), 'View: Duplicate Editor Group Up', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(DuplicateGroupDownAction), 'View: Duplicate Editor Group Down', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveEditorToPreviousGroupAction, { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.LeftArrow, mac: { primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.LeftArrow } }), 'View: Move Editor into Previous Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveEditorToNextGroupAction, { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.RightArrow, mac: { primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.RightArrow } }), 'View: Move Editor into Next Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveEditorToFirstGroupAction, { primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_1, mac: { primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KEY_1 } }), 'View: Move Editor into First Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveEditorToLastGroupAction, { primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_9, mac: { primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KEY_9 } }), 'View: Move Editor into Last Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveEditorToFirstGroupAction, { primary: KeyMod.Shift | KeyMod.Alt | KeyCode.Digit1, mac: { primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.Digit1 } }), 'View: Move Editor into First Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveEditorToLastGroupAction, { primary: KeyMod.Shift | KeyMod.Alt | KeyCode.Digit9, mac: { primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.Digit9 } }), 'View: Move Editor into Last Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveEditorToLeftGroupAction), 'View: Move Editor into Left Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveEditorToRightGroupAction), 'View: Move Editor into Right Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveEditorToAboveGroupAction), 'View: Move Editor into Group Above', CATEGORIES.View.value);
|
||||
|
@ -227,21 +227,21 @@ registry.registerWorkbenchAction(SyncActionDescriptor.from(SplitEditorToRightGro
|
|||
registry.registerWorkbenchAction(SyncActionDescriptor.from(SplitEditorToAboveGroupAction), 'View: Split Editor into Group Above', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(SplitEditorToBelowGroupAction), 'View: Split Editor into Group Below', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(FocusActiveGroupAction), 'View: Focus Active Editor Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(FocusFirstGroupAction, { primary: KeyMod.CtrlCmd | KeyCode.KEY_1 }), 'View: Focus First Editor Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(FocusFirstGroupAction, { primary: KeyMod.CtrlCmd | KeyCode.Digit1 }), 'View: Focus First Editor Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(FocusLastGroupAction), 'View: Focus Last Editor Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(FocusPreviousGroup), 'View: Focus Previous Editor Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(FocusNextGroup), 'View: Focus Next Editor Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(FocusLeftGroup, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.LeftArrow) }), 'View: Focus Left Editor Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(FocusRightGroup, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.RightArrow) }), 'View: Focus Right Editor Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(FocusAboveGroup, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.UpArrow) }), 'View: Focus Editor Group Above', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(FocusBelowGroup, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.DownArrow) }), 'View: Focus Editor Group Below', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(FocusLeftGroup, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.LeftArrow) }), 'View: Focus Left Editor Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(FocusRightGroup, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.RightArrow) }), 'View: Focus Right Editor Group', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(FocusAboveGroup, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.UpArrow) }), 'View: Focus Editor Group Above', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(FocusBelowGroup, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.DownArrow) }), 'View: Focus Editor Group Below', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(NewEditorGroupLeftAction), 'View: New Editor Group to the Left', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(NewEditorGroupRightAction), 'View: New Editor Group to the Right', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(NewEditorGroupAboveAction), 'View: New Editor Group Above', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(NewEditorGroupBelowAction), 'View: New Editor Group Below', CATEGORIES.View.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(NavigateForwardAction, { primary: 0, win: { primary: KeyMod.Alt | KeyCode.RightArrow }, mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.US_MINUS }, linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_MINUS } }), 'Go Forward');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(NavigateBackwardsAction, { primary: 0, win: { primary: KeyMod.Alt | KeyCode.LeftArrow }, mac: { primary: KeyMod.WinCtrl | KeyCode.US_MINUS }, linux: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.US_MINUS } }), 'Go Back');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(NavigateToLastEditLocationAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_Q) }), 'Go to Last Edit Location');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(NavigateForwardAction, { primary: 0, win: { primary: KeyMod.Alt | KeyCode.RightArrow }, mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Minus }, linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Minus } }), 'Go Forward');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(NavigateBackwardsAction, { primary: 0, win: { primary: KeyMod.Alt | KeyCode.LeftArrow }, mac: { primary: KeyMod.WinCtrl | KeyCode.Minus }, linux: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Minus } }), 'Go Back');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(NavigateToLastEditLocationAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyQ) }), 'Go to Last Edit Location');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(NavigateLastAction), 'Go Last');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ClearEditorHistoryAction), 'Clear Editor History');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(RevertAndCloseEditorAction), 'View: Revert and Close Editor', CATEGORIES.View.value);
|
||||
|
|
|
@ -608,16 +608,16 @@ function registerOpenEditorAtIndexCommands(): void {
|
|||
|
||||
function toKeyCode(index: number): KeyCode {
|
||||
switch (index) {
|
||||
case 0: return KeyCode.KEY_0;
|
||||
case 1: return KeyCode.KEY_1;
|
||||
case 2: return KeyCode.KEY_2;
|
||||
case 3: return KeyCode.KEY_3;
|
||||
case 4: return KeyCode.KEY_4;
|
||||
case 5: return KeyCode.KEY_5;
|
||||
case 6: return KeyCode.KEY_6;
|
||||
case 7: return KeyCode.KEY_7;
|
||||
case 8: return KeyCode.KEY_8;
|
||||
case 9: return KeyCode.KEY_9;
|
||||
case 0: return KeyCode.Digit0;
|
||||
case 1: return KeyCode.Digit1;
|
||||
case 2: return KeyCode.Digit2;
|
||||
case 3: return KeyCode.Digit3;
|
||||
case 4: return KeyCode.Digit4;
|
||||
case 5: return KeyCode.Digit5;
|
||||
case 6: return KeyCode.Digit6;
|
||||
case 7: return KeyCode.Digit7;
|
||||
case 8: return KeyCode.Digit8;
|
||||
case 9: return KeyCode.Digit9;
|
||||
}
|
||||
|
||||
throw new Error('invalid index');
|
||||
|
@ -681,13 +681,13 @@ function registerFocusEditorGroupAtIndexCommands(): void {
|
|||
|
||||
function toKeyCode(index: number): KeyCode {
|
||||
switch (index) {
|
||||
case 1: return KeyCode.KEY_2;
|
||||
case 2: return KeyCode.KEY_3;
|
||||
case 3: return KeyCode.KEY_4;
|
||||
case 4: return KeyCode.KEY_5;
|
||||
case 5: return KeyCode.KEY_6;
|
||||
case 6: return KeyCode.KEY_7;
|
||||
case 7: return KeyCode.KEY_8;
|
||||
case 1: return KeyCode.Digit2;
|
||||
case 2: return KeyCode.Digit3;
|
||||
case 3: return KeyCode.Digit4;
|
||||
case 4: return KeyCode.Digit5;
|
||||
case 5: return KeyCode.Digit6;
|
||||
case 6: return KeyCode.Digit7;
|
||||
case 7: return KeyCode.Digit8;
|
||||
}
|
||||
|
||||
throw new Error('Invalid index');
|
||||
|
@ -796,8 +796,8 @@ function registerCloseEditorCommands() {
|
|||
id: CLOSE_EDITOR_COMMAND_ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: undefined,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_W,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.F4, secondary: [KeyMod.CtrlCmd | KeyCode.KEY_W] },
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyW,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.F4, secondary: [KeyMod.CtrlCmd | KeyCode.KeyW] },
|
||||
handler: (accessor, resourceOrContext?: URI | IEditorCommandsContext, context?: IEditorCommandsContext) => {
|
||||
return closeEditorHandler(accessor, false, resourceOrContext, context);
|
||||
}
|
||||
|
@ -811,7 +811,7 @@ function registerCloseEditorCommands() {
|
|||
id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: undefined,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_W),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyW),
|
||||
handler: (accessor, resourceOrContext?: URI | IEditorCommandsContext, context?: IEditorCommandsContext) => {
|
||||
return Promise.all(getEditorsContext(accessor, resourceOrContext, context).groups.map(async group => {
|
||||
if (group) {
|
||||
|
@ -825,8 +825,8 @@ function registerCloseEditorCommands() {
|
|||
id: CLOSE_EDITOR_GROUP_COMMAND_ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.and(ActiveEditorGroupEmptyContext, MultipleEditorGroupsContext),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_W,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.F4, secondary: [KeyMod.CtrlCmd | KeyCode.KEY_W] },
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyW,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.F4, secondary: [KeyMod.CtrlCmd | KeyCode.KeyW] },
|
||||
handler: (accessor, resourceOrContext?: URI | IEditorCommandsContext, context?: IEditorCommandsContext) => {
|
||||
const editorGroupService = accessor.get(IEditorGroupsService);
|
||||
const commandsContext = getCommandsContext(resourceOrContext, context);
|
||||
|
@ -848,7 +848,7 @@ function registerCloseEditorCommands() {
|
|||
id: CLOSE_SAVED_EDITORS_COMMAND_ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: undefined,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_U),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyU),
|
||||
handler: (accessor, resourceOrContext?: URI | IEditorCommandsContext, context?: IEditorCommandsContext) => {
|
||||
return Promise.all(getEditorsContext(accessor, resourceOrContext, context).groups.map(async group => {
|
||||
if (group) {
|
||||
|
@ -863,7 +863,7 @@ function registerCloseEditorCommands() {
|
|||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: undefined,
|
||||
primary: undefined,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_T },
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyT },
|
||||
handler: (accessor, resourceOrContext?: URI | IEditorCommandsContext, context?: IEditorCommandsContext) => {
|
||||
const { editors, groups } = getEditorsContext(accessor, resourceOrContext, context);
|
||||
return Promise.all(groups.map(async group => {
|
||||
|
@ -1017,7 +1017,7 @@ function registerSplitEditorInGroupCommands(): void {
|
|||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ActiveEditorCanSplitInGroupContext,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_BACKSLASH)
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Backslash)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1063,7 +1063,7 @@ function registerSplitEditorInGroupCommands(): void {
|
|||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: SideBySideEditorActiveContext,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_BACKSLASH)
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Backslash)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1202,7 +1202,7 @@ function registerOtherEditorCommands(): void {
|
|||
id: KEEP_EDITOR_COMMAND_ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: undefined,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.Enter),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.Enter),
|
||||
handler: async (accessor, resourceOrContext?: URI | IEditorCommandsContext, context?: IEditorCommandsContext) => {
|
||||
const editorGroupService = accessor.get(IEditorGroupsService);
|
||||
|
||||
|
@ -1282,7 +1282,7 @@ function registerOtherEditorCommands(): void {
|
|||
id: PIN_EDITOR_COMMAND_ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ActiveEditorStickyContext.toNegated(),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.Shift | KeyCode.Enter),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.Shift | KeyCode.Enter),
|
||||
handler: async (accessor, resourceOrContext?: URI | IEditorCommandsContext, context?: IEditorCommandsContext) => {
|
||||
const editorGroupService = accessor.get(IEditorGroupsService);
|
||||
|
||||
|
@ -1297,7 +1297,7 @@ function registerOtherEditorCommands(): void {
|
|||
id: UNPIN_EDITOR_COMMAND_ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ActiveEditorStickyContext,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.Shift | KeyCode.Enter),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.Shift | KeyCode.Enter),
|
||||
handler: async (accessor, resourceOrContext?: URI | IEditorCommandsContext, context?: IEditorCommandsContext) => {
|
||||
const editorGroupService = accessor.get(IEditorGroupsService);
|
||||
|
||||
|
|
|
@ -227,7 +227,7 @@ export class NextPanelViewAction extends SwitchPanelViewAction {
|
|||
}
|
||||
|
||||
const actionRegistry = Registry.as<IWorkbenchActionRegistry>(WorkbenchExtensions.WorkbenchActions);
|
||||
actionRegistry.registerWorkbenchAction(SyncActionDescriptor.from(TogglePanelAction, { primary: KeyMod.CtrlCmd | KeyCode.KEY_J }), 'View: Toggle Panel', CATEGORIES.View.value);
|
||||
actionRegistry.registerWorkbenchAction(SyncActionDescriptor.from(TogglePanelAction, { primary: KeyMod.CtrlCmd | KeyCode.KeyJ }), 'View: Toggle Panel', CATEGORIES.View.value);
|
||||
actionRegistry.registerWorkbenchAction(SyncActionDescriptor.from(FocusPanelAction), 'View: Focus into Panel', CATEGORIES.View.value);
|
||||
actionRegistry.registerWorkbenchAction(SyncActionDescriptor.from(PreviousPanelViewAction), 'View: Previous Panel View', CATEGORIES.View.value);
|
||||
actionRegistry.registerWorkbenchAction(SyncActionDescriptor.from(NextPanelViewAction), 'View: Next Panel View', CATEGORIES.View.value);
|
||||
|
|
|
@ -25,7 +25,7 @@ export class FocusSideBarAction extends Action2 {
|
|||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: null,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_0
|
||||
primary: KeyMod.CtrlCmd | KeyCode.Digit0
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1194,7 +1194,7 @@ registerAction2(
|
|||
id: 'views.moveViewUp',
|
||||
title: nls.localize('viewMoveUp', "Move View Up"),
|
||||
keybinding: {
|
||||
primary: KeyChord(KeyMod.CtrlCmd + KeyCode.KEY_K, KeyCode.UpArrow),
|
||||
primary: KeyChord(KeyMod.CtrlCmd + KeyCode.KeyK, KeyCode.UpArrow),
|
||||
weight: KeybindingWeight.WorkbenchContrib + 1,
|
||||
when: FocusedViewContext.notEqualsTo('')
|
||||
}
|
||||
|
@ -1210,7 +1210,7 @@ registerAction2(
|
|||
id: 'views.moveViewLeft',
|
||||
title: nls.localize('viewMoveLeft', "Move View Left"),
|
||||
keybinding: {
|
||||
primary: KeyChord(KeyMod.CtrlCmd + KeyCode.KEY_K, KeyCode.LeftArrow),
|
||||
primary: KeyChord(KeyMod.CtrlCmd + KeyCode.KeyK, KeyCode.LeftArrow),
|
||||
weight: KeybindingWeight.WorkbenchContrib + 1,
|
||||
when: FocusedViewContext.notEqualsTo('')
|
||||
}
|
||||
|
@ -1226,7 +1226,7 @@ registerAction2(
|
|||
id: 'views.moveViewDown',
|
||||
title: nls.localize('viewMoveDown', "Move View Down"),
|
||||
keybinding: {
|
||||
primary: KeyChord(KeyMod.CtrlCmd + KeyCode.KEY_K, KeyCode.DownArrow),
|
||||
primary: KeyChord(KeyMod.CtrlCmd + KeyCode.KeyK, KeyCode.DownArrow),
|
||||
weight: KeybindingWeight.WorkbenchContrib + 1,
|
||||
when: FocusedViewContext.notEqualsTo('')
|
||||
}
|
||||
|
@ -1242,7 +1242,7 @@ registerAction2(
|
|||
id: 'views.moveViewRight',
|
||||
title: nls.localize('viewMoveRight', "Move View Right"),
|
||||
keybinding: {
|
||||
primary: KeyChord(KeyMod.CtrlCmd + KeyCode.KEY_K, KeyCode.RightArrow),
|
||||
primary: KeyChord(KeyMod.CtrlCmd + KeyCode.KeyK, KeyCode.RightArrow),
|
||||
weight: KeybindingWeight.WorkbenchContrib + 1,
|
||||
when: FocusedViewContext.notEqualsTo('')
|
||||
}
|
||||
|
|
|
@ -188,7 +188,7 @@ registerAction2(class extends EditorAction2 {
|
|||
keybinding: {
|
||||
when: EditorContextKeys.editorTextFocus,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.Shift + KeyMod.Alt + KeyCode.KEY_H
|
||||
primary: KeyMod.Shift + KeyMod.Alt + KeyCode.KeyH
|
||||
},
|
||||
precondition: ContextKeyExpr.and(
|
||||
_ctxHasCallHierarchyProvider,
|
||||
|
@ -212,7 +212,7 @@ registerAction2(class extends EditorAction2 {
|
|||
precondition: ContextKeyExpr.and(_ctxCallHierarchyVisible, _ctxCallHierarchyDirection.isEqualTo(CallHierarchyDirection.CallsFrom)),
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.Shift + KeyMod.Alt + KeyCode.KEY_H,
|
||||
primary: KeyMod.Shift + KeyMod.Alt + KeyCode.KeyH,
|
||||
},
|
||||
menu: {
|
||||
id: CallHierarchyTreePeekWidget.TitleMenu,
|
||||
|
@ -237,7 +237,7 @@ registerAction2(class extends EditorAction2 {
|
|||
precondition: ContextKeyExpr.and(_ctxCallHierarchyVisible, _ctxCallHierarchyDirection.isEqualTo(CallHierarchyDirection.CallsTo)),
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.Shift + KeyMod.Alt + KeyCode.KEY_H,
|
||||
primary: KeyMod.Shift + KeyMod.Alt + KeyCode.KeyH,
|
||||
},
|
||||
menu: {
|
||||
id: CallHierarchyTreePeekWidget.TitleMenu,
|
||||
|
|
|
@ -117,7 +117,7 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget {
|
|||
return;
|
||||
}
|
||||
|
||||
if (e.equals(KeyMod.CtrlCmd | KeyCode.KEY_E)) {
|
||||
if (e.equals(KeyMod.CtrlCmd | KeyCode.KeyE)) {
|
||||
alert(nls.localize('emergencyConfOn', "Now changing the setting `editor.accessibilitySupport` to 'on'."));
|
||||
|
||||
this._configurationService.updateValue('editor.accessibilitySupport', 'on');
|
||||
|
@ -126,7 +126,7 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget {
|
|||
e.stopPropagation();
|
||||
}
|
||||
|
||||
if (e.equals(KeyMod.CtrlCmd | KeyCode.KEY_H)) {
|
||||
if (e.equals(KeyMod.CtrlCmd | KeyCode.KeyH)) {
|
||||
alert(nls.localize('openingDocs', "Now opening the VS Code Accessibility documentation page."));
|
||||
|
||||
this._openerService.open(URI.parse('https://go.microsoft.com/fwlink/?linkid=851010'));
|
||||
|
|
|
@ -83,8 +83,8 @@ class GotoLineAction extends Action2 {
|
|||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: null,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_G,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_G }
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyG,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KeyG }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -264,7 +264,7 @@ registerAction2(class GotoSymbolAction extends Action2 {
|
|||
keybinding: {
|
||||
when: undefined,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_O
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyO
|
||||
},
|
||||
menu: {
|
||||
id: MenuId.MenubarGoMenu,
|
||||
|
|
|
@ -60,7 +60,7 @@ class ToggleWordWrapAction extends EditorAction {
|
|||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: null,
|
||||
primary: KeyMod.Alt | KeyCode.KEY_Z,
|
||||
primary: KeyMod.Alt | KeyCode.KeyZ,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
|
|
@ -15,21 +15,21 @@ if (platform.isMacintosh) {
|
|||
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: 'execCut',
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_X,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyX,
|
||||
handler: bindExecuteCommand('cut'),
|
||||
weight: 0,
|
||||
when: undefined,
|
||||
});
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: 'execCopy',
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_C,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyC,
|
||||
handler: bindExecuteCommand('copy'),
|
||||
weight: 0,
|
||||
when: undefined,
|
||||
});
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: 'execPaste',
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_V,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyV,
|
||||
handler: bindExecuteCommand('paste'),
|
||||
weight: 0,
|
||||
when: undefined,
|
||||
|
|
|
@ -357,7 +357,7 @@ Registry.as<IViewsRegistry>(ViewExtensions.ViewsRegistry).registerViews([{
|
|||
openCommandActionDescriptor: {
|
||||
id: 'workbench.debug.action.toggleRepl',
|
||||
mnemonicTitle: nls.localize({ key: 'miToggleDebugConsole', comment: ['&& denotes a mnemonic'] }, "De&&bug Console"),
|
||||
keybindings: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_Y },
|
||||
keybindings: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyY },
|
||||
order: 2
|
||||
}
|
||||
}], VIEW_CONTAINER);
|
||||
|
@ -369,7 +369,7 @@ const viewContainer = Registry.as<IViewContainersRegistry>(ViewExtensions.ViewCo
|
|||
openCommandActionDescriptor: {
|
||||
id: VIEWLET_ID,
|
||||
mnemonicTitle: nls.localize({ key: 'miViewRun', comment: ['&& denotes a mnemonic'] }, "&&Run"),
|
||||
keybindings: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_D },
|
||||
keybindings: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyD },
|
||||
order: 3
|
||||
},
|
||||
ctorDescriptor: new SyncDescriptor(DebugViewPaneContainer),
|
||||
|
|
|
@ -282,7 +282,7 @@ class ShowDebugHoverAction extends EditorAction {
|
|||
precondition: CONTEXT_IN_DEBUG_MODE,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_I),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyI),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
|
|
@ -772,7 +772,7 @@ class FilterReplAction extends EditorAction {
|
|||
precondition: CONTEXT_IN_DEBUG_REPL,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_F,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyF,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1599,7 +1599,7 @@ registerAction2(class ShowExtensionEditorFindAction extends Action2 {
|
|||
keybinding: {
|
||||
when: contextKeyExpr,
|
||||
weight: KeybindingWeight.EditorContrib,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_F,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyF,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegis
|
|||
openCommandActionDescriptor: {
|
||||
id: VIEWLET_ID,
|
||||
mnemonicTitle: localize({ key: 'miViewExtensions', comment: ['&& denotes a mnemonic'] }, "E&&xtensions"),
|
||||
keybindings: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_X },
|
||||
keybindings: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyX },
|
||||
order: 4,
|
||||
},
|
||||
ctorDescriptor: new SyncDescriptor(ExtensionsViewPaneContainer),
|
||||
|
|
|
@ -22,7 +22,7 @@ import { IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remot
|
|||
const OPEN_NATIVE_CONSOLE_COMMAND_ID = 'workbench.action.terminal.openNativeConsole';
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: OPEN_NATIVE_CONSOLE_COMMAND_ID,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_C,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyC,
|
||||
when: TerminalContextKeys.notFocus,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
handler: async (accessor) => {
|
||||
|
|
|
@ -117,7 +117,7 @@ export class ExplorerViewletViewsContribution extends Disposable implements IWor
|
|||
hideByDefault: true,
|
||||
focusCommand: {
|
||||
id: 'workbench.files.action.focusOpenEditorsView',
|
||||
keybindings: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_E) }
|
||||
keybindings: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyE) }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ export const VIEW_CONTAINER: ViewContainer = viewContainerRegistry.registerViewC
|
|||
id: VIEWLET_ID,
|
||||
title: localize('explore', "Explorer"),
|
||||
mnemonicTitle: localize({ key: 'miViewExplorer', comment: ['&& denotes a mnemonic'] }, "&&Explorer"),
|
||||
keybindings: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_E },
|
||||
keybindings: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyE },
|
||||
order: 0
|
||||
},
|
||||
}, ViewContainerLocation.Sidebar, { isDefault: true });
|
||||
|
|
|
@ -37,9 +37,9 @@ const registry = Registry.as<IWorkbenchActionRegistry>(ActionExtensions.Workbenc
|
|||
registry.registerWorkbenchAction(SyncActionDescriptor.from(GlobalCompareResourcesAction), 'File: Compare Active File With...', category.value, ActiveEditorContext);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(FocusFilesExplorer), 'File: Focus on Files Explorer', category.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ShowActiveFileInExplorer), 'File: Reveal Active File in Side Bar', category.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(CompareWithClipboardAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_C) }), 'File: Compare Active File with Clipboard', category.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(CompareWithClipboardAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyC) }), 'File: Compare Active File with Clipboard', category.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ToggleAutoSaveAction), 'File: Toggle Auto Save', category.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ShowOpenedFileInNewWindow, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_O) }), 'File: Open Active File in New Window', category.value, EmptyWorkspaceSupportContext);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ShowOpenedFileInNewWindow, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyO) }), 'File: Open Active File in New Window', category.value, EmptyWorkspaceSupportContext);
|
||||
|
||||
// Commands
|
||||
CommandsRegistry.registerCommand('_files.windowOpen', openWindowCommand);
|
||||
|
@ -100,7 +100,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
id: CUT_FILE_ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib + explorerCommandsWeightBonus,
|
||||
when: ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerRootContext.toNegated(), ExplorerResourceNotReadonlyContext),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_X,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyX,
|
||||
handler: cutFileHandler,
|
||||
});
|
||||
|
||||
|
@ -109,7 +109,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
id: COPY_FILE_ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib + explorerCommandsWeightBonus,
|
||||
when: ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerRootContext.toNegated()),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_C,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyC,
|
||||
handler: copyFileHandler,
|
||||
});
|
||||
|
||||
|
@ -119,7 +119,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
id: PASTE_FILE_ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib + explorerCommandsWeightBonus,
|
||||
when: ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerResourceNotReadonlyContext),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_V,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyV,
|
||||
handler: pasteFileHandler
|
||||
});
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
id: COMPARE_WITH_SAVED_COMMAND_ID,
|
||||
when: undefined,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_D),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyD),
|
||||
handler: async (accessor, resource: URI | object) => {
|
||||
const instantiationService = accessor.get(IInstantiationService);
|
||||
const textModelService = accessor.get(ITextModelService);
|
||||
|
@ -293,9 +293,9 @@ async function resourcesToClipboard(resources: URI[], relative: boolean, clipboa
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: EditorContextKeys.focus.toNegated(),
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_C,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyC,
|
||||
win: {
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_C
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KeyC
|
||||
},
|
||||
id: COPY_PATH_COMMAND_ID,
|
||||
handler: async (accessor, resource: URI | object) => {
|
||||
|
@ -307,9 +307,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: EditorContextKeys.focus.toNegated(),
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_C,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KeyC,
|
||||
win: {
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_C)
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyC)
|
||||
},
|
||||
id: COPY_RELATIVE_PATH_COMMAND_ID,
|
||||
handler: async (accessor, resource: URI | object) => {
|
||||
|
@ -321,7 +321,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: undefined,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_P),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyP),
|
||||
id: 'workbench.action.files.copyPathOfActiveFile',
|
||||
handler: async (accessor) => {
|
||||
const editorService = accessor.get(IEditorService);
|
||||
|
@ -471,7 +471,7 @@ async function doSaveEditors(accessor: ServicesAccessor, editors: IEditorIdentif
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
when: undefined,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_S,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyS,
|
||||
id: SAVE_FILE_COMMAND_ID,
|
||||
handler: accessor => {
|
||||
return saveSelectedEditors(accessor, { reason: SaveReason.EXPLICIT, force: true /* force save even when non-dirty */ });
|
||||
|
@ -481,8 +481,8 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
when: undefined,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_S),
|
||||
win: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_S) },
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyS),
|
||||
win: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyS) },
|
||||
id: SAVE_FILE_WITHOUT_FORMATTING_COMMAND_ID,
|
||||
handler: accessor => {
|
||||
return saveSelectedEditors(accessor, { reason: SaveReason.EXPLICIT, force: true /* force save even when non-dirty */, skipSaveParticipants: true });
|
||||
|
@ -493,7 +493,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
id: SAVE_FILE_AS_COMMAND_ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: undefined,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_S,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyS,
|
||||
handler: accessor => {
|
||||
return saveSelectedEditors(accessor, { reason: SaveReason.EXPLICIT, saveAs: true });
|
||||
}
|
||||
|
@ -503,8 +503,8 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
when: undefined,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: undefined,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_S },
|
||||
win: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_S) },
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyS },
|
||||
win: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyS) },
|
||||
id: SAVE_ALL_COMMAND_ID,
|
||||
handler: (accessor) => {
|
||||
return saveDirtyEditorsOfGroups(accessor, accessor.get(IEditorGroupsService).getGroups(GroupsOrder.MOST_RECENTLY_ACTIVE), { reason: SaveReason.EXPLICIT });
|
||||
|
@ -663,8 +663,8 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: null,
|
||||
primary: isWeb ? (KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_N) : KeyMod.CtrlCmd | KeyCode.KEY_N,
|
||||
secondary: isWeb ? [KeyMod.CtrlCmd | KeyCode.KEY_N] : undefined,
|
||||
primary: isWeb ? (KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyN) : KeyMod.CtrlCmd | KeyCode.KeyN,
|
||||
secondary: isWeb ? [KeyMod.CtrlCmd | KeyCode.KeyN] : undefined,
|
||||
id: NEW_UNTITLED_FILE_COMMAND_ID,
|
||||
description: {
|
||||
description: NEW_UNTITLED_FILE_LABEL,
|
||||
|
|
|
@ -719,8 +719,8 @@ registerAction2(class extends Action2 {
|
|||
title: { value: nls.localize('flipLayout', "Toggle Vertical/Horizontal Editor Layout"), original: 'Toggle Vertical/Horizontal Editor Layout' },
|
||||
f1: true,
|
||||
keybinding: {
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_0,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_0 },
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.Digit0,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Digit0 },
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
icon: Codicon.editorLayout,
|
||||
|
|
|
@ -31,9 +31,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
id: REVEAL_IN_OS_COMMAND_ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: EditorContextKeys.focus.toNegated(),
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_R,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyR,
|
||||
win: {
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_R
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KeyR
|
||||
},
|
||||
handler: (accessor: ServicesAccessor, resource: URI | object) => {
|
||||
const resources = getMultiSelectedResources(resource, accessor.get(IListService), accessor.get(IEditorService), accessor.get(IExplorerService));
|
||||
|
@ -46,7 +46,7 @@ const REVEAL_ACTIVE_FILE_IN_OS_COMMAND_ID = 'workbench.action.files.revealActive
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: undefined,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_R),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyR),
|
||||
id: REVEAL_ACTIVE_FILE_IN_OS_COMMAND_ID,
|
||||
handler: (accessor: ServicesAccessor) => {
|
||||
const editorService = accessor.get(IEditorService);
|
||||
|
|
|
@ -35,8 +35,8 @@ registerEditorAction(class FormatDocumentMultipleAction extends EditorAction {
|
|||
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasDocumentFormattingProvider.toNegated()),
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_F,
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_I },
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KeyF,
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyI },
|
||||
weight: KeybindingWeight.EditorContrib,
|
||||
}
|
||||
});
|
||||
|
|
|
@ -74,7 +74,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
id: Constants.MARKER_SHOW_QUICK_FIX,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: Constants.MarkerFocusContextKey,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.US_DOT,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.Period,
|
||||
handler: (accessor, args: any) => {
|
||||
const markersView = accessor.get(IViewsService).getActiveViewWithId<MarkersView>(Constants.MARKERS_VIEW_ID)!;
|
||||
const focusedElement = markersView.getFocusElement();
|
||||
|
@ -127,7 +127,7 @@ Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).registerViews
|
|||
openCommandActionDescriptor: {
|
||||
id: 'workbench.actions.view.problems',
|
||||
mnemonicTitle: localize({ key: 'miMarker', comment: ['&& denotes a mnemonic'] }, "&&Problems"),
|
||||
keybindings: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_M },
|
||||
keybindings: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyM },
|
||||
order: 0,
|
||||
}
|
||||
}], VIEW_CONTAINER);
|
||||
|
@ -163,7 +163,7 @@ registerAction2(class extends ViewAction<IMarkersView> {
|
|||
},
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_C,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyC,
|
||||
when: Constants.MarkerFocusContextKey
|
||||
},
|
||||
viewId: Constants.MARKERS_VIEW_ID
|
||||
|
@ -248,7 +248,7 @@ registerAction2(class extends ViewAction<IMarkersView> {
|
|||
keybinding: {
|
||||
when: FocusedViewContext.isEqualTo(Constants.MARKERS_VIEW_ID),
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_F
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyF
|
||||
},
|
||||
viewId: Constants.MARKERS_VIEW_ID
|
||||
});
|
||||
|
|
|
@ -151,7 +151,7 @@ registerAction2(class extends NotebookCellAction {
|
|||
icon: icons.splitCellIcon,
|
||||
keybinding: {
|
||||
when: ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_BACKSLASH),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Backslash),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
});
|
||||
|
@ -215,7 +215,7 @@ registerAction2(class extends NotebookCellAction {
|
|||
title: localize('notebookActions.joinCellAbove', "Join With Previous Cell"),
|
||||
keybinding: {
|
||||
when: NOTEBOOK_EDITOR_FOCUSED,
|
||||
primary: KeyMod.WinCtrl | KeyMod.Alt | KeyMod.Shift | KeyCode.KEY_J,
|
||||
primary: KeyMod.WinCtrl | KeyMod.Alt | KeyMod.Shift | KeyCode.KeyJ,
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
menu: {
|
||||
|
@ -241,7 +241,7 @@ registerAction2(class extends NotebookCellAction {
|
|||
title: localize('notebookActions.joinCellBelow', "Join With Next Cell"),
|
||||
keybinding: {
|
||||
when: NOTEBOOK_EDITOR_FOCUSED,
|
||||
primary: KeyMod.WinCtrl | KeyMod.Alt | KeyCode.KEY_J,
|
||||
primary: KeyMod.WinCtrl | KeyMod.Alt | KeyCode.KeyJ,
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
menu: {
|
||||
|
@ -273,7 +273,7 @@ registerAction2(class ChangeCellToCodeAction extends NotebookMultiCellAction {
|
|||
title: localize('notebookActions.changeCellToCode', "Change Cell to Code"),
|
||||
keybinding: {
|
||||
when: ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)),
|
||||
primary: KeyCode.KEY_Y,
|
||||
primary: KeyCode.KeyY,
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
precondition: ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_CELL_TYPE.isEqualTo('markup')),
|
||||
|
@ -297,7 +297,7 @@ registerAction2(class ChangeCellToMarkdownAction extends NotebookMultiCellAction
|
|||
title: localize('notebookActions.changeCellToMarkdown', "Change Cell to Markdown"),
|
||||
keybinding: {
|
||||
when: ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)),
|
||||
primary: KeyCode.KEY_M,
|
||||
primary: KeyCode.KeyM,
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
precondition: ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_CELL_TYPE.isEqualTo('code')),
|
||||
|
@ -352,7 +352,7 @@ registerAction2(class CollapseCellInputAction extends ChangeNotebookCellMetadata
|
|||
title: localize('notebookActions.collapseCellInput', "Collapse Cell Input"),
|
||||
keybinding: {
|
||||
when: ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_CELL_INPUT_COLLAPSED.toNegated(), InputFocusedContext.toNegated()),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_C),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyC),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
menu: {
|
||||
|
@ -376,7 +376,7 @@ registerAction2(class ExpandCellInputAction extends ChangeNotebookCellMetadataAc
|
|||
title: localize('notebookActions.expandCellInput', "Expand Cell Input"),
|
||||
keybinding: {
|
||||
when: ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_CELL_INPUT_COLLAPSED),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_C),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyC),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
menu: {
|
||||
|
@ -400,7 +400,7 @@ registerAction2(class CollapseCellOutputAction extends ChangeNotebookCellMetadat
|
|||
title: localize('notebookActions.collapseCellOutput', "Collapse Cell Output"),
|
||||
keybinding: {
|
||||
when: ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_CELL_OUTPUT_COLLAPSED.toNegated(), InputFocusedContext.toNegated(), NOTEBOOK_CELL_HAS_OUTPUTS),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_T),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyT),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
menu: {
|
||||
|
@ -424,7 +424,7 @@ registerAction2(class ExpandCellOuputAction extends ChangeNotebookCellMetadataAc
|
|||
title: localize('notebookActions.expandCellOutput', "Expand Cell Output"),
|
||||
keybinding: {
|
||||
when: ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_CELL_OUTPUT_COLLAPSED),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_T),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyT),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
menu: {
|
||||
|
|
|
@ -388,8 +388,8 @@ registerAction2(class extends NotebookCellAction {
|
|||
group: CellOverflowToolbarGroups.Copy,
|
||||
},
|
||||
keybinding: platform.isNative ? undefined : {
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_C,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_C, secondary: [KeyMod.CtrlCmd | KeyCode.Insert] },
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyC,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KeyC, secondary: [KeyMod.CtrlCmd | KeyCode.Insert] },
|
||||
when: ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
}
|
||||
|
@ -414,8 +414,8 @@ registerAction2(class extends NotebookCellAction {
|
|||
},
|
||||
keybinding: platform.isNative ? undefined : {
|
||||
when: ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_X,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_X, secondary: [KeyMod.Shift | KeyCode.Delete] },
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyX,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KeyX, secondary: [KeyMod.Shift | KeyCode.Delete] },
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
}
|
||||
});
|
||||
|
@ -439,9 +439,9 @@ registerAction2(class extends NotebookAction {
|
|||
},
|
||||
keybinding: platform.isNative ? undefined : {
|
||||
when: ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_V,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_V, secondary: [KeyMod.Shift | KeyCode.Insert] },
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyCode.KEY_V, secondary: [KeyMod.Shift | KeyCode.Insert] },
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyV,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KeyV, secondary: [KeyMod.Shift | KeyCode.Insert] },
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyCode.KeyV, secondary: [KeyMod.Shift | KeyCode.Insert] },
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
@ -471,7 +471,7 @@ registerAction2(class extends NotebookCellAction {
|
|||
title: localize('notebookActions.pasteAbove', "Paste Cell Above"),
|
||||
keybinding: {
|
||||
when: ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)),
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_V,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyV,
|
||||
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
||||
},
|
||||
});
|
||||
|
|
|
@ -322,7 +322,7 @@ registerAction2(class extends Action2 {
|
|||
title: { value: localize('notebookActions.findInNotebook', "Find in Notebook"), original: 'Find in Notebook' },
|
||||
keybinding: {
|
||||
when: ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_IS_ACTIVE_EDITOR, EditorContextKeys.focus.toNegated()),
|
||||
primary: KeyCode.KEY_F | KeyMod.CtrlCmd,
|
||||
primary: KeyCode.KeyF | KeyMod.CtrlCmd,
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
}
|
||||
});
|
||||
|
|
|
@ -186,9 +186,9 @@ registerAction2(class extends Action2 {
|
|||
category: NOTEBOOK_ACTIONS_CATEGORY,
|
||||
keybinding: {
|
||||
when: ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)),
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_OPEN_SQUARE_BRACKET,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.BracketLeft,
|
||||
mac: {
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.US_OPEN_SQUARE_BRACKET,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.BracketLeft,
|
||||
secondary: [KeyCode.LeftArrow],
|
||||
},
|
||||
secondary: [KeyCode.LeftArrow],
|
||||
|
@ -256,9 +256,9 @@ registerAction2(class extends Action2 {
|
|||
category: NOTEBOOK_ACTIONS_CATEGORY,
|
||||
keybinding: {
|
||||
when: ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)),
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_CLOSE_SQUARE_BRACKET,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.BracketRight,
|
||||
mac: {
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.US_CLOSE_SQUARE_BRACKET,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.BracketRight,
|
||||
secondary: [KeyCode.RightArrow],
|
||||
},
|
||||
secondary: [KeyCode.RightArrow],
|
||||
|
|
|
@ -34,8 +34,8 @@ registerAction2(class extends Action2 {
|
|||
precondition: ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_EDITOR_EDITABLE),
|
||||
keybinding: {
|
||||
when: EditorContextKeys.editorTextFocus.toNegated(),
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_F,
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_I },
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KeyF,
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyI },
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
f1: true,
|
||||
|
@ -104,8 +104,8 @@ registerEditorAction(class FormatCellAction extends EditorAction {
|
|||
precondition: ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_EDITOR_EDITABLE, EditorContextKeys.inCompositeEditor, EditorContextKeys.writable, EditorContextKeys.hasDocumentFormattingProvider),
|
||||
kbOpts: {
|
||||
kbExpr: ContextKeyExpr.and(EditorContextKeys.editorTextFocus),
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_F,
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_I },
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KeyF,
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyI },
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
},
|
||||
contextMenuOpts: {
|
||||
|
|
|
@ -220,9 +220,9 @@ registerAction2(class CenterActiveCellAction extends NotebookCellAction {
|
|||
title: localize('notebookActions.centerActiveCell', "Center Active Cell"),
|
||||
keybinding: {
|
||||
when: NOTEBOOK_EDITOR_FOCUSED,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_L,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyL,
|
||||
mac: {
|
||||
primary: KeyMod.WinCtrl | KeyCode.KEY_L,
|
||||
primary: KeyMod.WinCtrl | KeyCode.KeyL,
|
||||
},
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
|
|
|
@ -74,9 +74,9 @@ Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).registerViews
|
|||
id: 'workbench.action.output.toggleOutput',
|
||||
mnemonicTitle: nls.localize({ key: 'miToggleOutput', comment: ['&& denotes a mnemonic'] }, "&&Output"),
|
||||
keybindings: {
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_U,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyU,
|
||||
linux: {
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_H) // On Ubuntu Ctrl+Shift+U is taken by some global OS command
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyH) // On Ubuntu Ctrl+Shift+U is taken by some global OS command
|
||||
}
|
||||
},
|
||||
order: 1,
|
||||
|
|
|
@ -358,7 +358,7 @@ class DefineKeybindingCommand extends EditorCommand {
|
|||
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.languageId.isEqualTo('jsonc')),
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_K),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyK),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
|
|
@ -166,7 +166,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
|||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: null,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.US_COMMA,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.Comma,
|
||||
},
|
||||
menu: {
|
||||
id: MenuId.GlobalActivity,
|
||||
|
@ -554,7 +554,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
|||
id: SETTINGS_EDITOR_COMMAND_SEARCH,
|
||||
precondition: CONTEXT_SETTINGS_EDITOR,
|
||||
keybinding: {
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_F,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyF,
|
||||
weight: KeybindingWeight.EditorContrib,
|
||||
when: null
|
||||
},
|
||||
|
@ -775,7 +775,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
|||
keybinding: {
|
||||
when: null,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_S)
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyS)
|
||||
},
|
||||
menu: [
|
||||
{ id: MenuId.CommandPalette },
|
||||
|
@ -947,7 +947,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
|||
id: KEYBINDINGS_EDITOR_COMMAND_ADD,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.and(CONTEXT_KEYBINDINGS_EDITOR, CONTEXT_KEYBINDING_FOCUS),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_A),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyA),
|
||||
handler: (accessor, args: any) => {
|
||||
const editorPane = accessor.get(IEditorService).activeEditorPane;
|
||||
if (editorPane instanceof KeybindingsEditor) {
|
||||
|
@ -960,7 +960,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
|||
id: KEYBINDINGS_EDITOR_COMMAND_DEFINE_WHEN,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.and(CONTEXT_KEYBINDINGS_EDITOR, CONTEXT_KEYBINDING_FOCUS),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_E),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyE),
|
||||
handler: (accessor, args: any) => {
|
||||
const editorPane = accessor.get(IEditorService).activeEditorPane;
|
||||
if (editorPane instanceof KeybindingsEditor && editorPane.activeKeybindingEntry!.keybindingItem.keybinding) {
|
||||
|
@ -1002,7 +1002,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
|||
id: KEYBINDINGS_EDITOR_COMMAND_SEARCH,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.and(CONTEXT_KEYBINDINGS_EDITOR),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_F,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyF,
|
||||
handler: (accessor, args: any) => {
|
||||
const editorPane = accessor.get(IEditorService).activeEditorPane;
|
||||
if (editorPane instanceof KeybindingsEditor) {
|
||||
|
@ -1015,8 +1015,8 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
|||
id: KEYBINDINGS_EDITOR_COMMAND_RECORD_SEARCH_KEYS,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.and(CONTEXT_KEYBINDINGS_EDITOR, CONTEXT_KEYBINDINGS_SEARCH_FOCUS),
|
||||
primary: KeyMod.Alt | KeyCode.KEY_K,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_K },
|
||||
primary: KeyMod.Alt | KeyCode.KeyK,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyK },
|
||||
handler: (accessor, args: any) => {
|
||||
const editorPane = accessor.get(IEditorService).activeEditorPane;
|
||||
if (editorPane instanceof KeybindingsEditor) {
|
||||
|
@ -1029,8 +1029,8 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
|||
id: KEYBINDINGS_EDITOR_COMMAND_SORTBY_PRECEDENCE,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.and(CONTEXT_KEYBINDINGS_EDITOR),
|
||||
primary: KeyMod.Alt | KeyCode.KEY_P,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_P },
|
||||
primary: KeyMod.Alt | KeyCode.KeyP,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyP },
|
||||
handler: (accessor, args: any) => {
|
||||
const editorPane = accessor.get(IEditorService).activeEditorPane;
|
||||
if (editorPane instanceof KeybindingsEditor) {
|
||||
|
@ -1056,7 +1056,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
|||
id: KEYBINDINGS_EDITOR_COMMAND_COPY,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.and(CONTEXT_KEYBINDINGS_EDITOR, CONTEXT_KEYBINDING_FOCUS),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_C,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyC,
|
||||
handler: async (accessor, args: any) => {
|
||||
const editorPane = accessor.get(IEditorService).activeEditorPane;
|
||||
if (editorPane instanceof KeybindingsEditor) {
|
||||
|
|
|
@ -667,7 +667,7 @@ export class SettingsEditor2 extends EditorPane {
|
|||
private addCtrlAInterceptor(container: HTMLElement): void {
|
||||
this._register(DOM.addStandardDisposableListener(container, DOM.EventType.KEY_DOWN, (e: StandardKeyboardEvent) => {
|
||||
if (
|
||||
e.keyCode === KeyCode.KEY_A &&
|
||||
e.keyCode === KeyCode.KeyA &&
|
||||
(platform.isMacintosh ? e.metaKey : e.ctrlKey) &&
|
||||
e.target.tagName !== 'TEXTAREA' &&
|
||||
e.target.tagName !== 'INPUT'
|
||||
|
|
|
@ -164,7 +164,7 @@ export class ShowAllCommandsAction extends Action2 {
|
|||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: undefined,
|
||||
primary: !isFirefox ? (KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_P) : undefined,
|
||||
primary: !isFirefox ? (KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyP) : undefined,
|
||||
secondary: [KeyCode.F1]
|
||||
}
|
||||
});
|
||||
|
|
|
@ -211,8 +211,8 @@ export class QuickAccessViewPickerAction extends Action2 {
|
|||
|
||||
static readonly ID = 'workbench.action.quickOpenView';
|
||||
static readonly KEYBINDING = {
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_Q,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_Q },
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyQ,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KeyQ },
|
||||
linux: { primary: 0 }
|
||||
};
|
||||
|
||||
|
|
|
@ -1488,7 +1488,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
id: CopyAddressAction.INLINE_ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib + tunnelViewCommandsWeightBonus,
|
||||
when: ContextKeyExpr.and(TunnelViewFocusContextKey, isForwardedOrDetectedExpr, isNotMultiSelectionExpr),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_C,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyC,
|
||||
handler: CopyAddressAction.inlineHandler()
|
||||
});
|
||||
CommandsRegistry.registerCommand(CopyAddressAction.COMMANDPALETTE_ID, CopyAddressAction.commandPaletteHandler());
|
||||
|
|
|
@ -180,7 +180,7 @@ if (isMacintosh) {
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: OpenLocalFileFolderCommand.ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_O,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyO,
|
||||
when: RemoteFileDialogContext,
|
||||
description: { description: OpenLocalFileFolderCommand.LABEL, args: [] },
|
||||
handler: OpenLocalFileFolderCommand.handler()
|
||||
|
@ -189,7 +189,7 @@ if (isMacintosh) {
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: OpenLocalFileCommand.ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_O,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyO,
|
||||
when: RemoteFileDialogContext,
|
||||
description: { description: OpenLocalFileCommand.LABEL, args: [] },
|
||||
handler: OpenLocalFileCommand.handler()
|
||||
|
@ -197,7 +197,7 @@ if (isMacintosh) {
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: OpenLocalFolderCommand.ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_O),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyO),
|
||||
when: RemoteFileDialogContext,
|
||||
description: { description: OpenLocalFolderCommand.LABEL, args: [] },
|
||||
handler: OpenLocalFolderCommand.handler()
|
||||
|
@ -207,7 +207,7 @@ if (isMacintosh) {
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: SaveLocalFileCommand.ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_S,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyS,
|
||||
when: RemoteFileDialogContext,
|
||||
description: { description: SaveLocalFileCommand.LABEL, args: [] },
|
||||
handler: SaveLocalFileCommand.handler()
|
||||
|
|
|
@ -74,9 +74,9 @@ viewsRegistry.registerViews([{
|
|||
mnemonicTitle: localize({ key: 'miViewSCM', comment: ['&& denotes a mnemonic'] }, "S&&CM"),
|
||||
keybindings: {
|
||||
primary: 0,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_G },
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_G },
|
||||
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_G },
|
||||
win: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyG },
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyG },
|
||||
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KeyG },
|
||||
},
|
||||
order: 2,
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
id: 'workbench.action.search.toggleQueryDetails',
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.or(Constants.SearchViewFocusedKey, SearchEditorConstants.InSearchEditor),
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_J,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyJ,
|
||||
handler: accessor => {
|
||||
const contextService = accessor.get(IContextKeyService).getContext(document.activeElement);
|
||||
if (contextService.getValue(SearchEditorConstants.InSearchEditor.serialize())) {
|
||||
|
@ -149,7 +149,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
id: Constants.ReplaceActionId,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.and(Constants.SearchViewVisibleKey, Constants.ReplaceActiveKey, Constants.MatchFocusKey),
|
||||
primary: KeyMod.Shift | KeyMod.CtrlCmd | KeyCode.KEY_1,
|
||||
primary: KeyMod.Shift | KeyMod.CtrlCmd | KeyCode.Digit1,
|
||||
handler: (accessor, args: any) => {
|
||||
const searchView = getSearchView(accessor.get(IViewsService));
|
||||
if (searchView) {
|
||||
|
@ -163,7 +163,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
id: Constants.ReplaceAllInFileActionId,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.and(Constants.SearchViewVisibleKey, Constants.ReplaceActiveKey, Constants.FileFocusKey),
|
||||
primary: KeyMod.Shift | KeyMod.CtrlCmd | KeyCode.KEY_1,
|
||||
primary: KeyMod.Shift | KeyMod.CtrlCmd | KeyCode.Digit1,
|
||||
secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Enter],
|
||||
handler: (accessor, args: any) => {
|
||||
const searchView = getSearchView(accessor.get(IViewsService));
|
||||
|
@ -178,7 +178,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
id: Constants.ReplaceAllInFolderActionId,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.and(Constants.SearchViewVisibleKey, Constants.ReplaceActiveKey, Constants.FolderFocusKey),
|
||||
primary: KeyMod.Shift | KeyMod.CtrlCmd | KeyCode.KEY_1,
|
||||
primary: KeyMod.Shift | KeyMod.CtrlCmd | KeyCode.Digit1,
|
||||
secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Enter],
|
||||
handler: (accessor, args: any) => {
|
||||
const searchView = getSearchView(accessor.get(IViewsService));
|
||||
|
@ -267,7 +267,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
id: Constants.CopyMatchCommandId,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: Constants.FileMatchOrMatchFocusKey,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_C,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyC,
|
||||
handler: copyMatchCommand
|
||||
});
|
||||
|
||||
|
@ -285,9 +285,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
id: Constants.CopyPathCommandId,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: Constants.FileMatchOrFolderMatchWithResourceFocusKey,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_C,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyC,
|
||||
win: {
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_C
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KeyC
|
||||
},
|
||||
handler: copyPathCommand
|
||||
});
|
||||
|
@ -547,7 +547,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
id: FIND_IN_FOLDER_ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerFolderContext),
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_F,
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KeyF,
|
||||
handler: searchInFolderCommand
|
||||
});
|
||||
|
||||
|
@ -635,7 +635,7 @@ const viewDescriptor: IViewDescriptor = {
|
|||
id: viewContainer.id,
|
||||
mnemonicTitle: nls.localize({ key: 'miViewSearch', comment: ['&& denotes a mnemonic'] }, "&&Search"),
|
||||
keybindings: {
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_F,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyF,
|
||||
// Yes, this is weird. See #116188, #115556, #115511, and now #124146, for examples of what can go wrong here.
|
||||
when: ContextKeyExpr.regex('neverMatch', /doesNotMatch/)
|
||||
},
|
||||
|
@ -714,7 +714,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
id: Constants.FindInFilesActionId,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: null,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_F,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyF,
|
||||
handler: FindInFilesCommand
|
||||
});
|
||||
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: Constants.FindInFilesActionId, title: { value: nls.localize('findInFiles', "Find in Files"), original: 'Find in Files' }, category } });
|
||||
|
@ -730,7 +730,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarEditMenu, {
|
|||
registry.registerWorkbenchAction(SyncActionDescriptor.from(FocusNextSearchResultAction, { primary: KeyCode.F4 }), 'Search: Focus Next Search Result', category.value, ContextKeyExpr.or(Constants.HasSearchResults, SearchEditorConstants.InSearchEditor));
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(FocusPreviousSearchResultAction, { primary: KeyMod.Shift | KeyCode.F4 }), 'Search: Focus Previous Search Result', category.value, ContextKeyExpr.or(Constants.HasSearchResults, SearchEditorConstants.InSearchEditor));
|
||||
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ReplaceInFilesAction, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_H }), 'Search: Replace in Files', category.value);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ReplaceInFilesAction, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyH }), 'Search: Replace in Files', category.value);
|
||||
MenuRegistry.appendMenuItem(MenuId.MenubarEditMenu, {
|
||||
group: '4_find_global',
|
||||
command: {
|
||||
|
@ -782,7 +782,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
id: Constants.AddCursorsAtSearchResults,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.and(Constants.SearchViewVisibleKey, Constants.FileMatchOrMatchFocusKey),
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_L,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyL,
|
||||
handler: (accessor, args: any) => {
|
||||
const searchView = getSearchView(accessor.get(IViewsService));
|
||||
if (searchView) {
|
||||
|
@ -792,7 +792,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
}
|
||||
});
|
||||
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ShowAllSymbolsAction, { primary: KeyMod.CtrlCmd | KeyCode.KEY_T }), 'Go to Symbol in Workspace...');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ShowAllSymbolsAction, { primary: KeyMod.CtrlCmd | KeyCode.KeyT }), 'Go to Symbol in Workspace...');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(ToggleSearchOnTypeAction), 'Search: Toggle Search on Type', category.value);
|
||||
|
||||
// Register Quick Access Handler
|
||||
|
|
|
@ -325,7 +325,7 @@ registerAction2(class extends Action2 {
|
|||
title: { value: localize('search.rerunSearchInEditor', "Search Again"), original: 'Search Again' },
|
||||
category,
|
||||
keybinding: {
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_R,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyR,
|
||||
when: SearchEditorConstants.InSearchEditor,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
},
|
||||
|
@ -440,8 +440,8 @@ registerAction2(class extends Action2 {
|
|||
precondition: SearchEditorConstants.InSearchEditor,
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.Alt | KeyCode.KEY_L,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_L }
|
||||
primary: KeyMod.Alt | KeyCode.KeyL,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyL }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -460,7 +460,7 @@ registerAction2(class extends Action2 {
|
|||
precondition: SearchEditorConstants.InSearchEditor,
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.Alt | KeyCode.US_EQUAL
|
||||
primary: KeyMod.Alt | KeyCode.Equal
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -477,7 +477,7 @@ registerAction2(class extends Action2 {
|
|||
precondition: SearchEditorConstants.InSearchEditor,
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.Alt | KeyCode.US_MINUS
|
||||
primary: KeyMod.Alt | KeyCode.Minus
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -494,7 +494,7 @@ registerAction2(class extends Action2 {
|
|||
precondition: SearchEditorConstants.InSearchEditor,
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_L,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyL,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -360,7 +360,7 @@ KeybindingsRegistry.registerKeybindingRule({
|
|||
id: 'workbench.action.tasks.build',
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: undefined,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_B
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyB
|
||||
});
|
||||
|
||||
// Tasks Output channel. Register it before using it in Task Service.
|
||||
|
|
|
@ -105,8 +105,8 @@ Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).registerViews
|
|||
id: TerminalCommandId.Toggle,
|
||||
mnemonicTitle: nls.localize({ key: 'miToggleIntegratedTerminal', comment: ['&& denotes a mnemonic'] }, "&&Terminal"),
|
||||
keybindings: {
|
||||
primary: KeyMod.CtrlCmd | KeyCode.US_BACKTICK,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.US_BACKTICK }
|
||||
primary: KeyMod.CtrlCmd | KeyCode.Backquote,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.Backquote }
|
||||
},
|
||||
order: 3
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ const CTRL_LETTER_OFFSET = 64;
|
|||
if (isWindows) {
|
||||
registerSendSequenceKeybinding(String.fromCharCode('V'.charCodeAt(0) - CTRL_LETTER_OFFSET), { // ctrl+v
|
||||
when: ContextKeyExpr.and(TerminalContextKeys.focus, ContextKeyExpr.equals(TerminalContextKeyStrings.ShellType, WindowsShellType.PowerShell), CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_V
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyV
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ if (isWindows) {
|
|||
if (isIOS) {
|
||||
registerSendSequenceKeybinding(String.fromCharCode('C'.charCodeAt(0) - CTRL_LETTER_OFFSET), { // ctrl+c
|
||||
when: ContextKeyExpr.and(TerminalContextKeys.focus),
|
||||
primary: KeyMod.WinCtrl | KeyCode.KEY_C
|
||||
primary: KeyMod.WinCtrl | KeyCode.KeyC
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -183,22 +183,22 @@ registerSendSequenceKeybinding(String.fromCharCode('E'.charCodeAt(0) - 64), {
|
|||
});
|
||||
// Break: ctrl+C
|
||||
registerSendSequenceKeybinding(String.fromCharCode('C'.charCodeAt(0) - 64), {
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyCode.US_DOT }
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyCode.Period }
|
||||
});
|
||||
// NUL: ctrl+shift+2
|
||||
registerSendSequenceKeybinding('\u0000', {
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_2,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_2 }
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Digit2,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Digit2 }
|
||||
});
|
||||
// RS: ctrl+shift+6
|
||||
registerSendSequenceKeybinding('\u001e', {
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_6,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_6 }
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Digit6,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Digit6 }
|
||||
});
|
||||
// US (Undo): ctrl+/
|
||||
registerSendSequenceKeybinding('\u001f', {
|
||||
primary: KeyMod.CtrlCmd | KeyCode.US_SLASH,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.US_SLASH }
|
||||
primary: KeyMod.CtrlCmd | KeyCode.Slash,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.Slash }
|
||||
});
|
||||
|
||||
setupTerminalCommands();
|
||||
|
|
|
@ -17,5 +17,5 @@ KeybindingsRegistry.registerKeybindingRule({
|
|||
id: TerminalCommandId.New,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: undefined,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_C
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyC
|
||||
});
|
||||
|
|
|
@ -402,7 +402,7 @@ export function registerTerminalActions() {
|
|||
f1: true,
|
||||
category,
|
||||
keybinding: {
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_BACKSLASH,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Backslash,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.or(TerminalContextKeys.tabsFocus, TerminalContextKeys.focus),
|
||||
},
|
||||
|
@ -424,7 +424,7 @@ export function registerTerminalActions() {
|
|||
keybinding: {
|
||||
primary: KeyMod.CtrlCmd | KeyCode.PageDown,
|
||||
mac: {
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_CLOSE_SQUARE_BRACKET
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.BracketRight
|
||||
},
|
||||
when: ContextKeyExpr.and(TerminalContextKeys.focus, TerminalContextKeys.editorFocus.negate()),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
|
@ -448,7 +448,7 @@ export function registerTerminalActions() {
|
|||
keybinding: {
|
||||
primary: KeyMod.CtrlCmd | KeyCode.PageUp,
|
||||
mac: {
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_OPEN_SQUARE_BRACKET
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.BracketLeft
|
||||
},
|
||||
when: ContextKeyExpr.and(TerminalContextKeys.focus, TerminalContextKeys.editorFocus.negate()),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
|
@ -903,7 +903,7 @@ export function registerTerminalActions() {
|
|||
f1: true,
|
||||
category,
|
||||
keybinding: {
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_F,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyF,
|
||||
when: ContextKeyExpr.or(TerminalContextKeys.findFocus, TerminalContextKeys.focus),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
|
@ -1268,8 +1268,8 @@ export function registerTerminalActions() {
|
|||
f1: true,
|
||||
category,
|
||||
keybinding: {
|
||||
primary: KeyMod.Alt | KeyCode.KEY_R,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_R },
|
||||
primary: KeyMod.Alt | KeyCode.KeyR,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyR },
|
||||
when: ContextKeyExpr.or(TerminalContextKeys.focus, TerminalContextKeys.findFocus),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
|
@ -1291,8 +1291,8 @@ export function registerTerminalActions() {
|
|||
f1: true,
|
||||
category,
|
||||
keybinding: {
|
||||
primary: KeyMod.Alt | KeyCode.KEY_W,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_W },
|
||||
primary: KeyMod.Alt | KeyCode.KeyW,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyW },
|
||||
when: ContextKeyExpr.or(TerminalContextKeys.focus, TerminalContextKeys.findFocus),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
|
@ -1314,8 +1314,8 @@ export function registerTerminalActions() {
|
|||
f1: true,
|
||||
category,
|
||||
keybinding: {
|
||||
primary: KeyMod.Alt | KeyCode.KEY_C,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_C },
|
||||
primary: KeyMod.Alt | KeyCode.KeyC,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyC },
|
||||
when: ContextKeyExpr.or(TerminalContextKeys.focus, TerminalContextKeys.findFocus),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
|
@ -1339,7 +1339,7 @@ export function registerTerminalActions() {
|
|||
keybinding: [
|
||||
{
|
||||
primary: KeyCode.F3,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyCode.KEY_G, secondary: [KeyCode.F3] },
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyCode.KeyG, secondary: [KeyCode.F3] },
|
||||
when: ContextKeyExpr.or(TerminalContextKeys.focus, TerminalContextKeys.findFocus),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
|
@ -1366,7 +1366,7 @@ export function registerTerminalActions() {
|
|||
keybinding: [
|
||||
{
|
||||
primary: KeyMod.Shift | KeyCode.F3,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_G, secondary: [KeyMod.Shift | KeyCode.F3] },
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyG, secondary: [KeyMod.Shift | KeyCode.F3] },
|
||||
when: ContextKeyExpr.or(TerminalContextKeys.focus, TerminalContextKeys.findFocus),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
|
@ -1392,7 +1392,7 @@ export function registerTerminalActions() {
|
|||
category,
|
||||
keybinding: [
|
||||
{
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_F,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyF,
|
||||
when: ContextKeyExpr.and(TerminalContextKeys.processSupported, TerminalContextKeys.focus, TerminalContextKeys.textSelected),
|
||||
weight: KeybindingWeight.WorkbenchContrib + 50
|
||||
}
|
||||
|
@ -1442,11 +1442,11 @@ export function registerTerminalActions() {
|
|||
category,
|
||||
precondition: TerminalContextKeys.processSupported,
|
||||
keybinding: {
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_5,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Digit5,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
mac: {
|
||||
primary: KeyMod.CtrlCmd | KeyCode.US_BACKSLASH,
|
||||
secondary: [KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_5]
|
||||
primary: KeyMod.CtrlCmd | KeyCode.Backslash,
|
||||
secondary: [KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Digit5]
|
||||
},
|
||||
when: TerminalContextKeys.focus
|
||||
},
|
||||
|
@ -1495,10 +1495,10 @@ export function registerTerminalActions() {
|
|||
category,
|
||||
precondition: TerminalContextKeys.processSupported,
|
||||
keybinding: {
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_5,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Digit5,
|
||||
mac: {
|
||||
primary: KeyMod.CtrlCmd | KeyCode.US_BACKSLASH,
|
||||
secondary: [KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_5]
|
||||
primary: KeyMod.CtrlCmd | KeyCode.Backslash,
|
||||
secondary: [KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Digit5]
|
||||
},
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: TerminalContextKeys.tabsFocus
|
||||
|
@ -1611,7 +1611,7 @@ export function registerTerminalActions() {
|
|||
// Technically this doesn't need to be here as it will fall back to this
|
||||
// behavior anyway when handed to xterm.js, having this handled by VS Code
|
||||
// makes it easier for users to see how it works though.
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyCode.KEY_A },
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyCode.KeyA },
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: TerminalContextKeys.focus
|
||||
}]
|
||||
|
@ -1631,8 +1631,8 @@ export function registerTerminalActions() {
|
|||
precondition: TerminalContextKeys.processSupported,
|
||||
icon: Codicon.plus,
|
||||
keybinding: {
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_BACKTICK,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.US_BACKTICK },
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Backquote,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Backquote },
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
description: {
|
||||
|
@ -1735,8 +1735,8 @@ export function registerTerminalActions() {
|
|||
category,
|
||||
precondition: TerminalContextKeys.processSupported,
|
||||
keybinding: {
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_W,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.F4, secondary: [KeyMod.CtrlCmd | KeyCode.KEY_W] },
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyW,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.F4, secondary: [KeyMod.CtrlCmd | KeyCode.KeyW] },
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.and(TerminalContextKeys.focus, ResourceContextKey.Scheme.isEqualTo(Schemas.vscodeTerminal), TerminalContextKeys.editorFocus)
|
||||
}
|
||||
|
@ -1792,7 +1792,7 @@ export function registerTerminalActions() {
|
|||
precondition: TerminalContextKeys.processSupported,
|
||||
keybinding: [{
|
||||
primary: 0,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyCode.KEY_K },
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyCode.KeyK },
|
||||
// Weight is higher than work workbench contributions so the keybinding remains
|
||||
// highest priority when chords are registered afterwards
|
||||
weight: KeybindingWeight.WorkbenchContrib + 1,
|
||||
|
@ -1872,7 +1872,7 @@ export function registerTerminalActions() {
|
|||
category,
|
||||
precondition: ContextKeyExpr.and(TerminalContextKeys.processSupported, TerminalContextKeys.isOpen, TerminalContextKeys.focus),
|
||||
keybinding: {
|
||||
primary: KeyMod.Alt | KeyCode.KEY_Z,
|
||||
primary: KeyMod.Alt | KeyCode.KeyZ,
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
}
|
||||
});
|
||||
|
@ -1907,9 +1907,9 @@ export function registerTerminalActions() {
|
|||
// TODO: Why is copy still showing up when text isn't selected?
|
||||
precondition: ContextKeyExpr.and(TerminalContextKeys.processSupported, TerminalContextKeys.textSelected),
|
||||
keybinding: [{
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_C,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_C, secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_C] },
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_C },
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyC,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KeyC, secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyC] },
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyC },
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.and(TerminalContextKeys.textSelected, TerminalContextKeys.focus)
|
||||
}]
|
||||
|
@ -1931,9 +1931,9 @@ export function registerTerminalActions() {
|
|||
category,
|
||||
precondition: TerminalContextKeys.processSupported,
|
||||
keybinding: [{
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_V,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_V, secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_V] },
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_V },
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyV,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KeyV, secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyV] },
|
||||
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyV },
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: TerminalContextKeys.focus
|
||||
}],
|
||||
|
|
|
@ -360,7 +360,7 @@ export class RunAllAction extends RunOrDebugAllTestsAction {
|
|||
icon: icons.testingRunAllIcon,
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.US_SEMICOLON, KeyCode.KEY_A),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.Semicolon, KeyCode.KeyA),
|
||||
},
|
||||
},
|
||||
TestRunProfileBitset.Run,
|
||||
|
@ -379,7 +379,7 @@ export class DebugAllAction extends RunOrDebugAllTestsAction {
|
|||
icon: icons.testingDebugIcon,
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.US_SEMICOLON, KeyMod.CtrlCmd | KeyCode.KEY_A),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.Semicolon, KeyMod.CtrlCmd | KeyCode.KeyA),
|
||||
},
|
||||
},
|
||||
TestRunProfileBitset.Debug,
|
||||
|
@ -397,7 +397,7 @@ export class CancelTestRunAction extends Action2 {
|
|||
icon: icons.testingCancelIcon,
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.US_SEMICOLON, KeyMod.CtrlCmd | KeyCode.KEY_X),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.Semicolon, KeyMod.CtrlCmd | KeyCode.KeyX),
|
||||
},
|
||||
menu: {
|
||||
id: MenuId.ViewTitle,
|
||||
|
@ -561,7 +561,7 @@ export class ShowMostRecentOutputAction extends Action2 {
|
|||
icon: Codicon.terminal,
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.US_SEMICOLON, KeyMod.CtrlCmd | KeyCode.KEY_O),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.Semicolon, KeyMod.CtrlCmd | KeyCode.KeyO),
|
||||
},
|
||||
precondition: TestingContextKeys.hasAnyResults.isEqualTo(true),
|
||||
menu: [{
|
||||
|
@ -773,7 +773,7 @@ export class RunAtCursor extends ExecuteTestAtCursor {
|
|||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.US_SEMICOLON, KeyCode.KEY_C),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.Semicolon, KeyCode.KeyC),
|
||||
},
|
||||
}, TestRunProfileBitset.Run);
|
||||
}
|
||||
|
@ -789,7 +789,7 @@ export class DebugAtCursor extends ExecuteTestAtCursor {
|
|||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.US_SEMICOLON, KeyMod.CtrlCmd | KeyCode.KEY_C),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.Semicolon, KeyMod.CtrlCmd | KeyCode.KeyC),
|
||||
},
|
||||
}, TestRunProfileBitset.Debug);
|
||||
}
|
||||
|
@ -844,7 +844,7 @@ export class RunCurrentFile extends ExecuteTestsInCurrentFile {
|
|||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.US_SEMICOLON, KeyCode.KEY_F),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.Semicolon, KeyCode.KeyF),
|
||||
},
|
||||
}, TestRunProfileBitset.Run);
|
||||
}
|
||||
|
@ -861,7 +861,7 @@ export class DebugCurrentFile extends ExecuteTestsInCurrentFile {
|
|||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.US_SEMICOLON, KeyMod.CtrlCmd | KeyCode.KEY_F),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.Semicolon, KeyMod.CtrlCmd | KeyCode.KeyF),
|
||||
},
|
||||
}, TestRunProfileBitset.Debug);
|
||||
}
|
||||
|
@ -969,7 +969,7 @@ export class ReRunFailedTests extends RunOrDebugFailedTests {
|
|||
category,
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.US_SEMICOLON, KeyCode.KEY_E),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.Semicolon, KeyCode.KeyE),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -991,7 +991,7 @@ export class DebugFailedTests extends RunOrDebugFailedTests {
|
|||
category,
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.US_SEMICOLON, KeyMod.CtrlCmd | KeyCode.KEY_E),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.Semicolon, KeyMod.CtrlCmd | KeyCode.KeyE),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -1013,7 +1013,7 @@ export class ReRunLastRun extends RunOrDebugLastRun {
|
|||
category,
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.US_SEMICOLON, KeyCode.KEY_L),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.Semicolon, KeyCode.KeyL),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -1035,7 +1035,7 @@ export class DebugLastRun extends RunOrDebugLastRun {
|
|||
category,
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.US_SEMICOLON, KeyMod.CtrlCmd | KeyCode.KEY_L),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.Semicolon, KeyMod.CtrlCmd | KeyCode.KeyL),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -1074,7 +1074,7 @@ export class OpenOutputPeek extends Action2 {
|
|||
category,
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.US_SEMICOLON, KeyCode.KEY_M),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.Semicolon, KeyCode.KeyM),
|
||||
},
|
||||
menu: {
|
||||
id: MenuId.CommandPalette,
|
||||
|
@ -1097,7 +1097,7 @@ export class ToggleInlineTestOutput extends Action2 {
|
|||
category,
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.US_SEMICOLON, KeyMod.CtrlCmd | KeyCode.KEY_I),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.Semicolon, KeyMod.CtrlCmd | KeyCode.KeyI),
|
||||
},
|
||||
menu: {
|
||||
id: MenuId.CommandPalette,
|
||||
|
|
|
@ -1692,7 +1692,7 @@ export class ToggleTestingPeekHistory extends EditorAction2 {
|
|||
}],
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_H,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyH,
|
||||
when: TestingContextKeys.isPeekVisible.isEqualTo(true),
|
||||
},
|
||||
});
|
||||
|
|
|
@ -337,7 +337,7 @@ class GenerateColorThemeAction extends Action {
|
|||
|
||||
const category = localize('preferences', "Preferences");
|
||||
|
||||
const colorThemeDescriptor = SyncActionDescriptor.from(SelectColorThemeAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_T) });
|
||||
const colorThemeDescriptor = SyncActionDescriptor.from(SelectColorThemeAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyT) });
|
||||
Registry.as<IWorkbenchActionRegistry>(Extensions.WorkbenchActions).registerWorkbenchAction(colorThemeDescriptor, 'Preferences: Color Theme', category);
|
||||
|
||||
const fileIconThemeDescriptor = SyncActionDescriptor.from(SelectFileIconThemeAction);
|
||||
|
|
|
@ -206,7 +206,7 @@ registerAction2(class extends EditorAction2 {
|
|||
precondition: ContextKeyExpr.and(_ctxTypeHierarchyVisible, _ctxTypeHierarchyDirection.isEqualTo(TypeHierarchyDirection.Subtypes)),
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.Shift + KeyMod.Alt + KeyCode.KEY_H,
|
||||
primary: KeyMod.Shift + KeyMod.Alt + KeyCode.KeyH,
|
||||
},
|
||||
menu: {
|
||||
id: TypeHierarchyTreePeekWidget.TitleMenu,
|
||||
|
@ -231,7 +231,7 @@ registerAction2(class extends EditorAction2 {
|
|||
precondition: ContextKeyExpr.and(_ctxTypeHierarchyVisible, _ctxTypeHierarchyDirection.isEqualTo(TypeHierarchyDirection.Supertypes)),
|
||||
keybinding: {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.Shift + KeyMod.Alt + KeyCode.KEY_H,
|
||||
primary: KeyMod.Shift + KeyMod.Alt + KeyCode.KeyH,
|
||||
},
|
||||
menu: {
|
||||
id: TypeHierarchyTreePeekWidget.TitleMenu,
|
||||
|
|
|
@ -28,7 +28,7 @@ export class ShowWebViewEditorFindWidgetAction extends Action2 {
|
|||
title: ShowWebViewEditorFindWidgetAction.LABEL,
|
||||
keybinding: {
|
||||
when: ContextKeyExpr.and(webviewActiveContextKeyExpr, KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_F,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyF,
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
|
|
|
@ -31,7 +31,7 @@ registerAction2(class extends Action2 {
|
|||
category,
|
||||
f1: true,
|
||||
keybinding: {
|
||||
primary: KeyMod.Alt + KeyMod.CtrlCmd + KeyMod.WinCtrl + KeyCode.KEY_N,
|
||||
primary: KeyMod.Alt + KeyMod.CtrlCmd + KeyMod.WinCtrl + KeyCode.KeyN,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
},
|
||||
menu: {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue