Re: [STUMP] undefine-key not working for me
Niels <[email protected]>
| Newsgroups | gmane.comp.window-managers.stumpwm.devel |
|---|---|
| Message-ID | <[email protected]> |
Joram Schrijver <[email protected]> writes: > Hi, > > On Tue, Jul 29, 2014, at 10:14 PM, Niels wrote: >> Hi >> >> I have rebinded some keys in my stumpwmrc. For example I have rebinded >> "w" to show "windowslist" instead of "windows". But I also want to >> remove the old keybinding. This is what I have in my stumpwmrc: >> >> (undefine-key *root-map* (kbd "w")) >> (undefine-key *root-map* (kbd "\"")) >> (define-key *root-map* (kbd "w") "windowlist") >> >> "C-t w" now gives me "windowlist", but the old keybinding for windowlist >> on "C-t "" still works, and both " and w is listed on the command >> overview >> on "C-t ?". >> > > First of all, DEFINE-KEY would just override any previous bindings, so > you don't need to first UNDEFINE-KEY them. Now onto the problem. > Calling UNDEFINE-KEY removes the binding from the specified keymap, but > the binding on " doesn't come from *ROOT-MAP*. It is defined in > *GROUP-ROOT-MAP*, which isn't exported from the STUMPWM package (The > default binding on w is also defined in *GROUP-ROOT-MAP*, so the first > UNDEFINE-KEY doesn't actually work either). If it's important for the > binding to be removed you could specify STUMPWM::*GROUP-ROOT-MAP* in > place of *ROOT-MAP* of the second call to UNDEFINE-KEY. Alternatively > you could submit a pull request for *GROUP-ROOT-MAP* and possibly some > of the group-specific keymap symbols to be exported from the STUMPWM > package. > >> As I understand the manual that should be the correct syntax to >> undefine a key, but I seem to have missed something, since it does not >> work for me. What have I missed? >> > > UNDEFINE-KEY is basically not needed anymore, because DEFINE-KEY with a > COMMAND argument of NIL removes the binding. UNDEFINE-KEY now does > exactly that. Hi Joram. Thank you for the nice explanation. With the right keymap it works nicely now. -- Niels