Re: [Sawfish] how to define this key-binds

[ Thread Index | Date Index | More lists.tuxfamily.org/sawfish Archives ]


thanks!
I add this to my .sawfishrc just now, and it can work correctly:
(require 'sawfish.wm.ext.match-window)
(add-window-matcher '(( WM_CLASS . "Google" ))
                    '(( keymap-trans . (( "C-n" "Down")))))
i used google-chrome to do a test!
But, I don't know the WM_CLASS of my menu,
i'm using :
(require 'sawfish.wm.menus)
and define my own menu:
(setq apps-menu
        `(("Apps Menu" (system ""))
          ()
          ("chrome" (run-safely "google-chrome"))
          ("pidgin" (run-safely "pidgin"))
))

2012/7/14 Christopher Roy Bratusek <nano@xxxxxxxxxxxxx>:
> On Friday 13 July 2012 15:29:17 vinurs wrote:
>
>> Hi,
>
>> I change my wm to sawfish now, and I bind C-menu to pop-up root menu,
>
>> now, i need the following settings:
>
>> 1. press C-n、C-p can select menu down and up, just like the up
>
>> and down arrow keys!
>
>> 2. when one menu has a next menu, then press C-f can enter the
>
>> next menu, just like the right arrow, and the same, C-b back to the
>
>> previous menu, just like the left arrow!
>
>> 3. press C-q can quit the menu, just like the <ESC>
>
>> How to do this settings? sorry for my poor English, thanks a lot!
>
>
>
> If you mean you want to navigate using C-n instead of ↓ ...
>
>
>
> This is a real GtkWidget, so you can't just change the key-bindings, just as
> Sawfish can't change the key-bindings for eg. Firefox. But there's a trick.
>
>
>
> window-matcher keymap-trans.
>
>
>
> Example:
>
>
>
> ( add-window-matcher '(( WM_CLASS . "THE_WINDOWS_WM_CLASS" ))
>
> '(( keymap-trans . (( "C-n" "Down")))))
>
>
>
> That means: you press C-n, but the window receives Down. With that you can
> basically "adjust" any windows' key-bindings to your likes.
>
>
>
> Regards,
>
> Chris
>
>
>
>

--
Sawfish ML


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/