Re: Getting keyboard state.



There are two reliable ways of getting keyboard state:

1. Track the events, as has already been suggested.  This is the easiest
   solution.

2. Get messy and use Xlib functions directly.  This is a bit more complicated
   than it sounds.  You need a combination of XQueryKeymap() and
   XGetModifierMapping() to determine if a Shift key is pressed.
-----------------------------------------------------------------------------
Mark Leisher
Computing Research Lab            Cinema, radio, television, magazines are a
New Mexico State University       school of inattention: people look without
Box 30001, Dept. 3CRL             seeing, listen without hearing.
Las Cruces, NM  88003                            -- Robert Bresson




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]