Re: Keymap for only one application



Am Tue, 12 Jan 2010 00:25:20 +0200
schrieb Timo Korvola <Timo Korvola iki fi>:

> On Saturday 09 January 2010 13:13:52 Christopher Roy Bratusek wrote:
> > is it possible to define a keymap, that is only valid for a given
> > application? say nautilus-keymap for nautilus only?
> 
> Use add-window-matcher to modify the keymap property.
> 

I didn't know add-window-matcher does support that, but that does not
work correctly.

Code:

( define nautilus-keymap ( make-keymap ) )
( bind-keys nautilus-keymap "C-r" 'destroy-window-safely )

( add-window-matcher '( ( WM_CLASS . "^Nautilus/nautilus$" ) )
       '( ( keymap . nautilus-keymap )
          ( keymap-trans . ( ( "C-r" "F2" ) ) ) ) )

C-r does now nothing, then removing the keymap-trans, C-r does not
destroy the window, instead it reloads the view (Nautilus' default C-r
action)

Any suggestion, or is this a bug?
Chris


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]