rvaiya / keyd

A key remapping daemon for linux.
MIT License
2.86k stars 170 forks source link

Keyd mappings not working with the VSCode integrated terminal #704

Open karimarttila opened 6 months ago

karimarttila commented 6 months ago

Keyd works perfectly with my Linux workstation (Ubuntu 22, Wayland, and Gnome) in terminals and in all applications. Except in the VSCode integrated terminal. I have the following code in my /etc/keyd/default.conf file:

capslock = layer(capslock)
[capslock:G]
# Navigation.
j = left
k = down
l = right
i = up

I can use these navigation shortkeys in every other application, and in the VSCode editor view, but not in the VSCode integrated terminal view.

How to examine the issue:

  1. Configure the navigation shortkeys as above.
  2. Start VSCode.
  3. Ctrl+Shift+P (Cmd+Shift+P in Mac) => VSCode command prompt opens, write: Terminal: "Focus on Terminal View" and hit enter.
  4. Integrated Terminal view opens. Try the navigation keys using the integrated terminal. E.g. up/down should give previous / next bash command from the command history.

I'm not sure if this is some feature or bug in the VSCode integrated terminal. In that case, there is nothing to be done and this issue can just be closed.

wmertens commented 6 months ago

@karimarttila I just noticed that vscode invisibly remapped the keys at startup when it noticed I had a colemak layout enabled while setting up keyd.

Chording with keyd works for me in the terminal.

There's a debug view for the shortcuts under the command "developer: shortcut troubleshooting" or something along those lines.