The problem is that evdev driver ignores keycodes > 255.
The solution, thanks to Marco Chiappero:
1) you have to define all the remappings that you need (in the form of
"scancode keycode" list) and place them in a file under "/lib/udev/keymaps/"
(for example I created logitech-lx710-cordless there). You can find the
scancodes using evtest ("sudo evtest /dev/input/eventX", where X is your
keyboard device. Be careful, sometimes these extra keys are exposed through
a different device or your mouse interface: eg. event3 --> kbd, event4 -->
mouse & extra keys). Here some sample output:
Event: time 1294153475.909379, type 4 (Misc), code 4 (ScanCode), value c1028
"c1028" is the scancode value you're going to place in your keymap file, then
pick up a number from input.h as described earlier and convert it to
hexadecimal. Then write the remap pair in your file, maybe with a descriptive
comment, like this:
0xC1028 0x9a # rotate button
Iterate for every key > 255.
2) you have to tell udev to apply this remapping file everytime it encounters
your keyboard, so edit the "/lib/udev/rules.d/95-keymap.rules" file adding
the udev rule that matches your HW. Please don't ask me to define a rule for
you.
NOTE: you can immediately apply your keymap file by yourself typing
"sudo /lib/udev/keymap /dev/input/eventX /lib/udev/keymaps/$YOUR_FILE" and
verify it with evtest once again.
Now, you can use the Gnome shortcuts editor to see that the keys are now
usable inside X and create new shortcuts. However it might happen that no
keysym is assigned to that keycode (so you'll see 0xXY instead of XF86Foo).
You can see current mappings through xmodmap -pke, save the output into a
file and edit it if you need (a full keysym code list is available in
"/usr/lib/X11/XKeysymDB").
Once you added the keysyms to those keys you remapped, you can save this file
as ~/.Xmodmap (or as /etc/X11/Xmodmap if you wish to apply to every user).