zsh-users
 help / color / mirror / code / Atom feed
* $KEYMAP in command, isearch and menuselect
@ 2010-08-09 17:25 Ole Jørgen Brønner
  2010-08-23  9:36 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Ole Jørgen Brønner @ 2010-08-09 17:25 UTC (permalink / raw)
  To: zsh-users

I was trying to make a zle widget to display the currently active bindings when I noticed that KEYMAP is set to 'main' in widgets run from command, isearch and menuselect.

show-keymap() {
	{ print "$KEYMAP:\n"; bindkey -M $KEYMAP } | less
}
zle -N show-keymap
bindkey -M vicmd "^Ki" show-keymap
bindkey -M main "^Ki" show-keymap
bindkey -M command "^Ki" show-keymap
bindkey -M menuselect "^Ki" show-keymap
bindkey -M isearch "^Ki" show-keymap

In 'command' the binding doesn't work. (since you only can bind a few widgets in 'command')

In vicmd and main it works as expected

In isearch and menuselect the 'main' keymap is displayed and the search/completion is aborted on the current entry.

Poking in the code for 'executenamedcommand', it seems there is something called a 'localkeymap' and this is not exposed to zle widgets.

Any solution for this?

- Ole Jørgen Brønner


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-23 10:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-09 17:25 $KEYMAP in command, isearch and menuselect Ole Jørgen Brønner
2010-08-23  9:36 ` Peter Stephenson
2010-08-23 10:39   ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).