@codingame/monaco-vscode-keybindings-service-override 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/keybindings.js +6 -6
- package/package.json +9 -9
- package/vscode/src/vs/platform/keyboardLayout/common/keyboardConfig.js +0 -50
- package/vscode/src/vs/platform/keyboardLayout/common/keyboardMapper.js +0 -24
- package/vscode/src/vs/workbench/contrib/commands/common/commands.contribution.js +0 -146
- package/vscode/src/vs/workbench/contrib/keybindings/browser/keybindings.contribution.js +0 -29
- package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingsEditorContribution.js +0 -250
- package/vscode/src/vs/workbench/contrib/preferences/common/smartSnippetInserter.js +0 -126
- package/vscode/src/vs/workbench/services/actions/common/menusExtensionPoint.js +0 -1597
- package/vscode/src/vs/workbench/services/commands/common/commandService.js +0 -79
- package/vscode/src/vs/workbench/services/keybinding/browser/keybindingService.js +0 -947
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.js +0 -502
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution.js +0 -14
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/cz.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/de-swiss.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/de.darwin.js +0 -126
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/de.linux.js +0 -181
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/de.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/dk.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/dvorak.darwin.js +0 -126
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-belgian.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-ext.darwin.js +0 -126
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-in.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-intl.darwin.js +0 -126
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-intl.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-uk.darwin.js +0 -126
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-uk.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en.darwin.js +0 -134
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en.linux.js +0 -183
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en.win.js +0 -168
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/es-latin.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/es.darwin.js +0 -126
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/es.linux.js +0 -181
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/es.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/fr.darwin.js +0 -126
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/fr.linux.js +0 -181
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/fr.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/hu.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/it.darwin.js +0 -126
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/it.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/jp-roman.darwin.js +0 -126
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/jp.darwin.js +0 -126
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/ko.darwin.js +0 -126
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.darwin.js +0 -17
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.linux.js +0 -6
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.win.js +0 -23
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/no.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/pl.darwin.js +0 -126
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/pl.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/pt-br.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/pt.darwin.js +0 -126
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/pt.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/ru.darwin.js +0 -126
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/ru.linux.js +0 -181
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/ru.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/sv.win.js +0 -165
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/thai.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/tr.win.js +0 -163
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/zh-hans.darwin.js +0 -126
- package/vscode/src/vs/workbench/services/keybinding/common/keybindingIO.js +0 -74
- package/vscode/src/vs/workbench/services/keybinding/common/keymapInfo.js +0 -110
- package/vscode/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.js +0 -888
- package/vscode/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.js +0 -352
package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/zh-hans.darwin.js
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { KeyboardLayoutContribution } from './_.contribution.js';
|
|
2
|
-
|
|
3
|
-
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
|
|
4
|
-
layout: { id: 'com.apple.inputmethod.SCIM.ITABC', lang: 'zh-Hans', localizedName: '搜狗拼音' },
|
|
5
|
-
secondaryLayouts: [],
|
|
6
|
-
mapping: {
|
|
7
|
-
KeyA: ['a', 'A', 'å', 'Å', 0],
|
|
8
|
-
KeyB: ['b', 'B', '∫', 'ı', 0],
|
|
9
|
-
KeyC: ['c', 'C', 'ç', 'Ç', 0],
|
|
10
|
-
KeyD: ['d', 'D', '∂', 'Î', 0],
|
|
11
|
-
KeyE: ['e', 'E', '´', '´', 4],
|
|
12
|
-
KeyF: ['f', 'F', 'ƒ', 'Ï', 0],
|
|
13
|
-
KeyG: ['g', 'G', '©', '˝', 0],
|
|
14
|
-
KeyH: ['h', 'H', '˙', 'Ó', 0],
|
|
15
|
-
KeyI: ['i', 'I', 'ˆ', 'ˆ', 4],
|
|
16
|
-
KeyJ: ['j', 'J', '∆', 'Ô', 0],
|
|
17
|
-
KeyK: ['k', 'K', '˚', '', 0],
|
|
18
|
-
KeyL: ['l', 'L', '¬', 'Ò', 0],
|
|
19
|
-
KeyM: ['m', 'M', 'µ', 'Â', 0],
|
|
20
|
-
KeyN: ['n', 'N', '˜', '˜', 4],
|
|
21
|
-
KeyO: ['o', 'O', 'ø', 'Ø', 0],
|
|
22
|
-
KeyP: ['p', 'P', 'π', '∏', 0],
|
|
23
|
-
KeyQ: ['q', 'Q', 'œ', 'Œ', 0],
|
|
24
|
-
KeyR: ['r', 'R', '®', '‰', 0],
|
|
25
|
-
KeyS: ['s', 'S', 'ß', 'Í', 0],
|
|
26
|
-
KeyT: ['t', 'T', '†', 'ˇ', 0],
|
|
27
|
-
KeyU: ['u', 'U', '¨', '¨', 4],
|
|
28
|
-
KeyV: ['v', 'V', '√', '◊', 0],
|
|
29
|
-
KeyW: ['w', 'W', '∑', '„', 0],
|
|
30
|
-
KeyX: ['x', 'X', '≈', '˛', 0],
|
|
31
|
-
KeyY: ['y', 'Y', '¥', 'Á', 0],
|
|
32
|
-
KeyZ: ['z', 'Z', 'Ω', '¸', 0],
|
|
33
|
-
Digit1: ['1', '!', '¡', '⁄', 0],
|
|
34
|
-
Digit2: ['2', '@', '™', '€', 0],
|
|
35
|
-
Digit3: ['3', '#', '£', '‹', 0],
|
|
36
|
-
Digit4: ['4', '¥', '¢', '›', 0],
|
|
37
|
-
Digit5: ['5', '%', '∞', 'fi', 0],
|
|
38
|
-
Digit6: ['6', '', '§', 'fl', 0],
|
|
39
|
-
Digit7: ['7', '&', '¶', '‡', 0],
|
|
40
|
-
Digit8: ['8', '*', '•', '°', 0],
|
|
41
|
-
Digit9: ['9', '(', 'ª', '·', 0],
|
|
42
|
-
Digit0: ['0', ')', 'º', '‚', 0],
|
|
43
|
-
Enter: [],
|
|
44
|
-
Escape: [],
|
|
45
|
-
Backspace: [],
|
|
46
|
-
Tab: [],
|
|
47
|
-
Space: [' ', ' ', ' ', ' ', 0],
|
|
48
|
-
Minus: ['-', '', '–', '—', 0],
|
|
49
|
-
Equal: ['=', '+', '≠', '±', 0],
|
|
50
|
-
BracketLeft: ['【', '「', '“', '”', 0],
|
|
51
|
-
BracketRight: ['】', '」', '‘', '’', 0],
|
|
52
|
-
Backslash: ['、', '|', '«', '»', 0],
|
|
53
|
-
Semicolon: [';', ':', '…', 'Ú', 0],
|
|
54
|
-
Quote: ['\'', '"', 'æ', 'Æ', 0],
|
|
55
|
-
Backquote: ['·', '~', '`', '`', 4],
|
|
56
|
-
Comma: [',', '《', '≤', '¯', 0],
|
|
57
|
-
Period: ['。', '》', '≥', '˘', 0],
|
|
58
|
-
Slash: ['/', '?', '÷', '¿', 0],
|
|
59
|
-
CapsLock: [],
|
|
60
|
-
F1: [],
|
|
61
|
-
F2: [],
|
|
62
|
-
F3: [],
|
|
63
|
-
F4: [],
|
|
64
|
-
F5: [],
|
|
65
|
-
F6: [],
|
|
66
|
-
F7: [],
|
|
67
|
-
F8: [],
|
|
68
|
-
F9: [],
|
|
69
|
-
F10: [],
|
|
70
|
-
F11: [],
|
|
71
|
-
F12: [],
|
|
72
|
-
Insert: [],
|
|
73
|
-
Home: [],
|
|
74
|
-
PageUp: [],
|
|
75
|
-
Delete: [],
|
|
76
|
-
End: [],
|
|
77
|
-
PageDown: [],
|
|
78
|
-
ArrowRight: [],
|
|
79
|
-
ArrowLeft: [],
|
|
80
|
-
ArrowDown: [],
|
|
81
|
-
ArrowUp: [],
|
|
82
|
-
NumLock: [],
|
|
83
|
-
NumpadDivide: ['/', '/', '/', '/', 0],
|
|
84
|
-
NumpadMultiply: ['*', '*', '*', '*', 0],
|
|
85
|
-
NumpadSubtract: ['-', '-', '-', '-', 0],
|
|
86
|
-
NumpadAdd: ['+', '+', '+', '+', 0],
|
|
87
|
-
NumpadEnter: [],
|
|
88
|
-
Numpad1: ['1', '1', '1', '1', 0],
|
|
89
|
-
Numpad2: ['2', '2', '2', '2', 0],
|
|
90
|
-
Numpad3: ['3', '3', '3', '3', 0],
|
|
91
|
-
Numpad4: ['4', '4', '4', '4', 0],
|
|
92
|
-
Numpad5: ['5', '5', '5', '5', 0],
|
|
93
|
-
Numpad6: ['6', '6', '6', '6', 0],
|
|
94
|
-
Numpad7: ['7', '7', '7', '7', 0],
|
|
95
|
-
Numpad8: ['8', '8', '8', '8', 0],
|
|
96
|
-
Numpad9: ['9', '9', '9', '9', 0],
|
|
97
|
-
Numpad0: ['0', '0', '0', '0', 0],
|
|
98
|
-
NumpadDecimal: ['.', '.', '.', '.', 0],
|
|
99
|
-
IntlBackslash: ['§', '±', '§', '±', 0],
|
|
100
|
-
ContextMenu: [],
|
|
101
|
-
NumpadEqual: ['=', '=', '=', '=', 0],
|
|
102
|
-
F13: [],
|
|
103
|
-
F14: [],
|
|
104
|
-
F15: [],
|
|
105
|
-
F16: [],
|
|
106
|
-
F17: [],
|
|
107
|
-
F18: [],
|
|
108
|
-
F19: [],
|
|
109
|
-
F20: [],
|
|
110
|
-
AudioVolumeMute: [],
|
|
111
|
-
AudioVolumeUp: ['', '=', '', '=', 0],
|
|
112
|
-
AudioVolumeDown: [],
|
|
113
|
-
NumpadComma: [],
|
|
114
|
-
IntlRo: [],
|
|
115
|
-
KanaMode: [],
|
|
116
|
-
IntlYen: [],
|
|
117
|
-
ControlLeft: [],
|
|
118
|
-
ShiftLeft: [],
|
|
119
|
-
AltLeft: [],
|
|
120
|
-
MetaLeft: [],
|
|
121
|
-
ControlRight: [],
|
|
122
|
-
ShiftRight: [],
|
|
123
|
-
AltRight: [],
|
|
124
|
-
MetaRight: []
|
|
125
|
-
}
|
|
126
|
-
});
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { KeybindingParser } from 'vscode/vscode/vs/base/common/keybindingParser';
|
|
2
|
-
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
3
|
-
|
|
4
|
-
class KeybindingIO {
|
|
5
|
-
static writeKeybindingItem(out, item) {
|
|
6
|
-
if (!item.resolvedKeybinding) {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
const quotedSerializedKeybinding = JSON.stringify(item.resolvedKeybinding.getUserSettingsLabel());
|
|
10
|
-
out.write(`{ "key": ${rightPaddedString(quotedSerializedKeybinding + ',', 25)} "command": `);
|
|
11
|
-
const quotedSerializedWhen = item.when ? JSON.stringify(item.when.serialize()) : '';
|
|
12
|
-
const quotedSerializeCommand = JSON.stringify(item.command);
|
|
13
|
-
if (quotedSerializedWhen.length > 0) {
|
|
14
|
-
out.write(`${quotedSerializeCommand},`);
|
|
15
|
-
out.writeLine();
|
|
16
|
-
out.write(` "when": ${quotedSerializedWhen}`);
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
out.write(`${quotedSerializeCommand}`);
|
|
20
|
-
}
|
|
21
|
-
if (item.commandArgs) {
|
|
22
|
-
out.write(',');
|
|
23
|
-
out.writeLine();
|
|
24
|
-
out.write(` "args": ${JSON.stringify(item.commandArgs)}`);
|
|
25
|
-
}
|
|
26
|
-
out.write(' }');
|
|
27
|
-
}
|
|
28
|
-
static readUserKeybindingItem(input) {
|
|
29
|
-
const keybinding = 'key' in input && typeof input.key === 'string'
|
|
30
|
-
? KeybindingParser.parseKeybinding(input.key)
|
|
31
|
-
: null;
|
|
32
|
-
const when = 'when' in input && typeof input.when === 'string'
|
|
33
|
-
? ContextKeyExpr.deserialize(input.when)
|
|
34
|
-
: undefined;
|
|
35
|
-
const command = 'command' in input && typeof input.command === 'string'
|
|
36
|
-
? input.command
|
|
37
|
-
: null;
|
|
38
|
-
const commandArgs = 'args' in input && typeof input.args !== 'undefined'
|
|
39
|
-
? input.args
|
|
40
|
-
: undefined;
|
|
41
|
-
return {
|
|
42
|
-
keybinding,
|
|
43
|
-
command,
|
|
44
|
-
commandArgs,
|
|
45
|
-
when,
|
|
46
|
-
_sourceKey: 'key' in input && typeof input.key === 'string' ? input.key : undefined,
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function rightPaddedString(str, minChars) {
|
|
51
|
-
if (str.length < minChars) {
|
|
52
|
-
return str + (( new Array(minChars - str.length)).join(' '));
|
|
53
|
-
}
|
|
54
|
-
return str;
|
|
55
|
-
}
|
|
56
|
-
class OutputBuilder {
|
|
57
|
-
constructor() {
|
|
58
|
-
this._lines = [];
|
|
59
|
-
this._currentLine = '';
|
|
60
|
-
}
|
|
61
|
-
write(str) {
|
|
62
|
-
this._currentLine += str;
|
|
63
|
-
}
|
|
64
|
-
writeLine(str = '') {
|
|
65
|
-
this._lines.push(this._currentLine + str);
|
|
66
|
-
this._currentLine = '';
|
|
67
|
-
}
|
|
68
|
-
toString() {
|
|
69
|
-
this.writeLine();
|
|
70
|
-
return this._lines.join('\n');
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export { KeybindingIO, OutputBuilder };
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { isWindows, isLinux } from 'vscode/vscode/vs/base/common/platform';
|
|
2
|
-
import { getKeyboardLayoutId } from 'vscode/vscode/vs/platform/keyboardLayout/common/keyboardLayout';
|
|
3
|
-
|
|
4
|
-
function deserializeMapping(serializedMapping) {
|
|
5
|
-
const mapping = serializedMapping;
|
|
6
|
-
const ret = {};
|
|
7
|
-
for (const key in mapping) {
|
|
8
|
-
const result = mapping[key];
|
|
9
|
-
if (result.length) {
|
|
10
|
-
const value = result[0];
|
|
11
|
-
const withShift = result[1];
|
|
12
|
-
const withAltGr = result[2];
|
|
13
|
-
const withShiftAltGr = result[3];
|
|
14
|
-
const mask = Number(result[4]);
|
|
15
|
-
const vkey = result.length === 6 ? result[5] : undefined;
|
|
16
|
-
ret[key] = {
|
|
17
|
-
'value': value,
|
|
18
|
-
'vkey': vkey,
|
|
19
|
-
'withShift': withShift,
|
|
20
|
-
'withAltGr': withAltGr,
|
|
21
|
-
'withShiftAltGr': withShiftAltGr,
|
|
22
|
-
'valueIsDeadKey': (mask & 1) > 0,
|
|
23
|
-
'withShiftIsDeadKey': (mask & 2) > 0,
|
|
24
|
-
'withAltGrIsDeadKey': (mask & 4) > 0,
|
|
25
|
-
'withShiftAltGrIsDeadKey': (mask & 8) > 0
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
ret[key] = {
|
|
30
|
-
'value': '',
|
|
31
|
-
'valueIsDeadKey': false,
|
|
32
|
-
'withShift': '',
|
|
33
|
-
'withShiftIsDeadKey': false,
|
|
34
|
-
'withAltGr': '',
|
|
35
|
-
'withAltGrIsDeadKey': false,
|
|
36
|
-
'withShiftAltGr': '',
|
|
37
|
-
'withShiftAltGrIsDeadKey': false
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return ret;
|
|
42
|
-
}
|
|
43
|
-
class KeymapInfo {
|
|
44
|
-
constructor(layout, secondaryLayouts, keyboardMapping, isUserKeyboardLayout) {
|
|
45
|
-
this.layout = layout;
|
|
46
|
-
this.secondaryLayouts = secondaryLayouts;
|
|
47
|
-
this.mapping = deserializeMapping(keyboardMapping);
|
|
48
|
-
this.isUserKeyboardLayout = !!isUserKeyboardLayout;
|
|
49
|
-
this.layout.isUserKeyboardLayout = !!isUserKeyboardLayout;
|
|
50
|
-
}
|
|
51
|
-
static createKeyboardLayoutFromDebugInfo(layout, value, isUserKeyboardLayout) {
|
|
52
|
-
const keyboardLayoutInfo = ( new KeymapInfo(layout, [], {}, true));
|
|
53
|
-
keyboardLayoutInfo.mapping = value;
|
|
54
|
-
return keyboardLayoutInfo;
|
|
55
|
-
}
|
|
56
|
-
update(other) {
|
|
57
|
-
this.layout = other.layout;
|
|
58
|
-
this.secondaryLayouts = other.secondaryLayouts;
|
|
59
|
-
this.mapping = other.mapping;
|
|
60
|
-
this.isUserKeyboardLayout = other.isUserKeyboardLayout;
|
|
61
|
-
this.layout.isUserKeyboardLayout = other.isUserKeyboardLayout;
|
|
62
|
-
}
|
|
63
|
-
getScore(other) {
|
|
64
|
-
let score = 0;
|
|
65
|
-
for (const key in other) {
|
|
66
|
-
if (isWindows && (key === 'Backslash' || key === 'KeyQ')) {
|
|
67
|
-
continue;
|
|
68
|
-
}
|
|
69
|
-
if (isLinux && (key === 'Backspace' || key === 'Escape')) {
|
|
70
|
-
continue;
|
|
71
|
-
}
|
|
72
|
-
const currentMapping = this.mapping[key];
|
|
73
|
-
if (currentMapping === undefined) {
|
|
74
|
-
score -= 1;
|
|
75
|
-
}
|
|
76
|
-
const otherMapping = other[key];
|
|
77
|
-
if (currentMapping && otherMapping && currentMapping.value !== otherMapping.value) {
|
|
78
|
-
score -= 1;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return score;
|
|
82
|
-
}
|
|
83
|
-
equal(other) {
|
|
84
|
-
if (this.isUserKeyboardLayout !== other.isUserKeyboardLayout) {
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
87
|
-
if (getKeyboardLayoutId(this.layout) !== getKeyboardLayoutId(other.layout)) {
|
|
88
|
-
return false;
|
|
89
|
-
}
|
|
90
|
-
return this.fuzzyEqual(other.mapping);
|
|
91
|
-
}
|
|
92
|
-
fuzzyEqual(other) {
|
|
93
|
-
for (const key in other) {
|
|
94
|
-
if (isWindows && (key === 'Backslash' || key === 'KeyQ')) {
|
|
95
|
-
continue;
|
|
96
|
-
}
|
|
97
|
-
if (this.mapping[key] === undefined) {
|
|
98
|
-
return false;
|
|
99
|
-
}
|
|
100
|
-
const currentMapping = this.mapping[key];
|
|
101
|
-
const otherMapping = other[key];
|
|
102
|
-
if (currentMapping.value !== otherMapping.value) {
|
|
103
|
-
return false;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return true;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export { KeymapInfo };
|