[openbox] Using keybind and action to translate/simulate one keystroke into another keystroke?
Mikael Magnusson
lists at bak.och.fr.am
Fri Jan 23 18:01:06 EST 2009
On Fri, 23 Jan 2009, mpb wrote:
> Hi openbox at icculus.org,
>
> I have been using Openbox for 6 months to a year. Thus far I have
> been able to configure Openbox to do just about everything I want it
> to.
>
> Prior to today, I had been using W-Left and W-Right to switch desktops.
>
> <keybind key="W-Left">
> <action name="DesktopLeft">
> <wrap>no</wrap>
> </action>
> </keybind>
> <keybind key="W-Right">
> <action name="DesktopRight">
> <wrap>no</wrap>
> </action>
> </keybind>
>
> Today I realized it would be more efficient to use W-j and W-k
> instead, as I would not have to move my right hand to the arrow keys.
> Easy enough to do - I just added the following:
>
> <keybind key="W-j">
> <action name="DesktopLeft">
> <wrap>no</wrap>
> </action>
> </keybind>
> <keybind key="W-k">
> <action name="DesktopRight">
> <wrap>no</wrap>
> </action>
> </keybind>
>
> I immediately realized that I would also like to be able to press W-L
> and W-; to issue PageUp and PageDown keystrokes. I could then switch
> desktops and issue PageUp and PageDown keystrokes without moving my
> right hand from the home row. Is there someway to get Openbox to
> generate simulated keystrokes in response to other specified
> keystrokes? Or perhaps there is some other, easy, non-Openbox way to
> do this in X Windows?
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>
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.
--
Mikael Magnusson
More information about the openbox
mailing list