{"id":244,"date":"2010-12-13T20:09:53","date_gmt":"2010-12-13T18:09:53","guid":{"rendered":"http:\/\/www.ceh-photo.de\/blog\/?p=244"},"modified":"2011-03-15T23:27:00","modified_gmt":"2011-03-15T21:27:00","slug":"acer-1825-use-special-button-above-esc-in-gnome-for-activatingdeactivating-gyro-auto-rotation","status":"publish","type":"post","link":"https:\/\/www.ceh-photo.de\/blog\/?p=244","title":{"rendered":"Acer 1825 use special button above ESC in GNOME for activating\/deactivating gyro auto rotation"},"content":{"rendered":"<p>The Acer 1825 has a special Button for recovery purpose (in windows) above the ESC Key to use this button for a arbitrary script following steps are necessary (in general it is the same procedure like shown in this post <a href=\"http:\/\/www.ceh-photo.de\/blog\/?p=200\">http:\/\/www.ceh-photo.de\/blog\/?p=200<\/a>):<\/p>\n<ol>\n<li>Add\n<div class=\"codecolorer-container bash default\" style=\"overflow:auto;white-space:nowrap;width:70%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">setkeycodes<\/span> e062 <span class=\"nu0\">176<\/span><\/div><\/div>\n<p>to rc.local (e.g.<\/p>\n<div class=\"codecolorer-container bash default\" style=\"overflow:auto;white-space:nowrap;width:70%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> gedit <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>rc.local<\/div><\/div>\n<p>)<\/li>\n<li>Reboot (or use the setkeycodes-command in terminal)<\/li>\n<li>\n<div class=\"codecolorer-container bash default\" style=\"overflow:auto;white-space:nowrap;width:70%;\"><div class=\"bash codecolorer\">gnome-keybinding-properties<\/div><\/div>\n<\/li>\n<li>Add a new command and set the path of execution to your script or application you want to start with this button<\/li>\n<\/ol>\n<p>If you want to start or stop my gyro-auto-rotation script (<a href=\"http:\/\/www.ceh-photo.de\/blog\/?p=186\">http:\/\/www.ceh-photo.de\/blog\/?p=186<\/a>) with this button use following 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 \/>8<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"co0\">#!\/bin\/bash<\/span><br \/>\n<br \/>\n<span class=\"re2\">pid<\/span>=$<span class=\"br0\">&#40;<\/span> pgrep gyro-auto-rotat <span class=\"br0\">&#41;<\/span><br \/>\n<span class=\"kw1\">if<\/span> <span class=\"br0\">&#91;<\/span> <span class=\"st0\">&quot;<span class=\"es2\">$pid<\/span>&quot;<\/span> == <span class=\"st0\">&quot;&quot;<\/span> <span class=\"br0\">&#93;<\/span> ;<span class=\"kw1\">then<\/span><br \/>\ngyro-auto-rotate.run <span class=\"sy0\">&amp;<\/span><br \/>\n<span class=\"kw1\">else<\/span><br \/>\n<span class=\"kw2\">kill<\/span> <span class=\"re5\">-9<\/span> <span class=\"re1\">$pid<\/span><br \/>\n<span class=\"kw1\">fi<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>You need to store this script under some name and give it execution rights with<\/p>\n<div class=\"codecolorer-container bash default\" style=\"overflow:auto;white-space:nowrap;width:70%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">chmod<\/span> +x scriptname<\/div><\/div>\n<p>If you are interested how you could figure out the keycode of this special key, you only need to check dmesg after pressing it (Thanks to Tomfrancart from ubuntuforums.org)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Acer 1825 has a special Button for recovery purpose (in windows) above the ESC Key to use this button for a arbitrary script following steps are necessary (in general it is the same procedure like shown in this post http:\/\/www.ceh-photo.de\/blog\/?p=200): Add setkeycodes e062 176 to rc.local (e.g. sudo gedit \/etc\/rc.local ) Reboot (or use [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,46],"tags":[56,39,63,59,40,57],"class_list":["post-244","post","type-post","status-publish","format-standard","hentry","category-it","category-linux-it-2","tag-acer-1825","tag-bash","tag-gnome","tag-gyro","tag-linux","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/244","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=244"}],"version-history":[{"count":7,"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/244\/revisions"}],"predecessor-version":[{"id":348,"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/244\/revisions\/348"}],"wp:attachment":[{"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=244"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}