Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Selfwritten widget won't bind to keymap

On Aug 24,  5:46pm, Björn wrote:
} I find this VERY confusing. What am i doing wrong?

You're assuming that menuselect is like any other keymap, which it is
not.  Menu selection hijacks the key mapping mechanism, it doesn't
build upon it.  (This is largely because menu selection was invented
before there was a keymap mechanism, and the menuselect keymap is sort
of a half-hearted retrofit.)

In the documentation for the zsh/complist module, you'll find a list
of zle functions under a paragraph that ends with "The following zle
functions have special meaning during menu selection:" ... and then
followed by a paragraph which adds "any other zle function not listed
leaves menu selection and executes that function."  In this case "any
other" includes any user-created ones that you have bound.

So it's impossible to add new keybindings that take effect within the
menuselect operation, and it's also impossible to change the meaning
of any of the keybindings that menuselect pre-empts.  All you can do
is change the keys to which the pre-empted keybindings are attached.

Messages sorted by: Reverse Date, Date, Thread, Author