[prev in list] [next in list] [prev in thread] [next in thread] 

List:       suse-programming-e
Subject:    [suse-programming-e] Keyboard events
From:       Roger Oberholtzer <roger () opq ! se>
Date:       2006-08-15 7:21:02
Message-ID: 1155626463.32207.14.camel () acme
[Download RAW message or body]


(If this is too non-suse-specific for this list, just shout. But the
platform it will run on is SUSE 10.x)

Back in the days of character displays (non-X at least), if I wanted
quick key press notification I simply set up the keyboard file
descriptor to send SIGIO when a user pressed a key. Worked a charm.

Then came X...

I still need quick key press notification. However, multiple window GUIs
make this very difficult. The key press is tied to a window and must be
processed in the proper context. I buy that.

But what if I need the fastest and most reliable (in terms of latency)
access to a key press in a program running under X? The reason for this
is that I have an application where a user indicates an activity by a
key press. Delays are to be avoided.

I have been toying with using some USB key device (e.g., www.xkeys.com)
instead of the keyboard. But isn't there a delay in USB 1 transmissions?
Perhaps this is less than the delay in X. in getting the key to me.

Any ideas? Maybe I can get key presses more direct from X and pass back
the ones I am not interested in? There is a caveat: I do X via embedded
Tk. The scripting capability is really handy. But the Tk library has
access to X.

-- 
Roger Oberholtzer

OPQ Systems AB
Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Tel: Int +46 8-615 60 20
Fax: Int +46 8-31 42 23


-- 
To unsubscribe, email: suse-programming-e-unsubscribe@suse.com
For additional commands, email: suse-programming-e-help@suse.com
Archives can be found at: http://lists.suse.com/archive/suse-programming-e

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic