5

I made CapsLock the Hyper-key via gnome-tweaks

Sorry, I have only the german screenshot. "Feststelltaste" means "CapsLock"

gnome-tweaks-capslock-de

Now I would like to map

  • Hyper-u to Arrow-Up
  • Hyper-n to Arrow-Down
  • Hyper-i to Page-Up
  • Hyper-m to Page-down
  • Hyper-j to Pos1
  • Hyper-รถ to End (on my german layout this character is right to "l")

It would be great if this could be done by doing config in $HOME.

For example via .xmodmaprc

Related question: Make arrow-up/down, Pos1, End, Del ... more easy

Every solution is welcome

I am open for every solution which works. Maybe there is way to solve this via eBPF or an own uinput-device?

Background

I like the then fingers touch typing. I am happy with my QWERTZ layout for a-Z. But these special keys always make me leave the comfortable position with the pointer fingers on "F" and "J".

guettli
  • 1,765

2 Answers2

1

When Caps Lock behavior is set to default, i.e, "Disabled"

Caps Lock behavior set to default

create .xmodmap file with below content,
keycode 66 is the Physical Caps Lock Key on My Keyboard

clear lock
keycode 66 = Mode_switch
add lock = Mode_switch
keycode 30 = u U Up
keycode 57 = n N Down
keycode 31 = i I Prior
keycode 58 = m M Next

Run

xmodmap .xmodmap
1

If you don't mind a GUI application, input-remapper has always worked well for me with various input devices and is also available on APT.

It runs as a daemon in the background and reinjects your inputs using evdev, so there's probably a more elegant solution out there, but could be useful as a last resort or if you want to change input mappings often.

ccbirb
  • 633