Everything I read says it’s a feature enabled in what ever compositor you choose, if your compositor supports it. Why isn’t there a general purpose keybinding program like setxkbmap? Does it just not exist yet or must it be built into the compositor?

I’ve read [this stackexchange thread] on something related but it all seems to be using XKB which should imply I’m using XWayland?

  • leggettc18@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Personally, I’ve used interception-tools with the caps2esc plugin. Not the easiest to set up but it allows me to press caps lock for esc and hold it for ctrl. It bypasses the lack of a programs being able to read keystrokes of other programs by intercepting them closer to the hardware level. You can also do lots of other cool stuff with it, but I’ve yet to find anything else that lets caps lock work as both esc and ctrl.

  • 4ffy@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Xremap, despite the name, supports both X and Wayland, and can be used to move modifier keys around. Configuration is done with YAML but is otherwise pretty easy. I personally use it for full Emacs keybind emulation.

  • baduhai@sopuli.xyz
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 year ago

    I used to use kmonad, but I recently migrated to keyd, since with keyd I can bind key combos. Though kanata should also get the job done.

    Keyd won it out for me, because it can do combos (for example, I press both shift keys to toggle capslock), and it has the simplest config format.

    What’s better about these three options, in comparison with setxkbmap, is that they will also remap keys in the tty, not just in the graphical shell.

  • thingsiplay@kbin.social
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    @sudo I actually don’t know if this program exists in Wayland, but I use a startup script to bind the key:

    #!/bin/sh
    setxkbmap -option caps:escape
    
    

    For whatever reason, after a system update with the package manager, sometimes I need to rerun the script. It’s part of my update process, at the end of it.

  • moonpiedumplings@programming.dev
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    1 year ago

    If you are using kde, then this feature is right in the settings menu. I have caps lock bound to compose. I dunno about other DE’s.