[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: keycode program
- Subject: Re: keycode program
- From: "Robert Holmgren" holmgren@xxxxxxxx
- Date: Mon, 13 Jan 2003 12:51:13 -0500
** Reply to message from "David B. Kronenfeld" on Mon,
13 Jan 2003 08:24:40 -0800
> Dear Robert and Carl,
> ... I will forward to Robert my recent off-list exchange with Carl, so you
> both know what I've said. I have been doing this off list because too much of
> it has related to my specific mix of ignorance and knowledge to be of much use
> to anyone else.
I disagree. It is pointless to discuss these things off-list; it benefits
nobody except the recipient, wastes our time prodigally, and problem solving
does not enter the public record. I mean, when you talk privately with one
person, you willfully ignore the wide range of different experience that other
uses have had -- and very possibly, a quick answer that saves everyone's
energy.
> But there is something going on that you might be curious about, and
> that--depending on what you figure out--might be of more general interest.
>
> Robert's scan1.pm worked fine--both on my XY4 and my NBW. And it
> returned the same values that I got on Myron's program--the one that hung me up.
>
> Esc 32769 1 32770 2 32771 3 32772
> a 32798 A 33310 s 32799 S 33311
> F1 32827 F2 32828 ctrl a 34846 ctrl s 34847
> alt a 33822
> alt shft a 34334
> alt ctrl a 35870
> ctrl shft a 35358
Well then, that's the reason Carl's program wouldn't quit; it was never
generating a scan code of "1".
> I asked Carl whether some of this--getting different scan values that
> everyone led me to expect-- had something to do with my running Win XP.
It has nothing to do with XP. It has everything to do with having your NumLock
on. Turn it off. Look, every shifting key produces a unique scan code "layer"
value (cf. the msg I cited earlier from 1998). The layer for NumLock is 32768
(which is, not so coincidentally, 2^15). I can see from your results above
that Alt key is 2^10=1024, Ctrl is 2^11=2048, Shift is 2^9=512 -- the layer
differs from installation to installation, depending upon the order in which
shifting keys are listed in the "DEFINITIONS" stanza of your KBD file. When
you hit combinations of keys, you add up the layer values, plus the key code.
When you, David, say you're hitting Escape, you're *really* hitting
Numlock-Escape, so the scan code is 32768+1=32769.
-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------