How to detect that a key is being pressed, not HAS been pressed earlier!??

Jarek Zgoda jzgoda at gazeta.usun.pl
Wed Jan 28 20:21:30 CET 2004


Rune <runed at stud.cs.uit.no> pisze:

> It's important to notice here that I'm not interested if the user has
> already pressed shift or ctrl. I'm only interested in knowing if he is
> currently holding down one of these keys. (I have looked into msvcrt
> and the like but have found no answer..) The function should also work
> in both windows and Linux.

This event *is* available in WinAPI, but don't ask me where. I'm sure,
because VCL (which is built on top of WinAPI and uses standard Windows
messages) distinguishes KeyUp and KeyDown events. 

If you want to have it available also in linux, use Qt/PyQt.

-- 
Jarek Zgoda
Unregistered Linux User #-1
http://www.zgoda.biz/ JID:zgoda-a-chrome.pl http://zgoda.jogger.pl/



More information about the Python-list mailing list