Genius Slimstar keyboard can't remap keys greater than 255 keycode with udev

Hi everyone. I just got a new keyboard that doesn’t seem to be linux friendly.
There is a bug in xorg that won’t allow keycodes bigger than 8 bit, Wayland allows up to 32 bit, but I don’t use Wayland is too unstable.

The only way of getting keycodes bigger than 255 to be recognized by the DE, is to re-assign them a lower number below 255.

This are the keycodes that evtest shows.

Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x458 product 0x708 version 0x110
Input device name: "Genius Multimedia Keyboard"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 114 (KEY_VOLUMEDOWN)
    Event code 115 (KEY_VOLUMEUP)
    Event code 120 (KEY_SCALE)
    Event code 148 (KEY_PROG1)
    Event code 150 (KEY_WWW)
    Event code 152 (KEY_SCREENLOCK)
    Event code 155 (KEY_MAIL)
    Event code 156 (KEY_BOOKMARKS)
    Event code 158 (KEY_BACK)
    Event code 159 (KEY_FORWARD)
    Event code 164 (KEY_PLAYPAUSE)
    Event code 166 (KEY_STOPCD)
    Event code 171 (KEY_CONFIG)
    Event code 177 (KEY_SCROLLUP)
    Event code 178 (KEY_SCROLLDOWN)
    Event code 206 (KEY_CLOSE)
    Event code 216 (KEY_CHAT)
    Event code 217 (KEY_SEARCH)
    Event code 421 (KEY_WORDPROCESSOR)
    Event code 423 (KEY_SPREADSHEET)
    Event code 424 (KEY_GRAPHICSEDITOR)
    Event code 425 (KEY_PRESENTATION)
    Event code 505 (KEY_BRL_DOT9)
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
Properties:
Testing ... (interrupt to exit)

Event: time 1505784511.880276, type 4 (EV_MSC), code 4 (MSC_SCAN), value 900f5
Event: time 1505784511.880276, type 1 (EV_KEY), code 421 (KEY_WORDPROCESSOR), value 1
Event: time 1505784511.880276, -------------- SYN_REPORT ------------
Event: time 1505784512.056294, type 4 (EV_MSC), code 4 (MSC_SCAN), value 900f5
Event: time 1505784512.056294, type 1 (EV_KEY), code 421 (KEY_WORDPROCESSOR), value 0
Event: time 1505784512.056294, -------------- SYN_REPORT ------------
Event: time 1505784512.400294, type 4 (EV_MSC), code 4 (MSC_SCAN), value 900f6
Event: time 1505784512.400294, type 1 (EV_KEY), code 423 (KEY_SPREADSHEET), value 1
Event: time 1505784512.400294, -------------- SYN_REPORT ------------
Event: time 1505784512.568300, type 4 (EV_MSC), code 4 (MSC_SCAN), value 900f6
Event: time 1505784512.568300, type 1 (EV_KEY), code 423 (KEY_SPREADSHEET), value 0
Event: time 1505784512.568300, -------------- SYN_REPORT ------------
Event: time 1505784513.016315, type 4 (EV_MSC), code 4 (MSC_SCAN), value 900f4
Event: time 1505784513.016315, type 1 (EV_KEY), code 425 (KEY_PRESENTATION), value 1
Event: time 1505784513.016315, -------------- SYN_REPORT ------------
Event: time 1505784513.168350, type 4 (EV_MSC), code 4 (MSC_SCAN), value 900f4
Event: time 1505784513.168350, type 1 (EV_KEY), code 425 (KEY_PRESENTATION), value 0
Event: time 1505784513.168350, -------------- SYN_REPORT ------------
Event: time 1505784515.296408, type 4 (EV_MSC), code 4 (MSC_SCAN), value 900f9
Event: time 1505784515.296408, type 1 (EV_KEY), code 424 (KEY_GRAPHICSEDITOR), value 1
Event: time 1505784515.296408, -------------- SYN_REPORT ------------
Event: time 1505784515.384416, type 4 (EV_MSC), code 4 (MSC_SCAN), value 900f9
Event: time 1505784515.384416, type 1 (EV_KEY), code 424 (KEY_GRAPHICSEDITOR), value 0

So I added the keycodes and reassign them in a file under /usr/lib/udev/hwdb.d

evdev:input:b0003v0458p0708*

KEYBOARD_KEY_900f9=f14
KEYBOARD_KEY_900f5=f15
KEYBOARD_KEY_900f6=f16
KEYBOARD_KEY_900f4=f17
KEYBOARD_KEY_900f7=f18


but this doesn’t work KDE systemsettings still doesn’t recognize the keys.

Any help will be much appreciated.

I answer to myself it seems there is another file that already defines the keycodes for the slimstar 320, the file 60-keyboard.hwdb. I modified some keycodes for example the spreadsheet, the excel and the word key shortcut for something else because those keys have a higher number than 255.
This is the final result of the important parts of the file:

 Slimstar 320
evdev:input:b0003v0458p0708*
 KEYBOARD_KEY_0900f0=scrollup
 KEYBOARD_KEY_0900f1=scrolldown
 KEYBOARD_KEY_0900f3=back
 KEYBOARD_KEY_0900f2=forward
 KEYBOARD_KEY_0900f5=prog1
 KEYBOARD_KEY_0900f6=prog2
 KEYBOARD_KEY_0900f4=prog3
 KEYBOARD_KEY_0c0223=www
 KEYBOARD_KEY_0900f7=chat
 KEYBOARD_KEY_0900fb=prog4
 KEYBOARD_KEY_0900f8=close
 KEYBOARD_KEY_0900f9=f20
 KEYBOARD_KEY_0900fd=scale
 KEYBOARD_KEY_0900fc=screenlock


I replaced spreadsheet, word, excel and imageviewer for some other keys, prog1, prog2, prog3, prog4 and f20. Now the keys are perfectly recognized by systemsettings and now I can remap them to whatever I like.
Maybe this is a bug?? the quirks specified in the udev config file just don’t work.