LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-26-2001, 05:35 AM   #1
Pyrasol
LQ Newbie
 
Registered: Jun 2001
Location: Switzerland
Distribution: none (HP-UX)
Posts: 1

Rep: Reputation: 0
Unhappy 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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Keyboard configuration, keycodes Binne101 Linux - Newbie 1 06-13-2011 07:32 PM
Changing keycodes in GTK+ smkumar Programming 0 05-19-2005 01:52 AM
xmodmap, xev, keycodes, keysyms. . . oneandoneis2 Linux - General 1 02-03-2005 09:36 AM
Using xev to collect keycodes kaega2 Linux - Software 4 09-28-2004 03:42 AM
ncurses and keycodes grantm Programming 0 07-24-2003 12:14 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration