LQ Newbie
Registered: Jun 2001
Location: Switzerland
Distribution: none (HP-UX)
Posts: 1
Rep:
|
translate wrong keycodes to x server
Hi folks,
I know I'm a little bit wrong in this forum, but I've a serious problem - and on other sites I couldn't get help...
I'm not a LINUX user (I would - for private, but I've not the time for that, because my family). The problem I have at the office is based on HP-UX and X- Windows:
I had to 'merge' a PC and a HP-UX workstation with a CPU switch to one monitor/keyboard/mouse. Now, the HP system has to use the same locale keyboard (Swiss German) as the PC. But the mapping of the keyboard is wrong. With 'xev' I could remap the most of the keys, but not all. Some keys, especially the cursor control keys (arrow up, down, ..., insert, delete, home, ...) are not addressable, because they seem to have no (proper) keycodes.
For example, 'xev' returns the following events for pressing the 'space' key:
KeyPress event, ..., keycode 50 (keysym 0x20, space), ...
KeyRelease event, ..., keycode 50 (keysym 0x20, space), ...
Pressing the cursor 'Up' key returns with 'xev' the following:
KeyRelease event, ..., keycode 233 (keysym 0x0, NoSymbol), ...
KeyPress event, ..., keycode 233 (keysym 0x0, NoSymbol), ...
KeyPress event, ..., keycode 27 (keysym 0xffe1, Shift_L), ...
KeyRelease event, ..., keycode 233 (keysym 0x0, NoSymbol), ...
KeyPress event, ..., keycode 233 (keysym 0x0, NoSymbol), ...
KeyPress event, ..., keycode 126 (keysym 0xff97, KP_Up), ...
KeyRelease event, ..., keycode 233 (keysym 0x0, NoSymbol), ...
KeyPress event, ..., keycode 233 (keysym 0x0, NoSymbol), ...
KeyRelease event, ..., keycode 126 (keysym 0xff97, KP_Up), ...
KeyRelease event, ..., keycode 233 (keysym 0x0, NoSymbol), ...
KeyPress event, ..., keycode 233 (keysym 0x0, NoSymbol), ...
KeyRelease event, ..., keycode 27 (keysym 0xffe1, Shift_L), ...
These keys are rubbish, the keyboard doesn't work with it.
So I thought, a translator could be a solution, sitting between the keyboard output and the X server input. This translator should translate some wrong keycode to the correct values.
Does any of you cool folks have an idea how to write such a translator program? I've the cc compiler on the workstation only.
Somewhere I read something about translator tables for events with the X windows system. There must be a solution, but I'm not familiar with this stuff...
Thanks a lot!
|