Keyboard mappings with `setxkbmap` on Linux not working
See original GitHub issue- VSCode Version: 1.11.0
- OS Version: Ubuntu 16.04
I have my Caps Lock key bound to Escape using setxkbmap
on Linux. This worked fine till 1.10, but broke with 1.11. At first I thought it was an issue with the VSCodeVim extension, but the issue persists with all the other Vim extensions on the marketplace as well. Pressing the escape button still works as expected.
The binding is still respected everywhere else in the operating system, it’s only Visual Studio Code that ignores it for some reason.
Steps to Reproduce:
- Run
setxkbmap -option caps:escape
(binds caps to escape for the duration of the session) - Hitting caps lock when in insert mode (with a Vim extension like VSCodeVim installed) no longer puts you normal mode.
- Hitting escape still works as expected and puts you in normal mode.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:249
- Comments:89 (8 by maintainers)
Top Results From Across the Web
How to (permently) set keyboard mappings using setxkbmap ...
I have already spent several hours googling and trying different things to resolve the problem, like: sudo, clearing cache, rebooting, ...
Read more >Setxkbmap not working - changing kb layout
The problem is, that setxkbmap seems to have absolutely no effect on my system. I tried: adding exec --no-startup-id "setxkbmap -layout us,en - ......
Read more >Why does "setxkbmap de" not have an effect in a terminal?
Try to use the keyboard shortcut for switching layout instead of the setxkbmap command. The default shortcut is <Super>+<Space>. – Gunnar ...
Read more >Xorg/Keyboard configuration - ArchWiki
Note: Fcitx/IBus users may find these methods not working, ... setxkbmap sets the keyboard layout for the current X session only, ...
Read more >Keyboard - Debian Wiki
To configure the keyboard for Linux kernel and X, you have to install keyboard-configuration. The package console-setup is also needed.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is something that might be broken by us dispatching based on scan codes. I am sorry about it, I need some time to investigate how these options should be handled. i.e. should Chromium handle these mappings or should we do it at the application layer.
Workaround to switch VS Code to dispatch based on key code again. Add the following setting:
"keyboard.dispatch": "keyCode"
and restart VS Code@kylebakerio Maybe don’t use Microsoft software on linux.