Using Openbox I'm looking for a way to pass through a keybinding as normal if a condition is not met.

I was looking unsuccessfully for something like "default", "cancel" or "ignore" in the documentation for bindings and actions.

As an example, let's say I want to disable ctrl-p – but only inside Firefox.

<keybind key="C-p">
  <action name="If">
      <action name="Execute">
        <command>notify-send "Firefox is active. Ignoring."</command>
      <!-- What might go here to pass through ctrl-p as normal? -->

Unfortunately, if the window is not Firefox, then nothing happens. The ctrl-p is effectively canceled.

Is there a way I can pass through the ctrl-p so it can be handled as normal by all other applications?

(Please note I'd prefer a solution inside Openbox. xdotool or similar is not reliable and only a last resort.)

Your Answer

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

Browse other questions tagged or ask your own question.