Mailinglist Archive: opensuse (389 mails)

< Previous Next >
Re: [opensuse] Mapping and re-mapping Keyboard Keys
OK so I have a new PC which has no PS/2 ports. So I have a usb to Ps/2 adapter. Now my keyboard keys do not work again.

They keycodes are the same as before but the script I wrote errors with a message like this for each key:

setkeycodes: failed to set scancode b0 to keycode 202: ioctl KDSETKEYCODE: Invalid argument

Can anyone see why setkeycodes is failing? I cannot work it out.

If I can get this to work I would like to submit the keymaps so I don't have to do this in future. (and so others can use my keyboard model too).

Have a look at this guy's video. The first keyboard is the one I have.
https://youtu.be/XEWuXINbS9Q

Any help will be much appreciated.

Thanks
Paul

This is my script which is being run as a service with systemd (which was working):
#!/bin/sh

# Tiny KB-9805 Keyboard #

# Re-map Tiny Online Button (scancode e020) to XF86HomePage (xmodmap id 180)
setkeycodes e020 172

# Re-map Close Program Button (scancode e023) to XF86Close (xmodmap id 182)
setkeycodes e023 174

# Re-map HK1 (scancode e032) to XF86Launch1 (xmodmap id 156)
setkeycodes e032 148

# Re-map HK2 (scancode e012) to XF86Launch2 (xmodmap id 157)
setkeycodes e012 149

# Re-map HK3 (scancode e030) to XF86Launch3 (xmodmap id 210)
setkeycodes e030 202

# Re-map HK4 (scancode e021) to XF86Launch4 (xmodmap id 211)
setkeycodes e021 203

# Re-map Prev Track (scancode e02e) to XF86AudioPrev (xmodmap id 173)
setkeycodes e02e 165

# Re-map Stop (scancode e024) to XF86AudioStop (xmodmap id 174)
setkeycodes e024 166

# Re-map Play (scancode e022) to XF86AudioPlay / XF86AudioPause (xmodmap id 172)
setkeycodes e022 164

# Re-map Next Track (scancode e019) to XF86AudioPrev (xmodmap id 171)
setkeycodes e019 163

# Re-map vol + (scancode e026) to XF86AudioRaiseVolume (xmodmap id 123)
setkeycodes e026 115

# Re-map vol - (scancode e01e) to XF86AudioLowerVolume (xmodmap id 122)
setkeycodes e01e 114

# Re-map Mute (scancode e017) to XF86AudioMute (xmodmap id 121)
setkeycodes e017 113

# Re-map Sleep (scancode e025) to XF86Sleep (xmodmap id 150)
setkeycodes e025 142

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups