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

Key remapping using xkbd options broke with the keybinding changes in 1.11 #24220

Closed
lorenz opened this issue Apr 7, 2017 · 10 comments
Closed
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@lorenz
Copy link

lorenz commented Apr 7, 2017

  • VSCode Version: 1.11.0
  • OS Version: Ubuntu 16.10

I originally commented in #24057 but was told to open a separate issue.

I use the xkb option caps:swapescape to map my ESC key to the caps lock key in my keyboard layout because I like to use Vim mode for editing in VSCode. Since 1.11.0 VSCode caps lock does nothing (not even switch capitalization). The ESC key actually acts as an ESC key in VSCode but switches captitalization.

Since 1.11 can now read the keyboard layout it probably just does not handle options on it and therefore gets the key mapping wrong.

@dsifford
Copy link

dsifford commented Apr 7, 2017

Same issue here!

@mcfletch
Copy link

mcfletch commented Apr 7, 2017

This interferes with any custom keyboard layout mapping for X11 using e.g. xmodmap. For instance, remappings that fix inappropriate/broken keyboard layouts. The key-mappings remain available across the bulk of MSCode (dialogs, etc), but not in the text editor window. (I'm on Kubuntu 16.10 w/ MSCode 1.11.0)

Test case (assumes a regular US-english keyboard layout):
$ xmodmap -e "keycode 105 = End"

Now your right-control key should be remapped to act like the End key (test to be sure before proceeding, if not, use xev to discover the keycode of your right-control key). Start MSCode, open a text file and you'll find it doesn't act as an End key in the text editor.

@dsifford
Copy link

dsifford commented Apr 7, 2017

@mcfletch Confirmed here.. I use xmodmap to map my esc key to caps lock.

Edit: Also, I can confirm that the remap does work in other vscode dialogs. Just not the editor.

Distro: Arch Linux

@chrmarti
Copy link
Contributor

chrmarti commented Apr 7, 2017

Is this all with U.S. English keyboard layouts?

@mcfletch
Copy link

mcfletch commented Apr 7, 2017

@chrmarti the keyboard layout shouldn't change the behaviour, it just controls the keycode's used in setting up the test case for replication. In my case, yes, us-english XPS 15.

@Wehrdo
Copy link

Wehrdo commented Apr 7, 2017

I just want to add that this also affects the default Colemak keyboard layout on Ubuntu 16.04, which assigns the caps lock key to backspace. I'm not sure how Ubuntu handles that under the hood, but it's at least another datapoint to check.

@hstefan
Copy link

hstefan commented Apr 7, 2017

Also having the same problem as @Wehrdo, but on Arch Linux with Cinnamon.

@lorenz
Copy link
Author

lorenz commented Apr 7, 2017

Affects Swiss and US keyboard layouts here.

@hstefan
Copy link

hstefan commented Apr 10, 2017

It may already be known, but I bisected through 1.10.2 and 1.11.1 and found out that commit d102396 introduced this problem.
I'll have a look myself and see if I contribute with fixing it, but as I have zero experience with the stack I can't make any promises, which is why I'm focusing on sharing what I've found out so far.

@alexdima
Copy link
Member

Duplicate of #23991. A workaround is detailed in #23991 (comment)

@alexdima alexdima added the *duplicate Issue identified as a duplicate of another issue(s) label Apr 10, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 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

7 participants