Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
read keystroke input with dbus (python)?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
jeffk
l33t
l33t


Joined: 13 Sep 2003
Posts: 671

PostPosted: Sat Feb 21, 2009 8:33 pm    Post subject: read keystroke input with dbus (python)? Reply with quote

Can anyone suggest the right dbus object to connect to watch the keyboard input?

I'd like to use python, and have http://dbus.freedesktop.org/doc/dbus-python/doc/tutorial.html as a resource.

Searching for "dbus key{board,stroke}" or similar results mainly in people reporting their keyboard problems with udev/dbus/evdev.

Nothing nefarious like a keylogger here, I want to make something to display keystrokes onscreen during screencasts.

Thanks.
Back to top
View user's profile Send private message
makism
Tux's lil' helper
Tux's lil' helper


Joined: 24 Oct 2007
Posts: 85

PostPosted: Sun Feb 22, 2009 10:23 am    Post subject: Reply with quote

hm, i don`t know about dbus... while i was searching the same subject
i came across with dev-python/python-xlib.

here is the project`s webpage:
http://python-xlib.sourceforge.net/

and check out this demo:
http://python-xlib.svn.sourceforge.net/viewvc/python-xlib/trunk/examples/record_demo.py?revision=124&view=markup

i hope this helps :-)
Back to top
View user's profile Send private message
jeffk
l33t
l33t


Joined: 13 Sep 2003
Posts: 671

PostPosted: Sun Feb 22, 2009 10:32 pm    Post subject: Reply with quote

I came to find the same resource and demo exactly. python-xlib is probably the right tool for this area. I found that reading directly from /dev/input devices was not my cup of tea ;)

FWIW, I studied wicd (a wireless connection daemon with GUI) as an example of a dbus participant in python. It seemed not to use dbus for interaction with the network interfaces, only with the GNOME panel, etc.

Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum