1

I want to have my super key start dmenu. I set it as a keyboard shortcut in my rc.xml:

<keybind key="0x85">
      <action name="Execute">
        <command>dmenu_run</command>
      </action>
</keybind>

I tried specifying it as W, W-, and in with its key code (0x85). W responds to pressing the letter w, W- does nothing, and 0x85 triggers dmenu immediately on the KeyPress event instead of waiting for KeyRelease. So other key combos that use super as a modifier will trigger dmenu instead.

How can tell openbox that I only want the shortcut to trigger when the super key is pressed and released on it's own without any other keypresses?

1

I got it to work by using xcape (packaged in the AUR).

From it's man page:

xcape allows a modifier key to be used as another key when it is pressed and released on its own.

In short, I assigned super to a dummy shortcut (⎈ Ctrl⇧ Shift⎇ AltLinux key SuperD) with

xcape -e 'Super_L=Control_L|Shift_L|Alt_L|Super_L|D'

Note that you'll have to run this each time you reboot, so you may want to put it in your ~/.config/openbox/autostart script or something.

This dummy shortcut is picked up by openbox with an entry in rc.xml:

<keybind key="C-A-S-W-d">
      <action name="Execute">
          <command>dmenu_run</command>
      </action>
</keybind>

I also wrote a slightly more detailed answer about this here.

| improve this answer | |

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.