{"id":200,"date":"2010-10-19T16:13:42","date_gmt":"2010-10-19T14:13:42","guid":{"rendered":"http:\/\/www.ceh-photo.de\/blog\/?p=200"},"modified":"2010-11-22T23:34:06","modified_gmt":"2010-11-22T21:34:06","slug":"acer-1825-add-a-script-to-the-p-button-example-onscreen-keyboard-in-gnome","status":"publish","type":"post","link":"https:\/\/www.ceh-photo.de\/blog\/?p=200","title":{"rendered":"Acer 1825 add a script to the P-Button (example onscreen keyboard) in GNOME"},"content":{"rendered":"<p>Today I will show, how you could add an arbitrary script or application to the P-Button of your Acer 1825.<\/p>\n<p>A little script, which checks if the onscreen keyboard onboard is running.<\/p>\n<p>If onboard is running it will be closed if not it will be started.<\/p>\n<p>[you need to install onboard: sudo apt-get install onboard]<\/p>\n<p>Script:<\/p>\n<div class=\"codecolorer-container bash default\" style=\"overflow:auto;white-space:nowrap;width:70%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"co0\">#!\/bin\/bash<\/span><br \/>\n<span class=\"re2\">running<\/span>=$<span class=\"br0\">&#40;<\/span>pgrep onboard <span class=\"sy0\">|<\/span> <span class=\"kw2\">wc<\/span> -l<span class=\"br0\">&#41;<\/span><br \/>\n<span class=\"kw1\">if<\/span> <span class=\"br0\">&#91;<\/span> <span class=\"re1\">$running<\/span> <span class=\"re5\">-gt<\/span> <span class=\"nu0\">0<\/span> <span class=\"br0\">&#93;<\/span> ;<span class=\"kw1\">then<\/span><br \/>\n&nbsp; &nbsp; &nbsp;pkill onboard<br \/>\n<span class=\"kw1\">else<\/span><br \/>\n&nbsp; &nbsp; &nbsp;onboard<br \/>\n<span class=\"kw1\">fi<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Save this script under e.g. onscreenkeyboard.run and give permission for execution chmod +x onscreenkeyboard.run<\/p>\n<p>Now add following line to your \/etc\/rc.local<\/p>\n<p>setkeycodes e070 112<\/p>\n<p>if you want test it temporary in terminal: sudo\u00a0setkeycodes e070 112<\/p>\n<p>After reboot or the above command start:<\/p>\n<p>gnome-keybinding-properties<\/p>\n<div>In this dialog add a new keyboard shortcut with a name you like (e.g. Onscreen \u00a0keyboard close\/open) and the complete path to above script or another application you like.<\/div>\n<div><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-201\" title=\"onboard binding to p-button\" src=\"http:\/\/www.ceh-photo.de\/blog\/wp-content\/plugins\/downloads-manager\/upload\/\/onboard-1024x575.png\" alt=\"onboard binding to p-button\" width=\"600\" height=\"350\" \/><\/div>\n<div>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.<\/div>\n<div>Finished!<\/div>\n","protected":false},"excerpt":{"rendered":"<p>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] [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[56,40,57],"class_list":["post-200","post","type-post","status-publish","format-standard","hentry","category-general_news","tag-acer-1825","tag-linux","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=200"}],"version-history":[{"count":6,"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/200\/revisions"}],"predecessor-version":[{"id":237,"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/200\/revisions\/237"}],"wp:attachment":[{"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}