Skip to content

Commit bf5b1db

Browse files
committed
Document current keybinding behaviour for TCIM.Zhuyin (microsoft#28237)
1 parent 5f443db commit bf5b1db

3 files changed

Lines changed: 1764 additions & 0 deletions

File tree

src/vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,6 +1458,49 @@ suite('keyboardMapper - LINUX en_uk', () => {
14581458
});
14591459
});
14601460

1461+
suite('keyboardMapper - MAC zh_hant', () => {
1462+
1463+
let mapper: MacLinuxKeyboardMapper;
1464+
1465+
suiteSetup((done) => {
1466+
createKeyboardMapper(false, 'mac_zh_hant', OperatingSystem.Macintosh).then((_mapper) => {
1467+
mapper = _mapper;
1468+
done();
1469+
}, done);
1470+
});
1471+
1472+
test('mapping', (done) => {
1473+
assertMapping(WRITE_FILE_IF_DIFFERENT, mapper, 'mac_zh_hant.txt', done);
1474+
});
1475+
1476+
function _assertResolveKeybinding(k: number, expected: IResolvedKeybinding[]): void {
1477+
assertResolveKeybinding(mapper, createKeybinding(k, OperatingSystem.Macintosh), expected);
1478+
}
1479+
1480+
test('issue #28237 resolveKeybinding Cmd+C', () => {
1481+
_assertResolveKeybinding(
1482+
KeyMod.CtrlCmd | KeyCode.KEY_C,
1483+
[{
1484+
label: '⌘C',
1485+
ariaLabel: 'Command+C',
1486+
electronAccelerator: 'Cmd+C',
1487+
userSettingsLabel: 'cmd+c',
1488+
isWYSIWYG: true,
1489+
isChord: false,
1490+
dispatchParts: ['meta+[KeyC]', null],
1491+
}, {
1492+
label: '⌃⌥⌘C',
1493+
ariaLabel: 'Control+Alt+Command+C',
1494+
electronAccelerator: 'Ctrl+Alt+Cmd+C',
1495+
userSettingsLabel: 'ctrl+alt+cmd+c',
1496+
isWYSIWYG: true,
1497+
isChord: false,
1498+
dispatchParts: ['ctrl+alt+meta+[KeyC]', null],
1499+
}]
1500+
);
1501+
});
1502+
});
1503+
14611504
function _assertKeybindingTranslation(mapper: MacLinuxKeyboardMapper, OS: OperatingSystem, kb: number, _expected: string | string[]): void {
14621505
let expected: string[];
14631506
if (typeof _expected === 'string') {

0 commit comments

Comments
 (0)