Thread
:
Volume keys as shortcuts even when the device is locked
View Single Post
sysaxed
2012-11-11 , 15:50
Posts: 1 | Thanked: 1 time | Joined on Nov 2012 @ Estonia
#
1
Run this script as root (because it's needed for reading /dev/input/keypad).
Now if you press volume up and then volume down quickly (just slide your finger over the buttons) you'll lock/unlock the device.
If you do it in another direction - it will change the song in the default media player.
Feel free to customize it to your liking!
Note that you must set DisableKPImmediately to 2 in /etc/mce/mce.ini to make volume keys work when the screen is locked
And yes, you can use actions like Volume-up+Volume-Down+Volume-Up+Volume-Down etc. Use your creativity!
Just note that it
does
change system volume, so you will probably want to use same amount of volume ups and volume downs for an action.
Maybe I should make a config file... but having it as a single file is something I like very much.
How to run:
chmod +x smartKeys.py
sudo ./smartKeys.py
You can download it from here:
https://dl.dropbox.com/u/71236259/smartKeys.py
Quote & Reply
|
The Following User Says Thank You to sysaxed For This Useful Post:
riv64
sysaxed
View Public Profile
Find all posts by sysaxed