Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #36741 > unrolled thread

Re: Keyboard hook in linux

Started byMichael Torrie <torriem@gmail.com>
First post2013-01-13 09:46 -0700
Last post2013-01-13 09:46 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Keyboard hook in linux Michael Torrie <torriem@gmail.com> - 2013-01-13 09:46 -0700

#36741 — Re: Keyboard hook in linux

FromMichael Torrie <torriem@gmail.com>
Date2013-01-13 09:46 -0700
SubjectRe: Keyboard hook in linux
Message-ID<mailman.472.1358095598.2939.python-list@python.org>
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.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web