Keybindings which affect windows ?

Philippe Brochard pbrochard at common-lisp.net
Wed Apr 24 20:59:00 UTC 2013


Akshay Srinivasan writes:

> On 23 April 2013 13:43, Philippe Brochard <pbrochard at common-lisp.net> wrote:
>
>     Akshay Srinivasan writes:
>
>     > At Mon, 22 Apr 2013 21:23:31 +0200,
>     > Philippe Brochard wrote:
>     >>
>     >> Akshay Srinivasan writes:
>     >>
>     >> > Hello,
>     >> >
>     >> Hi,
>     >>
>     >> >    Is there anyway I can affect windows with keybindings ? Right now
>     it looks like
>     >> > this sort of capability is only available to mouse-bindings.
>     >> >
>     >> You're right, this capability is only for mouse actually.
>     >> There is a need for other keybindings (in main and second mode), so I've
>     >> added them in the commit 4cd4754.
>     >>
>     >> Please, test: Control+Shift+Left/Right to move over next/previous
>     >> brother and take the current window in it.
>     >> Control+Shift+Alt+Left/Right/Up/Down: same thing but spatially.
>     > The non-spatial keybinding didn't work, but (more importantly :) the
>     spatial
>     > one did. Thank you!
>     >
>     Are you sure the non-spatial keybinding doesn't work? You have to
>     release all keys before starting it and there must be a focused window.
>     Please, can you investigate?
>
> Ah, okay. It seems to work, but the keybinding seems to be Alt-Shift-Left/
> Right... instead of Ctrl-Shift.
>
Oops, sorry indeed, it's Alt-Shift-Left/Right.

>  
>
>
>     >> This must work in both main and second mode.
>     >>
>     >> >Would it work if I call something like:
>     >> > (define-main-mouse ("Left" :shift :mod-1)
>     'move-window-to-left-brother)
>     >> >
>     >> > If the mouse-keybindings are handled by a thread that handles mouse
>     events in X, then this
>     >> > will not work; is there some way out ? (Sorry for not trying the code
>     before posting).
>     >> >
>     >> No, this can't work because key binding and mouse binding are stored in
>     >> different hash table. The mechanism for both is not nearly the
>     >> same. (And more there is different hash table for each mode).
>     >> BTW clfswm is not threaded there is only one single loop.
>     > That's interesting, I assumed it was multithreaded. So does it wait for X
>     events
>     > or poll for them ?
>     >
>     It listen for event(1) and proceed(2) them when there is some in the event
>     queue. So clfswm is sequential and need only one thread/loop.
>     But there is some optimizing functions to compress mouse motion events
>     for example.
>
>     I have had a look at XCB(3) but I haven't gone in this direction for
>     now.
>
>     Philippe
>
>     (1) http://common-lisp.net/project/cmucl/doc/clx/
>     12_4_Managing_the_Event_Queue.html
>     (2) http://common-lisp.net/project/cmucl/doc/clx/
>     12_3_Processing_Events.html
>     (3) http://xcb.freedesktop.org/



More information about the clfswm-devel mailing list