Setting Linux up to use the Cherry CyMotion Master Linux USB keyboard

One of the reasons I got the Cherry CyMotion Master Linux key board was to have not only a Linux styled keyboard but to have a USB keyboard, my previous keyboard was a classic AT with a PS2 adaptor !

It was getting a bit shabby, what with the dremeled off Windows keys and the neon string I wove under the keys, not mention the classic cream and grey color scheme.

The Cherry Cymotion is a very nice keyboard with large tops to the keys, nice feedback feel and of course it has the TUX logo and 26 extra keys!
Comes with software to control the keyboard but only for the PS2 version, thats right does not work on the original playstation ;)

To enable the keys in the USB mode you have to patch the kernel (or wait until it becomes part of the release kernel [2.6.15 does not need patching but earlier versions may be OK as well]).
This involves taking the hid_core.c.diff(for kernel see end of doc) from the driver CD and applying it to a copy of the kernel source code you have ready to be recompiled into a new blend of Linux kernel.

It might be possible patch and build only the module but I could find no reference to building integral kernel modules, only device driver extra type modules.

This was surprisingly easy, but depends on how your Linux system is setup, so check the documentation specific to your distribution.

Once you have got your new patch kernel running try

xmodmap -pk

Look for key 112 or anything higher, most likely you will only see the normal keys.
Then run this to get the scan codes of the extra keys.

xev | grep "state 0x0, keycode" | uniq

[xev can be obtained through most distribution systems, rpm, emerge, deb etc or you can get the source from got a direct link?)]

It will open a new window, ignore that, do not move the mouse and press each one of the extra keys on your keyboard once.
Then close the window, you will see a long list one for each key pressed plus the enter key.

Take this list (minus the enter key) and format it into keycode ### = NAME where ### is the keycode number and NAME is the name you want to assign the key.
Save this in your home directory as .Xmodmap (or just download mine, or copy the following [specific to >=Xorg 7])
keycode 234 = CM_BACK
keycode 233 = CM_FORWARD
keycode 232 = CM_KILL
keycode 231 = CM_RELOAD
keycode 122 = CM_MAGNIFY
keycode 162 = CM_PLAYPAUSE
keycode 164 = CM_STOP
keycode 144 = CM_PREVIOUSTRACK
keycode 153 = CM_NEXTTRACK
keycode 204 = CM_EJECT
keycode 161 = CM_CALC
keycode 236 = CM_MAIL
keycode 130 = CM_HOME
keycode 227 = CM_POWER
keycode 188 = CM_CUT
keycode 192 = CM_COPY
keycode 248 = CM_PASTE
keycode 138 = CM_REDO
keycode 135 = CM_UNDO
keycode 115 = CM_TUX
keycode 116 = CM_MAILTO
keycode 174 = CM_MINUS
keycode 176 = CM_PLUS
keycode 160 = CM_MUTE
keycode 129 = CM_MEDIA

Thats the first step, now as root edit the /usr/lib/X11/XKeysymDB(or /usr/share/X11/XKeysymDB) file and append one line per key in the format NAME :######## where the ######## has to be unique in the file, I used the format 10090### where the final ### was the keycode and NAME is the identifer we assigned the key in the Xmodmap step above.
Again, download my XKeysymDB.extra or copy the following.[specific to >=Xorg 7]
CM_BACK :10090234
CM_FORWARD :10090233
CM_KILL :10090232
CM_RELOAD :10090231
CM_MAGNIFY :10090122
CM_PLAYPAUSE :10090162
CM_STOP :10090164
CM_NEXTTRACK :10090153
CM_EJECT :10090116
CM_CALC :10090161
CM_MAIL :10090236
CM_HOME :10090130
CM_POWER :10090112
CM_R1 :10090159
CM_R2 :10090151
CM_R3 :10090171
CM_R4 :10090133
CM_R5 :10090135
CM_COPY :10090248
CM_PASTE :10090109
CM_CUT :10090188
CM_L2 :10090143
CM_L1 :10090125
CM_WEIRD :10090115
CM_TUX :10090116
CM_CONTEXT :10090117
CM_MINUS :10090174
CM_PLUS :10090176
CM_MUTE :10090160
CM_MEDIA :10090129

Now restart X and then in a console window type

xmodmap ~/.Xmodmap

And when you run

xmodmap -pk

again, you can see all your new keycodes.

Note: each time you restart X you will need to tell xmodmap to load your .Xmodmap file so put the command in your ~/.xinitrc or equivalent.

Each window/desktop manager has its own way of allowing you to map keys to actions.

In KDE 3.3.1 go to "Control Center" and "Regional & Accessibility" and then either select "Keyboard Shortcuts" or "KHotKeys".
"Keyboard Shortcuts" allows you to assign keys to specific KDE actions and "KHotKeys" allows you to assign keys to applications, amongst other things.

I hope you found this useful, I had an interesting time finding out how to do the above !

any comments hate mail etc to

Kernel (and possibly higher) please try the patch from

Thanks goto Richard Grant for the Xorg 7, .xinitrc and other information.

Have not braved the >=Xorg 7 modular update ? fear not you can get the old files here :
XKeysymDB.extra-pre-Xorg7 (for /usr/X11R6/lib/X11/XKeysymDB(or /usr/share/X11/XKeysymDB))


This page is by me for me, if you are not me then please be aware of the following
I am not responsible for anything that works or does not work including files and pages made available at I am also not responsible for any information(or what you or others do with it) available at
In fact I'm not responsible for anything ever, so there!