Acer 1825 add a script to the P-Button (example onscreen keyboard) in GNOME

Today I will show, how you could add an arbitrary script or application to the P-Button of your Acer 1825.

A little script, which checks if the onscreen keyboard onboard is running.

If onboard is running it will be closed if not it will be started.

[you need to install onboard: sudo apt-get install onboard]

Script:

1
2
3
4
5
6
7
#!/bin/bash
running=$(pgrep onboard | wc -l)
if [ $running -gt 0 ] ;then
     pkill onboard
else
     onboard
fi

Save this script under e.g. onscreenkeyboard.run and give permission for execution chmod +x onscreenkeyboard.run

Now add following line to your /etc/rc.local

setkeycodes e070 112

if you want test it temporary in terminal: sudo setkeycodes e070 112

After reboot or the above command start:

gnome-keybinding-properties

In this dialog add a new keyboard shortcut with a name you like (e.g. Onscreen  keyboard close/open) and the complete path to above script or another application you like.
onboard binding to p-button
After you added the new command scroll down in the list , click on the right column cell of your new command and press the P-Button.
Finished!

About Christopher

See http://www.ceh-photo.de/blog/?page_id=2
This entry was posted in General News and tagged , , . Bookmark the permalink.