You are not logged in.

#1 2014-02-22 20:09:14

mojangsta
Member
Registered: 2013-04-01
Posts: 24

Can't remap scancodes using setkeycodes or udev/hwdb.d

Hi, I'm trying to remap the scancode 3a to keycode 1 on a PS/2 keyboard.

I've tried using

> setkeycodes 3a 1
KDSETKEYCODE: Invalid argument
failed to set scancode 3a to keycode 1

and

> vim /etc/udev/hwdb.d/90-custom.hwdb
keyboard:dmi:bvn*:bvr*:bd*:svn*:pn*:pvr*
KEYBOARD_KEY_3a=esc

(and reboot). They fail because the scancode is already mapped, seemingly.

xmodmap and loadkeys do not remap scancodes, only keycodes. Several of my desktop apps do not respond to remapped keycodes, thus these are not solutions.

Last edited by mojangsta (2014-02-22 20:09:54)

Offline

#2 2014-02-24 00:46:37

mojangsta
Member
Registered: 2013-04-01
Posts: 24

Re: Can't remap scancodes using setkeycodes or udev/hwdb.d

Not certain, but I believe this also occurs with USB keyboards, on the same system. With the 90-custom.hwdb line#1, keyboard:usb:v*p*

Anyone else able to try this?

Offline

#3 2014-08-23 06:32:14

Kiwon Um
Member
Registered: 2014-07-25
Posts: 4

Re: Can't remap scancodes using setkeycodes or udev/hwdb.d

For USB keyboard, you need to get the scancodes from evtest rather than showkey. You may find a solution from:
https://ask.fedoraproject.org/en/questi … -keycodes/

Last edited by Kiwon Um (2014-08-23 06:32:47)

Offline

Board footer

Powered by FluxBB