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?

  • baduhai@sopuli.xyz
    link
    fedilink
    arrow-up
    9
    ·
    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.

    • PAPPP@lemmy.sdf.org
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      I just tried keyd a day or two ago and I’m super taken with it.

      I just wanted to make Meta+Arrows generate PgUp/PgDn/Home/End because I’ve really grown to like laptops that do that with Fn (And I was playing with a hacked Chromebook whose keyboard does those soft with Ctrl+Shift+Arrow in software on ChromeOS so you’ve got to do something).

      I’m quite impressed. The configuration format is sane, the daemon’s runtime footprint is tiny, and it works across VTs, X, and Wayland because it’s a virtual keyboard emitting events. The historical options have like…0-1 of those properties. Also the virtual keyboard takes bus ID 0fac:0ade, and who doesn’t like a god hex pun.

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

        Yep keyd is fantastic. I also have a chromebook laptop which I installed NixOS on, and the keyboard is an absolute disaster. Keyd has been a god send.

        • PAPPP@lemmy.sdf.org
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          How is NixOS on a Chromebook? The Chromebook I’ve been hacking on exists as a beater for trying environments without disrupting the (principally Arch+KDE on X) boxes I do my real work on, and I was thinking about trying Nix on it, but it seemed like the combination of 16GB eMMC and Nix’s propensity for large disc usage would make that difficult.

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

            16GB eMMC and Nix

            Yeah, that ain’t gonna work.

            On my chromebook, it runs great. But I have a 128gb ssd. The only things that don’t work are hdmi audio and automatically switching from speakers to the audio jack.

            • PAPPP@lemmy.sdf.org
              link
              fedilink
              arrow-up
              1
              ·
              1 year ago

              As expected from the docs, that’s why I was surprised to see you mention Nix on a Chromebook, it seemed like order of magnitude wrong. 128GB is an unusual amount of local storage for a Chromebook.

              I have a little Arch/Hyprland install that fits a comfortable environment in like 8 of the 16GB in my Dell 3189 right now - It was kind of a fun project fitting it and chasing down all the little annoyances, I think it all works now other than the lack of pluming to make use of the fold sensors, and an occasional ASoC bug for which patches have landed upstream in Linux or Pipewire since the last releases.

  • 4ffy
    link
    fedilink
    arrow-up
    5
    ·
    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.

  • leggettc18@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    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.

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

      I use keyd to make capslock work as escape when pressed, and as meta when held. Though you could configure it to function as control when held too.

  • moonpiedumplings@programming.dev
    link
    fedilink
    arrow-up
    2
    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.