Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Strange problem with bindkey keys passing through to apps
- X-seq: zsh-users 23627
- From: David Woodfall <dave@xxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Strange problem with bindkey keys passing through to apps
- Date: Fri, 14 Sep 2018 12:38:41 +0100
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mail-followup-to: Zsh Users <zsh-users@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
I have setup a bind to make a printf code to switch to previous
console. For screen some extra escapes are needed. This is in a plain
linux console, not in an xterm type of terminal.
The binds work fine except when I try to use them while running an
app - e.g. weechat, mutt - they fail and e.g. mutt will see it as the
bind to save the mail.
It seems that zsh isn't grabbing the keys for some reason and they
are falling through to the apps.
This is what my test and function look like:
if [ "$TERM" = "linux" ]; then
zle -N _prev_cons
_prev_cons() {
printf '\e[15]'
}
bindkey -M viins "^[s" _prev_cons
bindkey -M vicmd "^[s" _prev_cons
elif [[ $TERM =~ screen ]]; then
zle -N _prev_cons
_prev_cons() {
printf '\eP\e[15]\e\\'
}
bindkey -M viins "^[s" _prev_cons
bindkey -M vicmd "^[s" _prev_cons
fi
bindkey -L | grep _prev_cons shows them to exist.
Any ideas why these are passing through to apps and not grabbed by the shell?
-Dave
--
Linux is obsolete
-- Andrew Tanenbaum
.--. oo
(____)//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
Messages sorted by:
Reverse Date,
Date,
Thread,
Author