Thread
:
Context dependent hardware shortcut keys
View Single Post
demute
2011-01-27 , 19:09
Posts: 1 | Thanked: 0 times | Joined on Jan 2011
#
1
Hello all,
I almost always listen to music on my phone through mplayer. When I want to read things, like the phrack magazine or howtos about sed/awk/perl/whatever, I use less. One very good feature in these occasions would be if I could control mplayer and less through the hardware shortcut keys, like zoom+/- (aka rocker button), and the other two buttons (on/off and camera button). For mplayer, this should also work when the screen is locked.
Here's the plan:
* Grab the key events (regardless if screen is locked or not)
* Check what program is currently maximized (if it's an xterm, get tty info and do some scripting)
* Look in config-file and send configured command to window (e.g. > or < in mplayer or up/down in less)
* if no config entry found do default behaviour
Does anyone have any suggestions how to do this?
I am also new to x11 development so suggestions on what libraries in c or modules in python that I can use would be much appreciated.
Thanks,
Manne
Quote & Reply
|
demute
View Public Profile
Find all posts by demute