Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: Keyboard hook in linux (http://www.velocityreviews.com/forums/t956478-re-keyboard-hook-in-linux.html)

Michael Torrie 01-13-2013 04:46 PM

Re: Keyboard hook in linux
 
On 01/13/2013 09:13 AM, K. Elo wrote:
> I have searched in the Web and in several tutorials (e.g. "Programming
> python"), but this seems to be a tricky one. The 'pyHook' library seems
> to offer a keyboard hook manager, but 'pyHook' is not available for
> linux :( IMHO, the 'curses' library offers no (direct) solution to this...


You're wrong. curses does offer a direct solution to this. Check the
docs. Also here's a nice intro document for Python 3:
http://docs.python.org/dev/howto/curses.html

You can check to see if a keystroke is waiting, grab it and then do
something useful. curses can even grab keys like page up or page down.



All times are GMT. The time now is 09:30 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57