I wonder, is it possible in openbox to create shortcut to application where click one button twice triggers some command. For example to run dmenu I want to click ` twice fast.

If it's not possible in openbox is it possible in another one wm?


To get the key name, run the command xev and press the key you intend to use. As per xev, the key you are targeting is called "grave". Note that I had to use the key name instead of the number 0x60, although this should have worked according to the manual (maybe it only works in combination with modifier keys).

xev output the following:

KeyPress event, serial 48, synthetic NO, window 0x2e00001,
    root 0x164, subw 0x0, time 531127466, (460,477), root:(462,504),
    state 0x10, keycode 49 (keysym 0x60, grave), same_screen YES,
    XLookupString gives 1 bytes: (60) "`"
    XmbLookupString gives 1 bytes: (60) "`"
    XFilterEvent returns: False

After updating your ~/.config/openbox/rc.xml, or if you are using the lxde profile, it is ~/.config/openbox/lxde-rc.xml, your command should run when you press the grave key ` twice.

You'll need to run openbox --reconfigure to reload the changes you've made.

The below xml code is tested and currently opens gnome-terminal when the grave key is pressed twice. I am using a nested key binding. This should be placed somewhere within the <keyboard> </keyboard> tags.

<!-- Custom -->
    <keybind key="grave">
      <keybind key="grave">
        <action name="Execute">

Note: You may want to add a context tag so that you can still use this key in other situations. With the current settings I was unable to use the grave key within this post. haha

See Help:Bindings - Openbox

  • 1
    Glad to hear. If you end up requiring the context tags, will you edit my answer to show what you used? – iyrin Dec 1 '14 at 16:06
  • Sure, I will edit – bioky Dec 1 '14 at 16:34
  • @iyrin, can you please explain a little more about "You may want to add a context tag so that you can still use this key in other situations". I looked at openbox.org/wiki/Help:Bindings but all references to "context" were in relation to mouse bindings and not to keybindings. Thanks! – DK Bose Aug 21 '15 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.