fix: #2720 Alt gr problem on other keyboard layouts (#2769)

This commit is contained in:
Christoph Singewald 2022-01-02 21:13:37 +01:00 committed by GitHub
parent f3caf90920
commit c7060934ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,7 @@ import { isFile2 } from 'common/filesystem'
import { isOsx } from '../config'
import { getKeyboardLanguage, getVirtualLetters } from '../keyboard'
const tabSwitchBaseStroke = (isOsx) ? 'Ctrl' : 'Alt'
// Problematic key bindings:
// Aidou: Ctrl+/ -> dead key
// Inline Code: Ctrl+` -> dead key
@ -111,16 +112,16 @@ class Keybindings {
['tabs.cycle-backward', 'CmdOrCtrl+Shift+Tab'],
['tabs.switch-to-left', 'CmdOrCtrl+PageUp'],
['tabs.switch-to-right', 'CmdOrCtrl+PageDown'],
['tabs.switch-to-first', 'Alt+1'],
['tabs.switch-to-second', 'Alt+2'],
['tabs.switch-to-third', 'Alt+3'],
['tabs.switch-to-fourth', 'Alt+4'],
['tabs.switch-to-fifth', 'Alt+5'],
['tabs.switch-to-sixth', 'Alt+6'],
['tabs.switch-to-seventh', 'Alt+7'],
['tabs.switch-to-eighth', 'Alt+8'],
['tabs.switch-to-ninth', 'Alt+9'],
['tabs.switch-to-tenth', 'Alt+0'],
['tabs.switch-to-first', `${tabSwitchBaseStroke}+1`],
['tabs.switch-to-second', `${tabSwitchBaseStroke}+2`],
['tabs.switch-to-third', `${tabSwitchBaseStroke}+3`],
['tabs.switch-to-fourth', `${tabSwitchBaseStroke}+4`],
['tabs.switch-to-fifth', `${tabSwitchBaseStroke}+5`],
['tabs.switch-to-sixth', `${tabSwitchBaseStroke}+6`],
['tabs.switch-to-seventh', `${tabSwitchBaseStroke}+7`],
['tabs.switch-to-eighth', `${tabSwitchBaseStroke}+8`],
['tabs.switch-to-ninth', `${tabSwitchBaseStroke}+9`],
['tabs.switch-to-tenth', `${tabSwitchBaseStroke}+0`],
['file.quick-open', 'CmdOrCtrl+P']
])