I am facing a strange issue on the Vscode Terminal that behaves differently from Vscode itself, even though I cannot see it as a separate process or window when dumping the tree.
I am running this config:
# Key names: https://github.com/emberian/evdev/blob/master/src/scancodes.rs#L26-L572
# Aliases: https://github.com/k0kubun/xremap/blob/master/src/config/key.rs
keypress_delay_ms: 20
keymap:
# Order is important, first match wins, so global always goes last.
# https://github.com/k0kubun/xremap?tab=readme-ov-file#application-specific-key-overrides
- name: Swith alt in all chrome based apps
application:
only: ["/google-chrome/", "/code/", "/Slack/"]
remap:
KEY_RIGHTALT-KEY_RIGHT: KEY_END
KEY_RIGHTALT-KEY_LEFT: KEY_HOME
# This is needed to make alt-gr + backtick work in chrome, i need this to make accents
# using dead key.
KEY_LEFTALT-KEY_GRAVE: KEY_RIGHTALT-KEY_GRAVE
- name: Print
remap:
WIN-KEY_P: KEY_PRINT
- name: Global
exact_match: true
remap:
# Taking inspiration from here: https://github.com/rvaiya/keyd/blob/master/examples/macos.conf
KEY_LEFTALT-KEY_RIGHT: KEY_END
KEY_LEFTALT-KEY_LEFT: KEY_HOME
WIN-KEY_C: KEY_LEFTCTRL-KEY_INSERT
WIN-KEY_V: KEY_LEFTSHIFT-KEY_INSERT
WIN-KEY_Z: KEY_LEFTCTRL-KEY_Z
WIN-KEY_S: KEY_LEFTCTRL-KEY_S
WIN-KEY_X: KEY_LEFTCTRL-KEY_X
WIN-KEY_MINUS: KEY_LEFTCTRL-KEY_MINUS
WIN-KEY_EQUAL: KEY_LEFTCTRL-KEY_EQUAL
device:
not: ["LogiOps Virtual Input", "Logitech USB Receiver"]
modmap:
- name: Swith alt in all chrome based apps
application:
only: ["/google-chrome/", "/code/", "/Slack/"]
remap:
KEY_LEFTALT: KEY_RIGHTALT
KEY_RIGHTALT: KEY_LEFTALT
What I want to achieve here is:
Alt + left/right = home/end
As on Linux, LeftAlt on Electron apps is used to open menus. I flip it with the right alt that I basically never use.
Remap the RightAlt for Home/End as point 1.
It works basically everywhere (Chrome, Slack, Electron) but not in the Vscode Terminal, which seems to be handled as a separate process, and I cannot find it either on swaymsg -t get_tree, I see just code-url-handler.
I even tried to debug it, and everything seems to work correctly from the remap side.
I am facing a strange issue on the Vscode Terminal that behaves differently from Vscode itself, even though I cannot see it as a separate process or window when dumping the tree.
I am running this config:
What I want to achieve here is:
It works basically everywhere (Chrome, Slack, Electron) but not in the Vscode Terminal, which seems to be handled as a separate process, and I cannot find it either on
swaymsg -t get_tree,
I see justcode-url-handler.
I even tried to debug it, and everything seems to work correctly from the remap side.
Working from the Vscode editor debug:
Vscode terminal (not working):
Do you have any idea what is going on here ? I even tried to configure some custom keybindings on vscode:
But only ctrl+a/e works correctly; the alt+let/right does not work.