Announcement

Collapse
No announcement yet.

Wayland and keyboard remapping. Anyone figure it out?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Wayland and keyboard remapping. Anyone figure it out?

    Now that we're mostly using Wayland (finally) I've encountered one minor niggling issue - key remapping.

    With X11 it was pretty easy and I've haven't messed with it for years. My remap wasn't complicated - I reverse the grave/tilde and bar/backslash keys because I use tilde and bar WAY more than grave or backslash. I used "loadkeys" to remap in the terminal and "Xmodmap" for the GUI. Worked flawlessly for over a decade.

    Now with Wayland neither of those methods work and preliminary research hasn't revealed a simple way to do this. It seems there may be a application or two out there, but I was hoping for a native solution. While looking into this, I started thinking about my keyboard F keys that all have unused multimedia keys and now I'm curious if I can get those working as well

    Curiously, "xev" still returns keystrokes so I tested all the multimedia keys and a few of them are mapped but most are not. One of them brings up an "Emoji Selector" which I didn't even know was a thing, lol.

    In my mind, the ultimate solution would be a custom keyboard mapping that matched all the keys on my HP Elite keyboard. No progress on that yet.

    Please Read Me

    #2
    Isn't xev an X11 tool (part of x11-utils)? So as far as I understand Wayland it would work in XWayland but not Wayland itself…
    I think I have read that Plasma/KWin could handle this in Wayland, but for KDE appications only (I may be wrong)…

    But I have to admit that I am kind of an a** and will let you guys figure out all that Wayland stuff - I have given me time until 2025/26, then I will consider using Wayland again (except for something like Hyprland just for fun).
    Last edited by Schwarzer Kater; Mar 12, 2024, 06:38 AM. Reason: typos
    Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
    Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

    get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
    install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

    Comment


      #3
      So I tried a program "input-remapper" that supposedly works with X11 and Wayland - no go.

      I found an article on how to add a file containing keychanges to xkb layout files. Instead of going through that, I decided to just edit the "us" layout and wherever I saw "backslash bar" I put in "bar backslash" and it works! Both in Kate and in Konsole. So now back to do "grave asciitilde". It's a little tedious due to the number of times it appears. I don't know enough about it to take shortcuts. The ultimate might be to create a new layout entirely.

      Please Read Me

      Comment

      Working...
      X