You are not logged in.
I've got a six year old very basic Logitech wireless keyboard with 8 hotkeys (inc volume). I've found the keycodes using showkey, but I can't get them to do anything. I'm trying to get keycode 172 (hexadecimal AC) to start Firefox, and keycode 156 (hex 9C) to start xterm, with the following code in my home/USERNAME/.config/openbox/rc.xml:
<!-- Keybindings for running applications -->
<keybind key="0xAC">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>firefox</name>
<wmclass>Firefox</wmclass>
</startupnotify>
<command>firefox</command>
</action>
</keybind>
<keybind key="0x9C">
<action name="Execute"><command>xterm</command></action>
</keybind>
<keybind key="W-e">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Konqueror</name>
</startupnotify>
<command>kfmclient openProfile filemanagement</command>
</action>
</keybind>
<!-- Other keybindings -->
<keybind key="C-Escape">
<action name="Exit">
</action>
</keybind>
My Other keybinding C-Escape to exit openbox works fine, but why not the hotkeys?
Last edited by dameunmate (2010-07-16 14:06:26)
Offline
You're missing the xmodmap piece of the process - see here for details.
Offline
I just tried that but it didn't work. Uninstalled and deleted xbindkeys.
But a small change to home/USERNAME/.config/openbox/rc.xml does work, the following code starts firefox when I press the key with keycode 172:
<keybind key="XF86HomePage">
<action name="Execute">
<execute>firefox</execute>
</action>
</keybind>
Why is is that <keybind key="XF86HomePage"> does work but <keybind key="0xAC"> does not work? 0xAC = 172 in decimal = the correct keycode for the XF86HomePage button, so why doesn't that work? It should work in Openbox, see http://openbox.org/wiki/Help:Bindings#Key_combination: "Keys can also be specified by their numeric codes. This can be done by specifying the keycode in hex." I have another keyboard with loads of extra keys so I need to be able to use keycodes in rc.xml
Last edited by dameunmate (2010-07-16 14:05:01)
Offline
I don't have the answer, but if you want there is a small utility to configure keys in openbox : obkey
http://code.google.com/p/obkey/
Offline
dameunmate, I suggest you to use 'xev' to get the name of the key you're interested in and then insert it into your rc.xml.
Using xev-assigned names always worked for me.
Cheers,
rent0n@deviantART | rent0n@bitbucket | rent0n@identi.ca | LRU #337812
aspire: Acer Aspire 5920 Arch Linux x86_64 | beetle: Gericom Beetle G733 Arch Linux i686
Offline
On my keyboard, the XF86HomePage button has the keycode 180 which converted to hex is 0xB4. I have no problems using the hex codes in my Openbox setup. Did you remember to run "openbox --reconfigure" afterwards?
Otherwise I would follow rent0n's suggestion of using xev to double-check you got the right keycode.
Offline
On my keyboard, the XF86HomePage button has the keycode 180 which converted to hex is 0xB4. I have no problems using the hex codes in my Openbox setup. Did you remember to run "openbox --reconfigure" afterwards?
Otherwise I would follow rent0n's suggestion of using xev to double-check you got the right keycode.
No, I wasn't clear enough. Actually I meant to use the name of the key according to xev (like 'XF86HomePage') rather than the keycode.
rent0n@deviantART | rent0n@bitbucket | rent0n@identi.ca | LRU #337812
aspire: Acer Aspire 5920 Arch Linux x86_64 | beetle: Gericom Beetle G733 Arch Linux i686
Offline
yes all the xev-assigned names do work fine for me, but the keycodes still don't work regardless whether I reconfigure or reboot. According to http://openbox.org/wiki/Help:Bindings#Key_combination keycodes should be assignable out of the box (out of the Openbox! ). Even the wiki article recommended by tomk above suggests the same thing: http://wiki.archlinux.org/index.php/Ext … rg#Openbox
Offline