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

Neo keyboard layout: Some Keys stopped working #24043

Open
hhelwich opened this issue Apr 6, 2017 · 34 comments
Open

Neo keyboard layout: Some Keys stopped working #24043

hhelwich opened this issue Apr 6, 2017 · 34 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities keyboard-layout Keyboard layout issues linux Issues with VS Code on Linux
Milestone

Comments

@hhelwich
Copy link

hhelwich commented Apr 6, 2017

  • VSCode Version: Code 1.11.0 (9122ec4, 2017-04-05T21:13:24.700Z)
  • OS Version: Linux x64 4.4.0-72-generic

Steps to Reproduce:

  1. Install and activate Neo keyboard layout
  2. Open any source file in VS code
  3. Put cursor somewhere in the file
  4. Press M4 key and hold. Press s key (see image)
  5. Instead of the cursor moving left, nothing happens

In the previous version of VSCode (1.10.2 8076a19) this worked just fine .

tastatur_e4b png

@phiresky
Copy link

phiresky commented Apr 6, 2017

Same issue for me. Issue keywords because I didn't find this issue at first: layer 4 arrow keys neo2 german keyboard layout.

Worked fine in 1.10, doesn't work in 1.11.

The shortcut editor in VSCode seems to identify the combination highlighted in the keyboard above as [IntlBackslash] i

@hediet
Copy link
Member

hediet commented Apr 6, 2017

It is not broken on windows and VSCode 1.11.0.
However, keymapping there is done by autohotkey which intercepts key presses and emits its own - AFAIK this is handled differently in linux.

@phiresky
Copy link

phiresky commented Apr 6, 2017

I just ran git bisect . The first bad commit seems to be d102396 (@alexandrudima )

# bad: [9122ec4b1068bd391e41974f46a4b54c1b9c90f9] Fix styling of release notes (fixes #23948)
# good: [8076a19fdcab7e1fc1707952d652f0bb6c6db331] debug: save all untitled non dirty files before debug start
git bisect start '1.11.0' '1.10.2'
# good: [40fecfaa77f01672e8a147be71f6f7ccb9cf8a12] fix mixin
git bisect good 40fecfaa77f01672e8a147be71f6f7ccb9cf8a12
# good: [9d2e0611f7f7750f02ec72c4d18a20b69c5bf8cf] #18095 :lipstick:
git bisect good 9d2e0611f7f7750f02ec72c4d18a20b69c5bf8cf
# bad: [7c223972367b8ade5362d738606f3b910d0fbb42] Fixes #19235: Wording in tasks warning message
git bisect bad 7c223972367b8ade5362d738606f3b910d0fbb42
# good: [378231183e815c8e8e6a73ad04fc40ec5058fdc5] Promise cancellation is slow. Use a timer instead since this may run many times.
git bisect good 378231183e815c8e8e6a73ad04fc40ec5058fdc5
# good: [f70b0b3ecb7f276c811b0f18c7a0bec3b03c11a6] Fixes #22069: Define extension story for tasks
git bisect good f70b0b3ecb7f276c811b0f18c7a0bec3b03c11a6
# bad: [4ad4bd0d8011a5db5e2bea4543b7efb03d482aad] :bug: add commit box message
git bisect bad 4ad4bd0d8011a5db5e2bea4543b7efb03d482aad
# bad: [9003dbc3f5f2b87cb3cc4a3418030dbdc45ac0a3] Add IKeybindingService.resolveUserBinding
git bisect bad 9003dbc3f5f2b87cb3cc4a3418030dbdc45ac0a3
# bad: [968da131589845b43c0d00141b41b2bb366a84e8] Improve the ScanCode -> KeyCode guessing strategy
git bisect bad 968da131589845b43c0d00141b41b2bb366a84e8
# bad: [969cbdfea05beda1a38d4082698b87f239fc2384] Renames
git bisect bad 969cbdfea05beda1a38d4082698b87f239fc2384
# bad: [8a33db65efdd3ed4c76d01cb76c3ef658caf16db] Add Inspect Key Mapppings action
git bisect bad 8a33db65efdd3ed4c76d01cb76c3ef658caf16db
# bad: [0ebecd5ca915ed33ea747cafe2c99572c52904b5] Merge branch 'master' into alex/keybinding
git bisect bad 0ebecd5ca915ed33ea747cafe2c99572c52904b5
# bad: [d10239639bf9beaa6ea34125319103de3dce43cd] First cut at integrating keyboard mappers
git bisect bad d10239639bf9beaa6ea34125319103de3dce43cd
# first bad commit: [d10239639bf9beaa6ea34125319103de3dce43cd] First cut at integrating keyboard mappers

@alexdima
Copy link
Member

alexdima commented Apr 6, 2017

I need some time to understand this keyboard layout. I will ping you in the coming days if you'd be kind enough to help me out. It is unlike anything I've seen.

Workaround to switch VS Code to dispatch based on key code again. Add the following setting:
"keyboard.dispatch": "keyCode" and restart VS Code

@alexdima alexdima added keybindings VS Code keybinding issues keyboard-layout Keyboard layout issues linux Issues with VS Code on Linux labels Apr 10, 2017
@alexdima alexdima changed the title Some Keys with Neo keyboard layout stopped working Neo keyboard layout: Some Keys stopped working Apr 10, 2017
@AndreasMager
Copy link

I have the same issue on Debian/Jessie.

@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Apr 26, 2017
@LuckyLukert
Copy link

#25797

I have problems with the backspace.

@zommerfelds
Copy link

zommerfelds commented Jun 3, 2017

Hi, I have the same problem. Yesterday the workaround worked for me, but today it's not working anymore. It works for around 2 seconds after editor startup, then my basic keys (letters) don't work anymore. 🤔
I'm not sure if I did something stupid since yesterday, but do have any idea why this could be?

@alexdima
Copy link
Member

alexdima commented Jun 6, 2017

@zommerfelds The first thing I would check are the settings.json. Is the "keyboard.dispatch" duplicated in there, is the setting overwritten by a workspace setting when opening a folder, etc.

The next thing to look at is opening an editor and running F1 > Developer: Inspect key mappings. Does it print "FallbackKeyboardMapper dispatching on keyCode" (an indicator that the setting was applied).

If this is not a problem with the settings, i.e. the confirmation that dispatching is done on keyCode is there, then I'd try looking into what Electron/Chromium/the OS sends our way when you press a specific key: Please hover over the input box and take a screenshot:
keyboard-input

@zommerfelds
Copy link

zommerfelds commented Jun 7, 2017

Hi @alexandrudima, thanks for the detailed answer.

cat ~/.config/Code/User/settings.json:

// Place your settings in this file to overwrite the default settings
{
    "keyboard.dispatch": "keyCode"
}

If I open the editor and go to File => Preferences => Settings, I see the same contents for USER SETTINGS as above, and {} for WORKSPACE SETTINGS, so that should be fine.

F1 > Developer: Inspect key mappings gives me:

Layout info:
{
	"model": "pc105",
	"layout": "de,ch",
	"variant": "neo,",
	"options": "grp:menu_toggle",
	"rules": "evdev"
}
FallbackKeyboardMapper dispatching on keyCode

Raw mapping:
...

For the keybindings I get:

If I want to type "a":
image

If I want to type "(":
image

The a printed just fine in that popup, but not in the main editor.

In Neo, the A is where the D key would be in QWERTY, and ( is CapsLock+J in QUERTY.
I can use the arrow keys in 4th layer in Neo just fine, but not for example the digits. Backspace works. Enter doesn't work. Ctrl+Z works for undo (in Neo).

Also, as I said earlier, everything works for the first few seconds while Vscode is starting up, then it stops working.

Let me know if I can help in some other way. It would be awesome if I could start using Vscode again :)

EDIT: for clarification I think I might not have the same problem as the OP. My arrows keys in the 4th layer work but not the plain and simple letter keys.

EDIT2: Help => About:

Version 1.12.2
Commit 19222cdc84ce72202478ba1cec5cb557b71163de
Date 2017-05-10T13:16:25.899Z
Shell 1.6.6
Renderer 56.0.2924.87
Node 7.4.0

@malteahl
Copy link

Thanks @alexandrudima ! Changing "keyboard.dispatch": "code" to "keyboard.dispatch": "keyCode" in File->Preferences->Settings helped me to get the m4 layer keys (escape key, navigation keys, backspace, delete, numbers) working.

@zommerfelds
Copy link

Still doesn't work for me on 1.19.0.
I also noticed that the keyboard.dispatch setting doesn't make a difference. In either setting, navigation keys and backspace for example work, but not digits and normal letters.
Is there a way for me to verify that vscode is actually loading it as keyCode and not falling back to code somehow?

@zommerfelds
Copy link

Actually I just got it to work! The NeoX extension was messing up my settings. Disabling it fixed the issue. I have no idea anymore why I installed this extension nor what it does. I still have to set keyboard.dispatch to keyCode for it to work.
Sorry about that and thanks for the support. Yay I can use vscode now! :)

@zommerfelds
Copy link

I guess we can close this issue then?

@hhelwich
Copy link
Author

Issue is still present in current VS Code:

  • VS Code version: Code 1.20.0 (c63189d, 2018-02-07T17:10:15.949Z)
  • OS version: Linux x64 4.13.0-32-generic

@alexdima alexdima reopened this Feb 15, 2018
@fynnlyte
Copy link

fynnlyte commented Mar 2, 2018

I've also had trouble using the Neo-Layout with VS Code 1.201 under Ubuntu 17.10 (Linux 4.13.0-36-generic). Without the "keyboad.dispatch": keyCode - switch I was able to type with Neo2 but couldn't even use CTRL + C and CTRL + V as it would map back to the default layout (triggering CTRL + R and CTRL + W, respectively).

@krux02
Copy link

krux02 commented Mar 24, 2018

well I just tried the "keyboard.dispatch" and it tells me "unknown configuration setting". But my problems are a bit different though.

Arrow keys work fine, but for example the undo key doesn't work. When I press M4+z visual studio code only recognizes z. And when I want to bind something to keys like äöü, vscode translates those keys if it would have been a US keyboard. So Ctrl+ü is recognized as Ctrl+z. This is horrible.

@sakasistem
Copy link

sakasistem commented Mar 27, 2018

I do map my keyboard with XKB program to use modified dvorak keyboard.

I use ralt_switch option, which used to switch right alt key to function as meta key or extra modifier.
I do enable keyCode setting in VSCode Insider.
Below are my XKB setup sample

image

The RAlt (aka Meta key) + s recognized by VS as End key. +Good
but when I supposed to do ctrl+End key with Ctrl+RAlt (Meta)+s it recognized as Ctrl+s which will save the document. -Bad
Guess what happen when I tried to jump some words by pressing Ctrl+Right aka Ctrl+RAlt (Meta)+n several times.

I suppose Ctrl modifier does not play nice with extra modifier (or keyCode-ed modifier) like meta key or Mod4.
Even Ctrl+Shift+RAlt (Meta)+s does save as too.
But Shift+Ralt (Meta)+s does like Shift+End which is +Good
Can you just make ctrl behave like shift, in term in combining modifiers?


I think it is related issue, but with different case.
the title mention neo layout, this one is custom

does this related to this solved comment?
by using keyboard.dispatch 'code', but only for OSX. And I just tried it didnt work in Linux Mint/Ubuntu
#12393 (comment)

@plumps
Copy link

plumps commented Apr 17, 2018

I am on Linux.

Version 1.21.1
Commit 79b44aa
Datum 2018-03-14T14:46:30.761Z
Shell 1.7.9
Renderer 58.0.3029.110
Node 7.9.0
Architektur x64

Unfortunately the keyboard.dispatch workaround seems not to work for me as well - at least not good enough. I can use the re-purposed CapsLock (Mod3) to insert programmers symbols like /,\,[,] and so forth within the editor, but not in Shortcuts like shift+/ which translates to pressing the physical buttons of shift+capslock+s

Trying to re-assign shortcuts with Mod3 shows unknown

unknown_key

It seems like @sakasistem mentioned, there seems to be issues with a certain sequence of modifier keys.

@krux02
Copy link

krux02 commented Apr 17, 2018

shortcuts like shift+/ are total BS and should not exist.

It should be either ? and let the layout decide what modifiers are needed to type that character, or a layout independend shift + scancode_slash. In the first option I would simply type ? (no matter where I put that on my layout and what modifiers I need to press), and in the second one I would just type a capital Jin my layout, because I have a J at the keyboard position where US qwerty has a /.

@alexdima alexdima removed the keybindings VS Code keybinding issues label Apr 17, 2018
@alexdima alexdima added the help wanted Issues identified as good community contribution opportunities label Apr 25, 2018
@SethGreylyn
Copy link

Much like with krux02, I had to type 'Ctrl+ü' and 'Ctrl+k' for undo and redo, respectively, but I was able to find the appropriate "keyboard.dispatch" setting and that seems to have solved the problem.

OS: Ubuntu 18.04 LTS

VSCode:

Version 1.23.1
Commit d0182c3
Date 2018-05-10T16:04:33.747Z
Shell 1.7.12
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

@aoeu123
Copy link

aoeu123 commented Jun 4, 2018

Oh my, I am using vscode insider just to wait this issue to be fixed up.
Just like @sakasistem
I use thinkpad with physical qwerty keyboard, modify my keymap to custom dvorak with xkb file on linux mint sonya

Here is the keymap file https://pastebin.com/cUAxDtAM
It is for debian based OS, Linux Mint to be exact.
Put it in /usr/share/X11/xkb/symbols/us right before dvorak-intl definition
partial alphanumeric_keys xkb_symbols "dvorak-intl" {

It adds navigation magics to dvorak layout, it will behave up, left, down, right with RAlt+c,RAlt+h,RAlt+t,RAlt+n (it should be i, j, k, l on qwerty instead of c, h, t, n), it really works on most application with ctrl, shift and alt modifier, but vscode. Ctrl+RAlt+n should jump next word but instead it behave like Ctrl+n and open up new tab.

Shift modifier does work, which makes Shift+RAlt+s will select to the end of line, it just Ctrl modifier that trigger shortcut for the first place.

Well, here is the pastebin content:

partial alphanumeric_keys
xkb_symbols "dvorak-shy" {
 
    name[Group1]= "English (Dvorak) by Shy";
 
    key <TLDE> { [       grave, asciitilde, dead_grave, dead_tilde  ] };
 
    key <AE01> { [      1,  exclam      ]   };
    key <AE02> { [      2,  at      ]   };
    key <AE03> { [      3,  numbersign  ]   };
    key <AE04> { [      4,  dollar      ]   };
    key <AE05> { [      5,  percent     ]   };
    key <AE06> { [      6,  asciicircum, dead_circumflex, dead_circumflex ] };
    key <AE07> { [      7,  ampersand   ]   };
    key <AE08> { [      8,  asterisk    ]   };
    key <AE09> { [      9,  parenleft,  dead_grave] };
    key <AE10> { [      0,  parenright  ]   };
    key <AE11> { [ bracketleft, braceleft   ]   };
    key <AE12> { [ bracketright, braceright,  dead_tilde] };
 
    key <AD01> { [  apostrophe, quotedbl, dead_acute, dead_diaeresis    ] };
    key <AD02> { [  comma,  less,   dead_cedilla, dead_caron    ] };
    key <AD03> { [      period, greater, dead_abovedot, periodcentered  ] };
    key <AD04> { [      p,  P       ]   };
    key <AD05> { [      y,  Y       ]   };
    key <AD06> { [      f,  F       ]   };
    key <AD07> { [      g,  G, Page_Up, Page_Up     ]   };
    key <AD08> { [      c,  C, Up, Up       ]   };
    key <AD09> { [      r,  R, dead_tilde, dead_tilde       ]   };
    key <AD10> { [      l,  L       ]   };
    key <AD11> { [  slash,  question    ]   };
    key <AD12> { [  equal,  plus        ]   };
 
    key <AC01> { [      a,  A       ]   };
    key <AC02> { [      o,  O       ]   };
    key <AC03> { [      e,  E       ]   };
    key <AC04> { [      u,  U       ]   };
    key <AC05> { [      i,  I       ]   };
    key <AC06> { [      d,  D, Home, Home       ]   };
    key <AC07> { [      h,  H, Left, Left       ]   };
    key <AC08> { [      t,  T, Down, Down       ]   };
    key <AC09> { [      n,  N, Right, Right     ]   };
    key <AC10> { [      s,  S, End, End     ]   };
    key <AC11> { [  minus,  underscore  ]   };
 
    key <AB01> { [   semicolon, colon, dead_ogonek, dead_doubleacute ] };
    key <AB02> { [      q,  Q       ]   };
    key <AB03> { [      j,  J       ]   };
    key <AB04> { [      k,  K       ]   };
    key <AB05> { [      x,  X       ]   };
    key <AB06> { [      b,  B       ]   };
    key <AB07> { [      m,  M, Page_Down, Page_Down     ]   };
    key <AB08> { [      w,  W       ]   };
    key <AB09> { [      v,  V       ]   };
    key <AB10> { [      z,  Z       ]   };
 
    key <BKSL> { [  backslash,  bar             ]       };
 
   
    key <CAPS> { [    BackSpace,    BackSpace,       BackSpace,        BackSpace ] };
 
    include "level3(ralt_switch)"
};

pay atention to magical code include "level3(ralt_switch)" that makes RAlt like mod3 but makes vscode recognizes it as unknown.

@joepie91
Copy link

Linux here, not using an unusual keyboard layout, I only remapped Caps Lock to Backspace via XkbOptions, and that didn't work either. Switching to keyCode made it work. I guess this affects any kind of key mapping.

@woylie
Copy link

woylie commented Mar 31, 2019

For me the colon : spontaneously stopped working in Visual Studio Code 1.32.3 on macOS 10.14.3. The key combination in Neo2 is caps lock + ; (on qwerty). Setting keyboard.dispatch to keyCode helped.

@LeUser111
Copy link

Another neo2 user here ;) Stumbled across the backspace-not-working issue within the first few minutes of using VSCode. Luckily the workaround works like a charm so far!
Nevertheless it would be great if this bug was fixed some day ;)

@xuiqzy
Copy link

xuiqzy commented Nov 4, 2019

The workaround from #24043 (comment) works for the backspace functionality ( 👍 ) but moving one word forwards/backwards and deleting one word in front or behind the cursor still doesn't work 😕 , i.e. Ctrl + Alt Gr + w (in qwerty layout / keys on keyboard) should delete one word left of the cursor but just pastes the clipboard, which would be Ctrl + w (in qwerty layout / keys on keyboard) which is Ctrl + v.
It seems like the Alt Gr key press is just ignored when pressing the Ctrl key.

I'm using Arch Linux with the latest updates.

How can I provide more info to help resolve this issue?

@MaxGyver83
Copy link
Contributor

MaxGyver83 commented Apr 12, 2020

I'm new to VS Code and I use the KOY layout (with some adaptions) on Linux (setxkbmap de koy). Same problem as with Neo2: I can type a hyphen by pressing CapsLock+L in the editor. But shortcuts containing CapsLock don't work (like zooming out with Ctrl+- = Ctrl-CapsLock-L).

The keybindings issues page recommends running F1 > Developer: Inspect key mappings if nothing else helps.

With the standard German layout (setxkbmap de), I get this for the L key:

	"KeyL": {
		"value": "l",
		"withShift": "L",
		"withAltGr": "ł",
		"withShiftAltGr": "Ł"
	}

With KOY (setxkbmap de koy), I get:

	"KeyL": {
		"value": "n",
		"withShift": "N",
		"withAltGr": "n",
		"withShiftAltGr": "N"
	},

Apparently, VS Code doesn't get the higher levels of the layout right!

Some additional technical information about this keyboard layout family (neo, adnw, koy, bone):

In the German default layout, AltGr is mapped to ISO_Level3_Shift (in Linux). In Neo2 (and alike), AltGr is mapped to ISO_Level5_Shift and CapsLock is mapped to ISO_Level3_Shift.

So I think, we should see in the output of > Developer: Inspect key mappings either

	"KeyL": {
		"value": "n",
		"withShift": "N",
		"withAltGr": "-",

(because CapsLock replaces AltGr in Neo2 in terms of being the new ISO_Level3_Shift key)

or

	"KeyL": {
		"value": "n",
		"withShift": "N",
		"withAltGr": "6",

(because you get a "6" when you press the physical AltGr key plus the L key as you can see in OP's screenshot).

I hope, this helps you VS Code developers better understanding our problem.

I'm aware that I (and others) are mixing some issues concerning Neo here. But they might be related.

Tested on Ubuntu 18.04 with this version of VS Code/Codium:

Version: 1.44.0
Commit: 2aae1f26c72891c399f860409176fe435a154b13
Date: 2020-04-09T10:44:46.342Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 4.15.0-96-generic

@fynnlyte
Copy link

fynnlyte commented May 23, 2020

It seems like the Alt Gr key press is just ignored when pressing the Ctrl key.

I'm having the same problem. Marking single letters via Shift + RightArrow works when I enter the RightArrow via AltGr + E, But using Ctrl + Shift + RightArrow with the Neo-layout dispatches Ctrl + Shift + E instead.
I've used the key recording functionality and get with dispatch method code:

  • Pressing Shift + AltGr + E would first display shift + alt, then turns into shift + right.
  • Pressing Ctrl + Shift + AltGr + E first displays ctrl + shift + alt, then turns into ctrl + shift + e

and with method keyCode:

  • Pressing Shift + AltGr + E would first display shift + oem_8, then turns into shift + right.
  • Pressing Ctrl + Shift + AltGr + E displays ctrl + shift + oem_8 ctrl+shift+e

The same happens when just using Ctrl + AltGr +E which becomes ctrl + e instead of ctrl + right.

For this specific issue, would it perhaps be a feasible workaround to just mark a certain key as dead? Layouts like Neo don't need VSCode to listen to AltGr at all, it should only process the keycode that gets dispatched when pressed in combination. Moreover, when that layer is „locked” by using both Mod4 keys, pressing Ctrl + Shift + e is correctly recognised as ctrl + shift + right.

My layout info:

"layout": {
		"model": "pc105",
		"layout": "de,de,gb",
		"variant": "neo,,",
		"options": "grp_led:scroll,altwin:alt_super_win",
		"rules": "evdev"
	}

@fw623
Copy link

fw623 commented Sep 25, 2020

I had the same problem as described here multiple times, where holding control or similar keys makes certain keys in level 4 of the neo layout unusable and executes unwanted shortcuts.

My fix/workaround

What has worked for me in Ubuntu 18.04 and fixed all these problems, is to run setxkbmap -layout de -variant neo after startup and each wakeup. It seems to work with either setting for keyboard.dispatch (keyCode or code).

Startup

In "Startup Application Preferences"->Add enter setxkbmap -layout de -variant neo like this and save Screenshot

Wakeup

With sudoedit /lib/systemd/system-sleep/setxkbmap add

#!/bin/bash
case $1 in
  post)
    DISPLAY=:1 ; export DISPLAY
    su $USER -c "sleep 1; setxkbmap -layout de -variant neo"
  ;;
esac

and give executable permissions with sudo chmod 755 /lib/systemd/system-sleep/setxkbmap.

  • Instead of $USER add your user.
  • Everywhere else I have found DISPLAY=:0 suggested, but that didn't work for me. Then I tried the value I got from echo $DISPLAY (:1), which worked.
  • If it doesn't work, try with a longer delay (e.g. instead of sleep 1;, use sleep 3;)

I hope this helps others!

@Isopod
Copy link

Isopod commented Nov 29, 2020

I had a problem with the escape key on Neo's layer 4 not working (you can see it in the pic in the OP next to the M4 key in the second-to-bottom row, the little ☒). This feature is very handy for us Vim users because it allows us to actuate the escape key, which we do frequently, without reaching all the way to the top-left corner of the keyboard (some non-Neo users like to bind it to capslock for that reason). Unfortunately, this was the only key combination that didn't work in VsCode.

Changing "keyboard.dispatch" to "keyCode" in the settings, as suggested in this thread, fixed it. Thanks to @malteahl and @alexdima.

Version: 1.50.1
Commit: d2e414d9e4239a252d1ab117bd7067f125afd80a
Date: 2020-10-15T10:42:48.064Z
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Linux x64 (X11)

@Profpatsch
Copy link

Same issue with backspace.

@dominikmn
Copy link

dominikmn commented Jul 4, 2021

VSCode Version: (1.57.1, 507ce72, 2021-06-17T13:28:32.912Z)
OS Version: macOS Big Sur 11.4
Keyboard layout: Neo2 (qwertz)
Karabiner Elements 13.5.0


After installing the latest VSCode version, the exclamation mark ! on layer 3 stopped working for me in VSCode.

Steps to reproduce:

  1. Open any source file in VSCode
  2. Press Mod3 and hold. Press z (see picture below)
  3. Instead of inserting an exclamation mark, nothing happens.

This is independent from the setting in keyboard.dispatch.

Neo_2_VSCode_issue_exclamation_mark

@siboehm
Copy link

siboehm commented Mar 6, 2022

@dominikmn I found a workaround for your issue. Mod3 + Z triggers the View: Toggle Word Wrap shortcut (Option + Z). If you unset that shortcut, the exclamation mark works again.

@dominikmn
Copy link

Yeah! Thanks a lot!

@t-nil
Copy link

t-nil commented Jan 13, 2024

Sadly, as of today, Neo Layout (and variants; I use Bone) are still barely usable with VSCode. It's impossible to use shortcuts with most special chars - I only ever used Layer 3, but Layer 3 mod'ed keys are always incorrectly detected as their layer 1 counterpart. (Typing works normally - I am very grateful for that!)

I tried

  • Keyboard: Dispatch = code and keyCode
    (keyCode seems to have been applied because my Developer: Inspect Key Mappings displays
    User Resolved Keybindings (unique only):
    
    FallbackKeyboardMapper dispatching on keyCode
    
  • Running setxkbmap -layout de -variant bone before start, during run, with and without restart of VSCode
  • Running code --disable-extensions --user-data-dir /tmp/tmp.rOF1qb6XBy
  • I tested the archlinux official OSS build and the unofficial flathub package
  • As per Wiki, I removed any other keyboard layout from my desktop environment, only Bone still left.

The way the keypress Ctrl+/ is always dispatched is the following:

2024-01-13 14:28:44.728 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control
2024-01-13 14:28:44.728 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl')
2024-01-13 14:28:44.729 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
2024-01-13 14:28:44.733 [info] [KeybindingService]: / Soft dispatching keyboard event
2024-01-13 14:28:44.734 [info] [KeybindingService]: \ Keyboard event cannot be dispatched
2024-01-13 14:28:44.734 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: CapsLock, keyCode: 225, key: AltGraph
2024-01-13 14:28:44.734 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: CapsLock, keyCode: 0 ('unknown')
2024-01-13 14:28:44.734 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
2024-01-13 14:28:44.864 [info] [KeybindingService]: / Soft dispatching keyboard event
2024-01-13 14:28:44.864 [info] [KeybindingService]: | Resolving ctrl+T
2024-01-13 14:28:44.865 [info] [KeybindingService]: \ From 1 keybinding entries, matched workbench.action.showAllSymbols, when: no when condition, source: built-in.
2024-01-13 14:28:44.865 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: KeyS, keyCode: 84, key: /
2024-01-13 14:28:44.866 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: KeyS, keyCode: 50 ('T')
2024-01-13 14:28:44.866 [info] [KeybindingService]: | Resolving ctrl+T
2024-01-13 14:28:44.866 [info] [KeybindingService]: \ From 1 keybinding entries, matched workbench.action.showAllSymbols, when: no when condition, source: built-in.
2024-01-13 14:28:44.866 [info] [KeybindingService]: + Invoking command workbench.action.showAllSymbols.

The correct key (/) is received, but somehow converted to T.

If there's any way I could help with developing a fix, a workaround or anything that would remedy those (in my opinion severe) limitations, please let me know. I don't want to switch layout again and am willing to help. (Although I don't really know any substantial JavaScript or Electron)

key_mapping_vscode.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities keyboard-layout Keyboard layout issues linux Issues with VS Code on Linux
Projects
None yet
Development

No branches or pull requests