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


Groups > comp.lang.python > #36741

Re: Keyboard hook in linux

Date 2013-01-13 09:46 -0700
From Michael Torrie <torriem@gmail.com>
Subject Re: Keyboard hook in linux
References <50F2DD28.9020001@nic.fi>
Newsgroups comp.lang.python
Message-ID <mailman.472.1358095598.2939.python-list@python.org> (permalink)

Show all headers | View raw


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.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web