{"id":166,"date":"2009-04-27T03:08:01","date_gmt":"2009-04-27T01:08:01","guid":{"rendered":"http:\/\/raftaman.net\/?p=166"},"modified":"2021-05-15T11:46:42","modified_gmt":"2021-05-15T09:46:42","slug":"customizing-gnome-keyboard-shortcuts","status":"publish","type":"post","link":"https:\/\/possiblelossofprecision.net\/?p=166","title":{"rendered":"Customizing Gnome keyboard shortcuts"},"content":{"rendered":"<p>It&#8217;s possible to define keyboard shortcuts for your own commands in addition to the predefined Gnome actions. Since metacity is Gnome&#8217;s default window manager, you have to edit the metacity keys in your GConf configuration system. The easiest way is doing it with the <code>gconf-editor<\/code> (although you can of course edit the xml-definition in <code>~\/.gconf\/apps\/metacity\/<\/code> by hand).<\/p>\n<p>So open your <code>gconf-editor<\/code> and navigate to the tree &#8216;\/apps\/metacity\/global_keybindings&#8217;. Assign a shortcut to one of the keys <code>run_command_1<\/code> to <code>run_command_12<\/code>, e.g. Alt + F9.<\/p>\n<p>Now you have to tell metacity, which command to run. In the corresponding key <code>run_command_1<\/code> to <code>run_command_12<\/code> under &#8216;\/apps\/metacity\/keybinding_commands&#8217; you specify the command that you want to attach to the shortcut.<\/p>\n<p>An Example: We want to start xmms when XF86AudioPlay is pressed, so we have to alter the keys as follows<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\n\/apps\/metacity\/global_keybindings\/run_command1  =  XF86AudioPlay\r\n\/apps\/metacity\/keybinding_commands\/command1     =  xmms -t\r\n<\/pre>\n<p>Of course, this only works with the default windows manager metacity. If you use a composition-manager like Compiz or Beryl, your mileage will vary.<\/p>\n<p><!--more--><br \/>\n\n\t\t<style type=\"text\/css\">\n\t\t\t#gallery-1 {\n\t\t\t\tmargin: auto;\n\t\t\t}\n\t\t\t#gallery-1 .gallery-item {\n\t\t\t\tfloat: left;\n\t\t\t\tmargin-top: 10px;\n\t\t\t\ttext-align: center;\n\t\t\t\twidth: 50%;\n\t\t\t}\n\t\t\t#gallery-1 img {\n\t\t\t\tborder: 2px solid #cfcfcf;\n\t\t\t}\n\t\t\t#gallery-1 .gallery-caption {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t\t\/* see gallery_shortcode() in wp-includes\/media.php *\/\n\t\t<\/style>\n\t\t<div id='gallery-1' class='gallery galleryid-166 gallery-columns-2 gallery-size-thumbnail'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/possiblelossofprecision.net\/wordpress\/wp-content\/uploads\/2009\/04\/screenshot-configuration-editor-global_keybindings.png'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/possiblelossofprecision.net\/wordpress\/wp-content\/uploads\/2009\/04\/screenshot-configuration-editor-global_keybindings-150x150.png\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/possiblelossofprecision.net\/wordpress\/wp-content\/uploads\/2009\/04\/screenshot-configuration-editor-keybinding_commands.png'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/possiblelossofprecision.net\/wordpress\/wp-content\/uploads\/2009\/04\/screenshot-configuration-editor-keybinding_commands-150x150.png\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/>\n\t\t<\/div>\n<\/p>\n<p>Further reading:<br \/>\n<a href=\"http:\/\/symlink.dk\/linux\/config\/logitech\/\">http:\/\/symlink.dk\/linux\/config\/logitech\/<\/a><br \/>\n<a href=\"http:\/\/wiki.ubuntuusers.de\/GNOME_Tastenk\u00fcrzel\">http:\/\/wiki.ubuntuusers.de\/GNOME_Tastenk\u00fcrzel<\/a><br \/>\n<a href=\"http:\/\/wiki.ubuntuusers.de\/Metacity\">http:\/\/wiki.ubuntuusers.de\/Metacity<\/a><br \/>\n<a href=\"http:\/\/wiki.ubuntuusers.de\/Xmodmap\">http:\/\/wiki.ubuntuusers.de\/Xmodmap<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s possible to define keyboard shortcuts for your own commands in addition to the predefined Gnome actions. Since metacity is Gnome&#8217;s default window manager, you have to edit the metacity keys in your GConf configuration system. The easiest way is doing it with the gconf-editor (although you can of course edit the xml-definition in ~\/.gconf\/apps\/metacity\/ by hand). So open your&#8230; <a href=\"https:\/\/possiblelossofprecision.net\/?p=166\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[7,10],"class_list":["post-166","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-fedora","tag-gnome"],"_links":{"self":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=166"}],"version-history":[{"count":15,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/166\/revisions"}],"predecessor-version":[{"id":215,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/166\/revisions\/215"}],"wp:attachment":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}