1

I have meka g-unit keyboard. This keyboard has 12 additional keys. I found scancodes of this keys via evtest and mapped these codes to f13-24 key codes. Everything works fine, but some keys(F20,21,22,23) have strange behavior. I used xev to test this. So, if i press any normal key, i have in output only keypress/keyrelease events, but these 4 keys gave me strange result:

FocusOut event, serial 40, synthetic NO, window 0x8200001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 40, synthetic NO, window 0x8200001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 40, synthetic NO, window 0x0,
    keys:  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   64  0   0   0   0   0   0   0   

KeyRelease event, serial 40, synthetic NO, window 0x8200001,
    root 0x126, subw 0x0, time 28272076, (407,392), root:(2331,421),
    state 0x4010, keycode 198 (keysym 0xffd1, F20), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

evtest gives me this output: normal key(f13):

Event: time 1502817652.419417, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700cc
Event: time 1502817652.419417, type 1 (EV_KEY), code 183 (KEY_F13), value 1
Event: time 1502817652.419417, -------------- SYN_REPORT ------------
Event: time 1502817652.455412, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700cc
Event: time 1502817652.455412, type 1 (EV_KEY), code 183 (KEY_F13), value 0
Event: time 1502817652.455412, -------------- SYN_REPORT ------------

Broken key(f20):

Event: time 1502817690.387065, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700d3
Event: time 1502817690.387065, type 1 (EV_KEY), code 190 (KEY_F20), value 1
Event: time 1502817690.387065, -------------- SYN_REPORT ------------
Event: time 1502817690.491038, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700d3
Event: time 1502817690.491038, type 1 (EV_KEY), code 190 (KEY_F20), value 0
Event: time 1502817690.491038, -------------- SYN_REPORT ------------

xmodmap -pke output:

keycode 191 = F13 F13 F13
keycode 192 = F14 F14 F14
keycode 193 = F15 F15 F15
keycode 194 = F16 F16 F16
keycode 195 = F17 F17 F17
keycode 196 = F18 F18 F18
keycode 197 = F19 F19 F19
keycode 198 = F20 F20 F20
keycode 199 = F21 F21 F21
keycode 200 = F22 F22 F22
keycode 201 = F23 F23 F23
keycode 202 = F24 F24 F24

My 70-keyboard.hwdb:

evdev:input:b0003v060Bp5253e0111-e0*
 KEYBOARD_KEY_700cc=f13
 KEYBOARD_KEY_700cd=f14
 KEYBOARD_KEY_700ce=f15
 KEYBOARD_KEY_700cf=f16
 KEYBOARD_KEY_700d0=f17
 KEYBOARD_KEY_700d1=f18
 KEYBOARD_KEY_700d2=f19
 KEYBOARD_KEY_700d3=f20
 KEYBOARD_KEY_700d4=f21
 KEYBOARD_KEY_700d5=f22
 KEYBOARD_KEY_700d6=f23
 KEYBOARD_KEY_700d7=f24

How to fix that? As i see, evtest gives right result for every key, but something happens with action, while system parses this event.

showkey shows correct press/release events and keycodes. Only showkey works fine with these keys, another apps like firefox works like xev shows.

0 Answers0