Re: [Sawfish] how to define this key-binds |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/sawfish Archives
]
- To: sawfish@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [Sawfish] how to define this key-binds
- From: vinurs <haiyuan.vinurs@xxxxxxxxx>
- Date: Sat, 14 Jul 2012 02:38:43 +0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=znVPjcrjBd3t9GLu9EEH23h9ltahvYPMgcZiiTclEcc=; b=lPNqreg+VLmuDP59l6eBcbQJW5H5of+H6O/nAVlvtkeVZzH2CxMQeKbJ9MDRvBSbOw 8o7/w7nohqgyQeNGC8mOn5JhhSLina1pLRUUjvjzqI9Vwu4xAG7lv4s8VO5EWx4sjabR pzlKpUOSP0NfnUcnE7PQ/dID1W4ZQie7JtaRBNcocJKxBFR4XWaRvHbelmi0z35aaton ITBEuL0THS3AyC793D9bGLvufiCyqgHfew1cLrbSpE7hsMtzxKoMvtV6N2uzEFRMqg5f C6BQ1P59/P4NzTiKh7SnfJjrjWf5cE6zYv7GtGQX524GKla+ikJ70NgRYZfLH2I0MJ8c Yn3A==
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