× 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.



On Tue, 3 Sep 2002, Steven Kurylo wrote:
>
> I've been looking through the archive and from my readings it seems the
> keymap in windows is hardcoded in the source.
>

Yes, that's correct. (for now)

>
> Looking at the source it looks like the file winterm.c contains the
> keymapping.  On line 317 is says "{ 0x0b,   K_FIELDEXIT },   /* CTRL-K */"
>
> So say if I wanted to change the Field Exit key, this is the line I'd
> change?
>

Yes... well, maybe.   You see, there are 3 different ways that keys are
dealt with in Windows.  There's are "KEY DOWN", "CHAR" and "KEY UP" events
that occur when a key is pushed down, translated into a character, and
released.

The trick is, some keys (such as the shift, control, etc) do not directly
translate to a character code.  For example, holding down shift when
pressing the letter "A" gets you a capital A.  Pressing A without holding
down shift gets you a lowercase "a".  In either case, the SHIFT key does
nothing by itself, but results in a character message when "A" is pressed.

So, for those keys, you cannot check for the "CHAR" event,  you have to
check them on the "KEY DOWN" event.

Likewise, some keys don't have any effect when they're pressed, but only
when they are released.   Those need to be done on the "KEY UP" event.

But, for standard letters or punction, you work with the "CHAR" event
because they convert the best to different keyboards around the world.

Consequently, winterm.c has 3 different keyboard maps, "keydown2msg",
"keyup2msg" and "win_kb", and which one you need to use depends on the
key that you're trying to map :)

If you changed that line to read:
   { 0x0b,   K_SYSREQ },   /* CTRL-K */

then, ctrl-K (which is a char event of 0x0b) would send system request
instead of field-exit.

The difficult part is knowing how to code the key that you want to map
FROM...  assigning the 5250 code to it is easy.

If you tell me what you're trying to accomplish, I can give you specifics
of what needs to be changed...



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.