× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



The way I create/debug keyboard maps is to run a program called xev
which comes with XFree86.   When you run xev from an xterm, it displays
all of the X11 events that occur.

So, I just hit the keys that I want to map.  For example, if I hit the
F2 key while in this "Event Tester" window I see this in the xterm:

KeyPress event, serial 27, synthetic NO, window 0x2a00001,
    root 0x3c, subw 0x0, time 83720466, (586,7), root:(598,31),
    state 0x10, keycode 68 (keysym 0xffbf, F2), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyRelease event, serial 27, synthetic NO, window 0x2a00001,
    root 0x3c, subw 0x0, time 83720544, (586,7), root:(598,31),
    state 0x10, keycode 68 (keysym 0xffbf, F2), same_screen YES,
    XLookupString gives 0 bytes:  ""

And I can tell everything I need to know about the key from the
"keycode 68 (keysum 0xffbf, F2)"

Now that I know that X11 refers to this key by the name F2, I can go
into my /usr/local/share/tn5250/XTerm file and creating a line with
<Key>F2: string("whatever")

I'm guessing (but have never tried it) that the 122 key keyboard will
display F13-F24 for the extra row of keys.

On a normal keyboard we use:  "Shift <Key>F3" to indicate the F3 key when
shift is pressed, or we prefix that with a tilde "~" character to map F3
when shift is NOT pressed.

So, if your 122 key keyboard prints F13, you'd just replace the line
with "Shift <Key>F1: " with a line that says "<Key>F13: "

All you need xev for is to find out the names of the keys.

On Sun, 27 Jul 2003, phil wrote:
> I'm running Debian Linux 2.4.20, fvwm window manager, xt5250.
> Which is working very well with US PC keyboard.
> 122 kbd is critical to my company for some reason.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.