Skip to content

Commit 67bbaae

Browse files
committed
Fixes microsoft#86133: Reverse resolved keybindings
1 parent 41e5936 commit 67bbaae

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/vs/workbench/services/keybinding/browser/keybindingService.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,8 @@ export class WorkbenchKeybindingService extends AbstractKeybindingService {
338338
}
339339

340340
const resolvedKeybindings = this.resolveKeybinding(keybinding);
341-
for (const resolvedKeybinding of resolvedKeybindings) {
341+
for (let i = resolvedKeybindings.length - 1; i >= 0; i--) {
342+
const resolvedKeybinding = resolvedKeybindings[i];
342343
result[resultLen++] = new ResolvedKeybindingItem(resolvedKeybinding, item.command, item.commandArgs, when, isDefault);
343344
}
344345
}

src/vs/workbench/services/keybinding/electron-browser/nativeKeymapService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class KeyboardMapperFactory {
6161
private static _isUSStandard(_kbInfo: nativeKeymap.IKeyboardLayoutInfo): boolean {
6262
if (OS === OperatingSystem.Linux) {
6363
const kbInfo = <nativeKeymap.ILinuxKeyboardLayoutInfo>_kbInfo;
64-
return (kbInfo && kbInfo.layout === 'us');
64+
return (kbInfo && (kbInfo.layout === 'us' || /^us,/.test(kbInfo.layout)));
6565
}
6666

6767
if (OS === OperatingSystem.Macintosh) {

0 commit comments

Comments
 (0)