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

Doesn't understand Capslock bound to Escape #29

Closed
DuckDuckWhale opened this issue Oct 15, 2023 · 2 comments
Closed

Doesn't understand Capslock bound to Escape #29

DuckDuckWhale opened this issue Oct 15, 2023 · 2 comments

Comments

@DuckDuckWhale
Copy link

As a Vim user I mapped my Capslock to Escape in Gnome. This program didn't pick that up and every time I pressed Escape (My "Capslock") it shows Capslock and then all my keystrokes become uppercase. This might be a bit hard to implement because (if I understand it correctly) this reads directly from the input devices, so if it's too hard a toggle button for this configuration would be nice too.

@AlynxZhou
Copy link
Owner

I mapped my Capslock to Escape in Gnome.

How? The only possible way provided by GNOME I think is in tweaks, if I am correct it swaps keys via X11. This program has nothing to do with X11 or Wayland on getting input, so it won't know that you swapped capslock and escape.

If you only needs simply a swap between 2 keys, I suggest to use udev hwdb instead of X-related solution. It works in lower layer so this program will receive swapped keys, and another pros for udev hwdb is that it also works in tty.

This might be helpful: https://wiki.archlinux.org/title/Map_scancodes_to_keycodes.

@David-Else
Copy link

@DuckDuckWhale https://github.com/rvaiya/keyd works on Wayland at least. I am pressing caps lock here using the supplied default script:

image

[ids]

*

[main]

# Maps capslock to escape when pressed and control when held.
capslock = overload(control, esc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants