comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Keyboard Events on Windows
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Keyboard Events on Windows [message #39177] Wed, 28 April 2004 05:01 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Nuno Oliveira writes:

> You don't have any problems on processing keyboard events? I have an
> application that uses keyboard and I think that my application processes two
> events instead of one? Have this happened to you?

Oh, my goodness, yes. I am *inundated* with events!!
With draw widgets capturing keyboard events you get
one event on the press and another (nearly identical)
one on the release. They are flying at you! :-)

I'm usually only interested in an keyboard event if
it comes from a press action, not a release action,
so I have to screen the darn things out:

; Only keyboard events, please.
IF event.type LT 5 THEN RETURN

; Only PRESS events, please.
IF event.release GT 0 THEN RETURN

Now, finally, I have the events I want to deal with. It's
only a question now of screening out the individual key
presses, from the multiple key presses, from the inadvertent
key presses, etc. I'd tell you how to do this, but I've only
been working on this for a week, and ... uh, that's today's
assignment. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Array-transformation
Next Topic: Re: Reading in a string file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Tue Dec 02 20:41:23 PST 2025

Total time taken to generate the page: 2.88541 seconds