I like using emacs-style navigation in the terminal (e.g. Ctrl + N for down, Ctrl +P for up, Ctrl + A for home, Ctrl + E for end), and I want to do something similar for navigation elsewhere. I would like to use CapsLock + N/P/A/E/etc for down/up/home/end in all apps (I previously used the AutoHotkey script at https://github.com/usuyama/emacs-like-key-bindings-windows to accomplish this in Windows).

I’m currently using KDE Plasma on Wayland, and I haven’t seen anything obvious to do this while poking around settings. Any suggestions? Thank you in advance!

EDIT: I was able to do what I want with evremap. The crux of the config is:

[[dual_role]]
input = "KEY_CAPSLOCK"
hold = ["KEY_F19"]
tap = ["KEY_ESC"]

[[remap]]
input = ["KEY_F19", "KEY_N"]
output = ["KEY_DOWN"]

[[remap]]
input = ["KEY_F19", "KEY_P"]
output = ["KEY_UP"]

See my reply below for more info.

  • lolcatnip@reddthat.com
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    9 months ago

    I think keyszer would be able to do it, but I don’t think it will work with Wayland. My suggestion, if you don’t mind spending some money, is to get a nice keyboard with programmable firmware like QMK. I wasn’t able to find a comprehensive list but I know Keychron and ZSA sell keyboards that run QMK.