Vscode merge (#4582)

* Merge from vscode 37cb23d3dd4f9433d56d4ba5ea3203580719a0bd

* fix issues with merges

* bump node version in azpipe

* replace license headers

* remove duplicate launch task

* fix build errors

* fix build errors

* fix tslint issues

* working through package and linux build issues

* more work

* wip

* fix packaged builds

* working through linux build errors

* wip

* wip

* wip

* fix mac and linux file limits

* iterate linux pipeline

* disable editor typing

* revert series to parallel

* remove optimize vscode from linux

* fix linting issues

* revert testing change

* add work round for new node

* readd packaging for extensions

* fix issue with angular not resolving decorator dependencies
This commit is contained in:
Anthony Dresser
2019-03-19 17:44:35 -07:00
committed by GitHub
parent 833d197412
commit 87765e8673
1879 changed files with 54505 additions and 38058 deletions

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as assert from 'assert';
import { KeyChord, KeyCode, KeyMod, SimpleKeybinding, createKeybinding } from 'vs/base/common/keyCodes';
import { KeyChord, KeyCode, KeyMod, SimpleKeybinding, createKeybinding, createSimpleKeybinding } from 'vs/base/common/keyCodes';
import { UserSettingsLabelProvider } from 'vs/base/common/keybindingLabels';
import { OperatingSystem } from 'vs/base/common/platform';
import { ScanCode, ScanCodeBinding, ScanCodeUtils } from 'vs/base/common/scanCode';
@@ -65,7 +65,7 @@ suite('keyboardMapper - MAC de_ch', () => {
userSettingsLabel: 'cmd+a',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['meta+[KeyA]', null],
dispatchParts: ['meta+[KeyA]'],
}]
);
});
@@ -80,7 +80,7 @@ suite('keyboardMapper - MAC de_ch', () => {
userSettingsLabel: 'cmd+b',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['meta+[KeyB]', null],
dispatchParts: ['meta+[KeyB]'],
}]
);
});
@@ -95,7 +95,7 @@ suite('keyboardMapper - MAC de_ch', () => {
userSettingsLabel: 'cmd+z',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['meta+[KeyY]', null],
dispatchParts: ['meta+[KeyY]'],
}]
);
});
@@ -104,6 +104,7 @@ suite('keyboardMapper - MAC de_ch', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: false,
shiftKey: false,
altKey: false,
@@ -118,7 +119,7 @@ suite('keyboardMapper - MAC de_ch', () => {
userSettingsLabel: 'cmd+z',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['meta+[KeyY]', null],
dispatchParts: ['meta+[KeyY]'],
}
);
});
@@ -133,7 +134,7 @@ suite('keyboardMapper - MAC de_ch', () => {
userSettingsLabel: 'ctrl+alt+cmd+6',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+alt+meta+[Digit6]', null],
dispatchParts: ['ctrl+alt+meta+[Digit6]'],
}]
);
});
@@ -142,6 +143,7 @@ suite('keyboardMapper - MAC de_ch', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: false,
shiftKey: false,
altKey: false,
@@ -156,7 +158,7 @@ suite('keyboardMapper - MAC de_ch', () => {
userSettingsLabel: 'cmd+[BracketRight]',
isWYSIWYG: false,
isChord: false,
dispatchParts: ['meta+[BracketRight]', null],
dispatchParts: ['meta+[BracketRight]'],
}
);
});
@@ -171,7 +173,7 @@ suite('keyboardMapper - MAC de_ch', () => {
userSettingsLabel: 'ctrl+alt+9',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+alt+[Digit9]', null],
dispatchParts: ['ctrl+alt+[Digit9]'],
}]
);
});
@@ -186,7 +188,7 @@ suite('keyboardMapper - MAC de_ch', () => {
userSettingsLabel: 'shift+cmd+7',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['shift+meta+[Digit7]', null],
dispatchParts: ['shift+meta+[Digit7]'],
}]
);
});
@@ -201,7 +203,7 @@ suite('keyboardMapper - MAC de_ch', () => {
userSettingsLabel: 'shift+cmd+[Minus]',
isWYSIWYG: false,
isChord: false,
dispatchParts: ['shift+meta+[Minus]', null],
dispatchParts: ['shift+meta+[Minus]'],
}]
);
});
@@ -246,7 +248,7 @@ suite('keyboardMapper - MAC de_ch', () => {
userSettingsLabel: 'cmd+down',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['meta+[ArrowDown]', null],
dispatchParts: ['meta+[ArrowDown]'],
}]
);
});
@@ -261,7 +263,7 @@ suite('keyboardMapper - MAC de_ch', () => {
userSettingsLabel: 'cmd+numpad0',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['meta+[Numpad0]', null],
dispatchParts: ['meta+[Numpad0]'],
}]
);
});
@@ -276,7 +278,7 @@ suite('keyboardMapper - MAC de_ch', () => {
userSettingsLabel: 'cmd+home',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['meta+[Home]', null],
dispatchParts: ['meta+[Home]'],
}]
);
});
@@ -285,6 +287,7 @@ suite('keyboardMapper - MAC de_ch', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: false,
shiftKey: false,
altKey: false,
@@ -299,16 +302,22 @@ suite('keyboardMapper - MAC de_ch', () => {
userSettingsLabel: 'cmd+home',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['meta+[Home]', null],
dispatchParts: ['meta+[Home]'],
}
);
});
test('resolveUserBinding empty', () => {
assertResolveUserBinding(mapper, [], []);
});
test('resolveUserBinding Cmd+[Comma] Cmd+/', () => {
assertResolveUserBinding(
mapper,
new ScanCodeBinding(false, false, false, true, ScanCode.Comma),
new SimpleKeybinding(false, false, false, true, KeyCode.US_SLASH),
[
new ScanCodeBinding(false, false, false, true, ScanCode.Comma),
new SimpleKeybinding(false, false, false, true, KeyCode.US_SLASH),
],
[{
label: '⌘, ⇧⌘7',
ariaLabel: 'Command+, Shift+Command+7',
@@ -325,6 +334,7 @@ suite('keyboardMapper - MAC de_ch', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: false,
shiftKey: false,
altKey: false,
@@ -339,7 +349,7 @@ suite('keyboardMapper - MAC de_ch', () => {
userSettingsLabel: 'cmd+',
isWYSIWYG: true,
isChord: false,
dispatchParts: [null, null],
dispatchParts: [null],
}
);
});
@@ -348,6 +358,7 @@ suite('keyboardMapper - MAC de_ch', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: false,
shiftKey: false,
altKey: false,
@@ -362,7 +373,7 @@ suite('keyboardMapper - MAC de_ch', () => {
userSettingsLabel: 'cmd+',
isWYSIWYG: true,
isChord: false,
dispatchParts: [null, null],
dispatchParts: [null],
}
);
});
@@ -384,8 +395,10 @@ suite('keyboardMapper - MAC en_us', () => {
test('resolveUserBinding Cmd+[Comma] Cmd+/', () => {
assertResolveUserBinding(
mapper,
new ScanCodeBinding(false, false, false, true, ScanCode.Comma),
new SimpleKeybinding(false, false, false, true, KeyCode.US_SLASH),
[
new ScanCodeBinding(false, false, false, true, ScanCode.Comma),
new SimpleKeybinding(false, false, false, true, KeyCode.US_SLASH),
],
[{
label: '⌘, ⌘/',
ariaLabel: 'Command+, Command+/',
@@ -402,6 +415,7 @@ suite('keyboardMapper - MAC en_us', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: false,
shiftKey: false,
altKey: false,
@@ -416,7 +430,7 @@ suite('keyboardMapper - MAC en_us', () => {
userSettingsLabel: 'cmd+',
isWYSIWYG: true,
isChord: false,
dispatchParts: [null, null],
dispatchParts: [null],
}
);
});
@@ -425,6 +439,7 @@ suite('keyboardMapper - MAC en_us', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: false,
shiftKey: false,
altKey: false,
@@ -439,7 +454,7 @@ suite('keyboardMapper - MAC en_us', () => {
userSettingsLabel: 'cmd+',
isWYSIWYG: true,
isChord: false,
dispatchParts: [null, null],
dispatchParts: [null],
}
);
});
@@ -491,7 +506,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
userSettingsLabel: 'ctrl+a',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[KeyA]', null],
dispatchParts: ['ctrl+[KeyA]'],
}]
);
});
@@ -506,7 +521,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
userSettingsLabel: 'ctrl+z',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[KeyY]', null],
dispatchParts: ['ctrl+[KeyY]'],
}]
);
});
@@ -515,6 +530,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: true,
shiftKey: false,
altKey: false,
@@ -529,7 +545,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
userSettingsLabel: 'ctrl+z',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[KeyY]', null],
dispatchParts: ['ctrl+[KeyY]'],
}
);
});
@@ -545,6 +561,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: true,
shiftKey: false,
altKey: false,
@@ -559,7 +576,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
userSettingsLabel: 'ctrl+[BracketRight]',
isWYSIWYG: false,
isChord: false,
dispatchParts: ['ctrl+[BracketRight]', null],
dispatchParts: ['ctrl+[BracketRight]'],
}
);
});
@@ -574,7 +591,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
userSettingsLabel: 'ctrl+alt+0',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+alt+[Digit0]', null],
dispatchParts: ['ctrl+alt+[Digit0]'],
}, {
label: 'Ctrl+Alt+$',
ariaLabel: 'Control+Alt+$',
@@ -582,7 +599,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
userSettingsLabel: 'ctrl+alt+[Backslash]',
isWYSIWYG: false,
isChord: false,
dispatchParts: ['ctrl+alt+[Backslash]', null],
dispatchParts: ['ctrl+alt+[Backslash]'],
}]
);
});
@@ -597,7 +614,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
userSettingsLabel: 'ctrl+shift+7',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+shift+[Digit7]', null],
dispatchParts: ['ctrl+shift+[Digit7]'],
}]
);
});
@@ -612,7 +629,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
userSettingsLabel: 'ctrl+shift+[Minus]',
isWYSIWYG: false,
isChord: false,
dispatchParts: ['ctrl+shift+[Minus]', null],
dispatchParts: ['ctrl+shift+[Minus]'],
}]
);
});
@@ -649,7 +666,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
userSettingsLabel: 'ctrl+down',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[ArrowDown]', null],
dispatchParts: ['ctrl+[ArrowDown]'],
}]
);
});
@@ -664,7 +681,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
userSettingsLabel: 'ctrl+numpad0',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[Numpad0]', null],
dispatchParts: ['ctrl+[Numpad0]'],
}]
);
});
@@ -679,7 +696,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
userSettingsLabel: 'ctrl+home',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[Home]', null],
dispatchParts: ['ctrl+[Home]'],
}]
);
});
@@ -688,6 +705,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: true,
shiftKey: false,
altKey: false,
@@ -702,7 +720,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
userSettingsLabel: 'ctrl+home',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[Home]', null],
dispatchParts: ['ctrl+[Home]'],
}
);
});
@@ -711,6 +729,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: true,
shiftKey: false,
altKey: false,
@@ -725,16 +744,17 @@ suite('keyboardMapper - LINUX de_ch', () => {
userSettingsLabel: 'ctrl+x',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[KeyX]', null],
dispatchParts: ['ctrl+[KeyX]'],
}
);
});
test('resolveUserBinding Ctrl+[Comma] Ctrl+/', () => {
assertResolveUserBinding(
mapper,
new ScanCodeBinding(true, false, false, false, ScanCode.Comma),
new SimpleKeybinding(true, false, false, false, KeyCode.US_SLASH),
mapper, [
new ScanCodeBinding(true, false, false, false, ScanCode.Comma),
new SimpleKeybinding(true, false, false, false, KeyCode.US_SLASH),
],
[{
label: 'Ctrl+, Ctrl+Shift+7',
ariaLabel: 'Control+, Control+Shift+7',
@@ -751,6 +771,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: true,
shiftKey: false,
altKey: false,
@@ -765,7 +786,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
userSettingsLabel: 'ctrl+',
isWYSIWYG: true,
isChord: false,
dispatchParts: [null, null],
dispatchParts: [null],
}
);
});
@@ -774,6 +795,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: true,
shiftKey: false,
altKey: false,
@@ -788,7 +810,7 @@ suite('keyboardMapper - LINUX de_ch', () => {
userSettingsLabel: 'ctrl+',
isWYSIWYG: true,
isChord: false,
dispatchParts: [null, null],
dispatchParts: [null],
}
);
});
@@ -821,7 +843,7 @@ suite('keyboardMapper - LINUX en_us', () => {
userSettingsLabel: 'ctrl+a',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[KeyA]', null],
dispatchParts: ['ctrl+[KeyA]'],
}]
);
});
@@ -836,7 +858,7 @@ suite('keyboardMapper - LINUX en_us', () => {
userSettingsLabel: 'ctrl+z',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[KeyZ]', null],
dispatchParts: ['ctrl+[KeyZ]'],
}]
);
});
@@ -845,6 +867,7 @@ suite('keyboardMapper - LINUX en_us', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: true,
shiftKey: false,
altKey: false,
@@ -859,7 +882,7 @@ suite('keyboardMapper - LINUX en_us', () => {
userSettingsLabel: 'ctrl+z',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[KeyZ]', null],
dispatchParts: ['ctrl+[KeyZ]'],
}
);
});
@@ -874,7 +897,7 @@ suite('keyboardMapper - LINUX en_us', () => {
userSettingsLabel: 'ctrl+]',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[BracketRight]', null],
dispatchParts: ['ctrl+[BracketRight]'],
}]
);
});
@@ -883,6 +906,7 @@ suite('keyboardMapper - LINUX en_us', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: true,
shiftKey: false,
altKey: false,
@@ -897,7 +921,7 @@ suite('keyboardMapper - LINUX en_us', () => {
userSettingsLabel: 'ctrl+]',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[BracketRight]', null],
dispatchParts: ['ctrl+[BracketRight]'],
}
);
});
@@ -912,7 +936,7 @@ suite('keyboardMapper - LINUX en_us', () => {
userSettingsLabel: 'shift+]',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['shift+[BracketRight]', null],
dispatchParts: ['shift+[BracketRight]'],
}]
);
});
@@ -927,7 +951,7 @@ suite('keyboardMapper - LINUX en_us', () => {
userSettingsLabel: 'ctrl+/',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[Slash]', null],
dispatchParts: ['ctrl+[Slash]'],
}]
);
});
@@ -942,7 +966,7 @@ suite('keyboardMapper - LINUX en_us', () => {
userSettingsLabel: 'ctrl+shift+/',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+shift+[Slash]', null],
dispatchParts: ['ctrl+shift+[Slash]'],
}]
);
});
@@ -987,7 +1011,7 @@ suite('keyboardMapper - LINUX en_us', () => {
userSettingsLabel: 'ctrl+down',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[ArrowDown]', null],
dispatchParts: ['ctrl+[ArrowDown]'],
}]
);
});
@@ -1002,7 +1026,7 @@ suite('keyboardMapper - LINUX en_us', () => {
userSettingsLabel: 'ctrl+numpad0',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[Numpad0]', null],
dispatchParts: ['ctrl+[Numpad0]'],
}]
);
});
@@ -1017,7 +1041,7 @@ suite('keyboardMapper - LINUX en_us', () => {
userSettingsLabel: 'ctrl+home',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[Home]', null],
dispatchParts: ['ctrl+[Home]'],
}]
);
});
@@ -1026,6 +1050,7 @@ suite('keyboardMapper - LINUX en_us', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: true,
shiftKey: false,
altKey: false,
@@ -1040,7 +1065,7 @@ suite('keyboardMapper - LINUX en_us', () => {
userSettingsLabel: 'ctrl+home',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[Home]', null],
dispatchParts: ['ctrl+[Home]'],
}
);
});
@@ -1055,7 +1080,7 @@ suite('keyboardMapper - LINUX en_us', () => {
userSettingsLabel: 'ctrl+shift+,',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+shift+[Comma]', null],
dispatchParts: ['ctrl+shift+[Comma]'],
}, {
label: 'Ctrl+<',
ariaLabel: 'Control+<',
@@ -1063,7 +1088,7 @@ suite('keyboardMapper - LINUX en_us', () => {
userSettingsLabel: 'ctrl+[IntlBackslash]',
isWYSIWYG: false,
isChord: false,
dispatchParts: ['ctrl+[IntlBackslash]', null],
dispatchParts: ['ctrl+[IntlBackslash]'],
}]
);
});
@@ -1078,7 +1103,7 @@ suite('keyboardMapper - LINUX en_us', () => {
userSettingsLabel: 'ctrl+enter',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[Enter]', null],
dispatchParts: ['ctrl+[Enter]'],
}]
);
});
@@ -1087,6 +1112,7 @@ suite('keyboardMapper - LINUX en_us', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: true,
shiftKey: false,
altKey: false,
@@ -1101,16 +1127,17 @@ suite('keyboardMapper - LINUX en_us', () => {
userSettingsLabel: 'ctrl+enter',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[Enter]', null],
dispatchParts: ['ctrl+[Enter]'],
}
);
});
test('resolveUserBinding Ctrl+[Comma] Ctrl+/', () => {
assertResolveUserBinding(
mapper,
new ScanCodeBinding(true, false, false, false, ScanCode.Comma),
new SimpleKeybinding(true, false, false, false, KeyCode.US_SLASH),
mapper, [
new ScanCodeBinding(true, false, false, false, ScanCode.Comma),
new SimpleKeybinding(true, false, false, false, KeyCode.US_SLASH),
],
[{
label: 'Ctrl+, Ctrl+/',
ariaLabel: 'Control+, Control+/',
@@ -1125,9 +1152,9 @@ suite('keyboardMapper - LINUX en_us', () => {
test('resolveUserBinding Ctrl+[Comma]', () => {
assertResolveUserBinding(
mapper,
new ScanCodeBinding(true, false, false, false, ScanCode.Comma),
null,
mapper, [
new ScanCodeBinding(true, false, false, false, ScanCode.Comma)
],
[{
label: 'Ctrl+,',
ariaLabel: 'Control+,',
@@ -1135,7 +1162,7 @@ suite('keyboardMapper - LINUX en_us', () => {
userSettingsLabel: 'ctrl+,',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[Comma]', null],
dispatchParts: ['ctrl+[Comma]'],
}]
);
});
@@ -1144,6 +1171,7 @@ suite('keyboardMapper - LINUX en_us', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: true,
shiftKey: false,
altKey: false,
@@ -1158,7 +1186,7 @@ suite('keyboardMapper - LINUX en_us', () => {
userSettingsLabel: 'ctrl+',
isWYSIWYG: true,
isChord: false,
dispatchParts: [null, null],
dispatchParts: [null],
}
);
});
@@ -1167,6 +1195,7 @@ suite('keyboardMapper - LINUX en_us', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: true,
shiftKey: false,
altKey: false,
@@ -1181,7 +1210,7 @@ suite('keyboardMapper - LINUX en_us', () => {
userSettingsLabel: 'ctrl+',
isWYSIWYG: true,
isChord: false,
dispatchParts: [null, null],
dispatchParts: [null],
}
);
});
@@ -1202,6 +1231,7 @@ suite('keyboardMapper', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: true,
shiftKey: false,
altKey: false,
@@ -1216,7 +1246,7 @@ suite('keyboardMapper', () => {
userSettingsLabel: 'ctrl+`',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[Backquote]', null],
dispatchParts: ['ctrl+[Backquote]'],
}
);
});
@@ -1228,6 +1258,7 @@ suite('keyboardMapper', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: false,
shiftKey: false,
altKey: false,
@@ -1242,7 +1273,7 @@ suite('keyboardMapper', () => {
userSettingsLabel: userSettingsLabel,
isWYSIWYG: true,
isChord: false,
dispatchParts: [dispatch, null],
dispatchParts: [dispatch],
}
);
}
@@ -1267,6 +1298,7 @@ suite('keyboardMapper', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: false,
shiftKey: false,
altKey: false,
@@ -1281,7 +1313,7 @@ suite('keyboardMapper', () => {
userSettingsLabel: userSettingsLabel,
isWYSIWYG: true,
isChord: false,
dispatchParts: [dispatch, null],
dispatchParts: [dispatch],
}
);
}
@@ -1339,7 +1371,7 @@ suite('keyboardMapper - LINUX ru', () => {
userSettingsLabel: 'ctrl+s',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['ctrl+[KeyS]', null],
dispatchParts: ['ctrl+[KeyS]'],
}]
);
});
@@ -1362,6 +1394,7 @@ suite('keyboardMapper - LINUX en_uk', () => {
assertResolveKeyboardEvent(
mapper,
{
_standardKeyboardEventBrand: true,
ctrlKey: true,
shiftKey: false,
altKey: true,
@@ -1376,7 +1409,7 @@ suite('keyboardMapper - LINUX en_uk', () => {
userSettingsLabel: 'ctrl+alt+[Minus]',
isWYSIWYG: false,
isChord: false,
dispatchParts: ['ctrl+alt+[Minus]', null],
dispatchParts: ['ctrl+alt+[Minus]'],
}
);
});
@@ -1409,7 +1442,7 @@ suite('keyboardMapper - MAC zh_hant', () => {
userSettingsLabel: 'cmd+c',
isWYSIWYG: true,
isChord: false,
dispatchParts: ['meta+[KeyC]', null],
dispatchParts: ['meta+[KeyC]'],
}]
);
});
@@ -1425,17 +1458,17 @@ function _assertKeybindingTranslation(mapper: MacLinuxKeyboardMapper, OS: Operat
expected = [];
}
const runtimeKeybinding = createKeybinding(kb, OS);
const runtimeKeybinding = createSimpleKeybinding(kb, OS);
const keybindingLabel = new USLayoutResolvedKeybinding(runtimeKeybinding!, OS).getUserSettingsLabel();
const keybindingLabel = new USLayoutResolvedKeybinding(runtimeKeybinding.toChord(), OS).getUserSettingsLabel();
const actualHardwareKeypresses = mapper.simpleKeybindingToScanCodeBinding(<SimpleKeybinding>runtimeKeybinding);
const actualHardwareKeypresses = mapper.simpleKeybindingToScanCodeBinding(runtimeKeybinding);
if (actualHardwareKeypresses.length === 0) {
assert.deepEqual([], expected, `simpleKeybindingToHardwareKeypress -- "${keybindingLabel}" -- actual: "[]" -- expected: "${expected}"`);
return;
}
const actual = actualHardwareKeypresses
.map(k => UserSettingsLabelProvider.toLabel(k, ScanCodeUtils.toString(k.scanCode), null, null, OS));
.map(k => UserSettingsLabelProvider.toLabel(OS, [k], (keybinding) => ScanCodeUtils.toString(keybinding.scanCode)));
assert.deepEqual(actual, expected, `simpleKeybindingToHardwareKeypress -- "${keybindingLabel}" -- actual: "${actual}" -- expected: "${expected}"`);
}