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".

1

2 Answers 2

1
+500

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.

1
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
6
  • I get this error message from xmodmap X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 118 (X_SetModifierMapping) Value in failed request: 0x17 Serial number of failed request: 17 Current serial number in output stream: 17
    – guettli
    Dec 19, 2021 at 20:25
  • Ignore it n check the key combination if it's Working or not. I got the error but combination worked.
    – PRATAP
    Dec 19, 2021 at 20:31
  • It works in gedit. But not in Chromium and not in PyCharm :-(
    – guettli
    Dec 19, 2021 at 21:08
  • @guetti that worked for me in chromium in my Ubuntu 20.04, I dont know about PyCharm. if you are exclusively looking for PyCharm.. there may be a different way to achieve?
    – PRATAP
    Dec 20, 2021 at 5:11
  • it's very old, but maybe read this about chromium
    – Andra
    Dec 27, 2021 at 18:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .