[openbox] Using keybind and action to translate/simulate one keystroke into another keystroke?

Mikael Magnusson lists at bak.och.fr.am
Fri Jan 23 19:02:57 EST 2009


On Fri, 23 Jan 2009, mpb wrote:

> On Fri, Jan 23, 2009 at 3:01 PM, Mikael Magnusson <lists at bak.och.fr.am> wrote:
>
>> There's no way to get Openbox to do it, and I think there would be some
>> problems if you were to launch some external program to press the key. I do
>> have a patch that does it in the mikabox branch in git, basically you can
>> say
>> <action name="SendKeyEvent">
>>  <key>Prior</key>
>>  <usetarget>no</usetarget>
>> </action>
>
> What does "Prior" mean?

Prior and Next are what X calls page up and page down.

> "no" means no target (that is, send the key event to the currently
> focused window)?

Right. I have another action called "SetTarget" or some such.

>> and it would send the key. What i use this for is to send space to an
>> mplayer window on another desktop to pause musics :). (which is what the
>> usetarget bit is about).
>>
>> You would have to be somewhat adventurous to try that branch though.
>
> Perhaps I could just extract the patch from that branch (manually
> maybe) and apply it to a more stable branch?  Which file is the
> SendKeyEvent functionality in?

It is in sendkeyevent.c ;).

--
Mikael Magnusson



More information about the openbox mailing list