Ideas on improving powercomputing keyboard

Jerry Quinn jquinn at nortelnetworks.com
Wed Jul 28 05:21:47 EST 1999


>> "anthony" == anthony tong <atong at uiuc.edu> writes:

 anthony> Jerry Quinn (Tue, Jul 27, 1999 at 11:52:15AM -0400):
 >> Hi, all.  I'm finally annoyed enough by the 'a' chars generated by the
 >> caps lock key on power computing keyboards under X to try to fix it.  In
 >> the process, maybe it will be useful enough to actually swap it to be the
 >> control key (as any good keyboard should be :-).

 anthony> Didn't a patch from Fred Bacon get into on of the DR2 updates to
 anthony> take care of this? I forget how it worked around this problem, but I
 anthony> can did it up if you can't find it.

As it turns out, I still have the 3 messages Fred sent about this.  The 3rd
one does the following bit:

        if ( (last_keycode == 0x39) && (data[3] == 0x80) ) {
           last_keycode = data[3] & 0x7f;
           return;
        }

As I look at it now, this should behave reasonably if the capslock key is used
by itself.  However, if you want to do something like, say, remap capslock to
be a control key, this won't play nicely with 'a'.  If you were to press 'a'
after capslock (C-a in emacs for instance), last_keycode will no longer be
0x39.  Then when you finally release the capslock, the 0x80 on release will
trigger an 'a'-up event.

 >> from the keys.  So the first question is - can I trust the output of
 >> showkeys?

 anthony> Generally, yes, with showkeys -s

 >> What is RAW mode?  When is raw mode versus non-raw used and should the
 >> behavior I describe be any different in the two cases?  Does raw
 >> vs. non-raw explain why 'a's appear when pressing capslock in X but not at
 >> the console?

 anthony> I think that we should figure out why it behaves properly at the
 anthony> console first. I remember Paul M mentioning something about that but
 anthony> I don't really recall the specifics.

This is why I asked the question about raw vs non-raw mode.  When capslock is
pressed on my keyboard, we generate a keypress/keyrelease pair.  When it is
released, we get the spurious 0x80.  So among the possible solutions are that
the console driver discards spurious key releases while the X server doesn't.

Even if we find this out, it doesn't change that generating
keypress/keyrelease on capslock down won't allow me to use it as a control
key.  So some kind of fix to address this is required.

It sounds more and more like it will have to be a compile-time switch :-(

 anthony> On another note Franz Sirl mentioned that a capslock (with an apple
 anthony> adjustable keyboard, I think) keypress generates extraneous capslock
 anthony> up/down events in X.

Perhaps this keyboard also generates its own capslock upkey event?

Jerry

-- 
Jerry Quinn                             Tel: (514) 761-8737
jquinn at nortelnetworks.com               Fax: (514) 761-8505
Speech Recognition Research


[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]





More information about the Linuxppc-dev mailing list