Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
[opensuse] Mapping and re-mapping Keyboard Keys
Hi, I asked this question before but I still have been unable to work out how to resolve it.

This is on an ubuntu 17.04 box. I have asked twice on ubuntu forums but have had no replies at all in 2 years! Also I seem to get more sense out of those on the opensuse list. :)

I have a very old keyboard, Tiny branded (yes Tiny! remember them?) PS/2 keyboard (model: KB-9805). It has many hotkeys on the top, currently they either do not work (xev doesn't show up the press) or they are mapped wrong (xev shows that a diffferent button has been pressed).

It is a great keyboard as it is built to last. Currently I have used it for 19 years and it has still not even had the letters wear off! Unlike my other PC with which I have lost count how many modern keyboards I have worn out.

Current mappings are as follows (Key > Mapping):

Internet > Mute

Close > Not detected

HK1 > Home Page

HK2 > Not detected

HK3 > Vol +

HK4 > Calculator

Prev Track > Vol down

Stop > Stop

Play > Play

Next Track > Next Track

Vol + > Not detected

Vol - > Not detected

Mute > Not detected

Sleep > Not detected

So I need change the mappings of: Internet / HK1 / HK3 / HK4 / Prev Track so that they are recognized by the system as the correct key.

Then I need to add mappings to: Close / HK2 / Vol + / Vol - / Mute / Sleep so they are recognized at all!

As far as I understand it, when you press a button the kernel sends a scancode to the system which then maps it to a keycode. They keycode is then used to map to a function. Is this correct?

So far I have found that if I press a key that does not work (in this case the close hotkey, then run dmesg | tail -2 I get this output:

[23566.462308] atkbd serio0: Unknown key released (translated set 2, code 0xa3 on isa0060/serio0).
[23566.462311] atkbd serio0: Use 'setkeycodes e023 <keycode>' to make it known.

This gives me, on the first line 0xa3 and on the second line e023 What are these two codes? Are they the scancode or keycode?

As for the keys that do work I have found that if I go to a terminal (ctrl + alt + f2) and press one of the keys that are already mapped to something (in this case the internet hotkey) then run showkey -k I get this output:

0xe0 0x20
0xe0 0xa0

I am assuming I can ignore the 0xe0? So this leaves me with 0x20 and 0xa0 which I assume are key press and key release. Is this correct? Are they the scancode or keycode?

I have written these codes down for all my hotkeys. How can I now change their mappings?

Any help would be greatly appreciated.

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

< Previous Next >