You are not logged in.

#1 2020-11-15 12:45:39

Lord Bo
Member
Registered: 2012-11-11
Posts: 168

[SOLVED] Mapping pipe key to another key using udev and scancodes

I'm trying to map the pipe key ('|') to another key (in my case the '`'). I already figured out, that the scancode for the new key is  0d and the keycode for '|' is 86. Using

setkeycodes 0d 86

actually remaps the key fine. But the corresponding udev-rule does not

cat /etc/udev/hwdb.d/98-custom-keyboard.hwdb
evdev:atkbd:dmi:*
 KEYBOARD_KEY_3a=leftctrl # CapsLock to ctrl (is working fine)
 KEYBOARD_KEY_0d=102nd # (is not working)

What's my mistake here?

Last edited by Lord Bo (2020-11-18 05:58:36)

Offline

#2 2020-11-15 15:45:42

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,696

Re: [SOLVED] Mapping pipe key to another key using udev and scancodes

Gets remapped by loadkeys/vconsole?

Online

#3 2020-11-18 05:54:13

Lord Bo
Member
Registered: 2012-11-11
Posts: 168

Re: [SOLVED] Mapping pipe key to another key using udev and scancodes

Thank you seth! I actually wasn't aware, that one can just create a new keymap. So yes changing the line starting with 'keycode 13' to

keycode 13 less greater bar

in my keymap created the desired mapping. Also I solved it already in the meantime using a systemd service file.

[Unit]
Description=Map pipe symbol to the key left to Backspace
After=default.target

[Service]
Type=simple
RemainAfterExit=yes
ExecStart=/usr/bin/setkeycodes 0d 86
TimeoutStartSec=0

[Install]
WantedBy=default.target

Last edited by Lord Bo (2020-11-18 05:58:22)

Offline

Board footer

Powered by FluxBB