Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Code no longer respects remapped escape key using xmodmap #32037

Closed
mattiasflodin opened this issue Aug 4, 2017 · 4 comments
Closed

VS Code no longer respects remapped escape key using xmodmap #32037

mattiasflodin opened this issue Aug 4, 2017 · 4 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@mattiasflodin
Copy link

  • VSCode Version: Code 1.14.2 (cb82feb, 2017-07-19T23:26:08.116Z)
  • OS Version: Linux x64 4.9.6-gentoo-r1
  • Extensions:
Extension Author (truncated) Version
head-file-guard bjr 0.0.2
python don 0.7.0
vscode-rust kal 0.4.2
cpptools ms- 0.12.2
final-newline sam 0.3.2
change-case wma 1.0.0

I use xmodmap to swap the meaning of the Esc and Caps Lock keys. In other words, I press the physical Esc key to enable caps lock (very rare) and the physical Caps Lock for escape (very common). This used to work fine in VS Code 1.8.1 but misbehaves in 1.14.2. VS Code is the only software I have used that does this.

Swapping Esc and Caps Lock is common among Vim users, who frequently use the Esc key. See e.g. http://vim.wikia.com/wiki/Map_caps_lock_to_escape_in_XWindows.

Steps to Reproduce:

  1. Make a file swap_escape with the following content:
remove Lock = Caps_Lock  
keysym Escape = Caps_Lock
keysym Caps_Lock = Escape
add Lock = Caps_Lock
  1. Use xmodmap to remap the keys
xmodmap swap_escape
  1. Caps Lock should now perform the function typically assigned to Esc, and vice versa.

  2. Select some text in VS Code. Press the Caps Lock key. Expected: text is unselected (because the key means escape to the OS). Observed: nothing happens.

  3. Select some text in VS Code. Press the Esc key. Expected: selection remains, caps lock is enabled in the OS. Observed: Text is unselected and caps lock is enabled in the OS.

Reproduces without extensions: Yes

@vscodebot vscodebot bot added the editor label Aug 4, 2017
@zlatin
Copy link

zlatin commented Aug 11, 2017

The same issue as of VSCode Version: Code 1.15.0 (8b95971, 2017-08-09T20:09:15.006Z)

@kfpo
Copy link

kfpo commented Aug 13, 2017

You could set

"keyboard.dispatch": "keyCode"

in settings (works for me).

@mattiasflodin
Copy link
Author

Yes, setting "keyboard.dispatch": "keyCode" works around the issue for me also (though I'm assuming this will introduce other limitations related to keyboard layout changes).

@mattiasflodin
Copy link
Author

Searching for "keyboard.dispatch" I ran across a duplicate for this issue: #23991. Don't know why it didn't turn up in search results before, sorry for the noise.

@alexdima alexdima added the *duplicate Issue identified as a duplicate of another issue(s) label Sep 28, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

5 participants