Brian Mattern | 8 May 2012 22:41
Gravatar

[Patch] Custom move/resize keybindings

The attached patch adds the ability to customize move/resize 'arrow' key
bindings. For example, if one wants vim bindings the following works:

<keyboard>
  <!-- ... -->
  <moveresize>
    <left>h</left>
    <right>l</right>
    <down>j</down>
    <up>k</up>
  </moveresize>
</keyboard>

By default, the normal arrow keys are used.

Brian

P.S. I don't know for sure that I got the .xsd correct, so someone
should probably check / fix that.
_______________________________________________
openbox mailing list
openbox@...
http://icculus.org/mailman/listinfo/openbox
Martin Lucina | 13 May 2012 15:22
Gravatar

Re: [Patch] Custom move/resize keybindings

Hi,

rephorm@... said:
> The attached patch adds the ability to customize move/resize 'arrow' key
> bindings. For example, if one wants vim bindings the following works:
> 
> <keyboard>
>   <!-- ... -->
>   <moveresize>
>     <left>h</left>
>     <right>l</right>
>     <down>j</down>
>     <up>k</up>
>   </moveresize>
> </keyboard>
> 
> By default, the normal arrow keys are used.

How is this an improvement over and above the existing chroot support?

   <keybind key="W-m" chroot="true">
      <keybind key="h">
        <action name="MoveToEdgeWest"/>
      </keybind>
      <keybind key="j">
        <action name="MoveToEdgeSouth"/>
      </keybind>
      <keybind key="k">
        <action name="MoveToEdgeNorth"/>
      </keybind>
(Continue reading)

Robbie Smith | 14 May 2012 01:48
Picon
Gravatar

Re: [Patch] Custom move/resize keybindings

On 13/05/12 23:22, Martin Lucina wrote:
> Hi,
>
> rephorm@... said:
>> The attached patch adds the ability to customize move/resize 'arrow' key
>> bindings. For example, if one wants vim bindings the following works:
>>
>> <keyboard>
>>    <!-- ... -->
>>    <moveresize>
>>      <left>h</left>
>>      <right>l</right>
>>      <down>j</down>
>>      <up>k</up>
>>    </moveresize>
>> </keyboard>
>>
>> By default, the normal arrow keys are used.
>
> How is this an improvement over and above the existing chroot support?
>
>     <keybind key="W-m" chroot="true">
>        <keybind key="h">
>          <action name="MoveToEdgeWest"/>
>        </keybind>
>        <keybind key="j">
>          <action name="MoveToEdgeSouth"/>
>        </keybind>
>        <keybind key="k">
>          <action name="MoveToEdgeNorth"/>
(Continue reading)

Brian Mattern | 14 May 2012 19:31
Gravatar

Re: [Patch] Custom move/resize keybindings

On Sun, 13 May 2012, Martin Lucina wrote:

> rephorm@... said:
> > The attached patch adds the ability to customize move/resize 'arrow' key
> > bindings. For example, if one wants vim bindings the following works:

> How is this an improvement over and above the existing chroot support?

Using chrooted keybindings works ok for movement keys. However, for
resizing I don't think it is possible to fully reproduce with chrooted
bindings. In particular, the first direction key after starting a resize
determines along which axis to resize. (e.g Left starts a horizontal
resize). If you then press a key perpendicular (e.g Up while in
horizontal resize mode), it will switch the resize along that axis
instead.

I didn't see a way to "break chroot and start another chroot" with the
existing config.

Also, this makes keyboard moving/resizing consistent whether you start
it using a key binding or using the Move/Resize entries in the window
menu.

Finally, this is much easier than specifying a chroot with 12 bindings
for move (including shift to move-to-edge and ctrl to move-by-pixel) and
at least as many for sub-par resizing behavior.

However, if people really prefer to use the existing keybinding
approach, then i suggest removing the moveresize module from the
sourceode since it clearly duplicates functionality... <wink/>
(Continue reading)


Gmane