up-line-or-history
works well in gnome-terminal, but does not work after I switched to urxvt. I've tested this by explicitly calling this command in zsh (M-x
in emacs mode). Can anyone give me a clue of why? I'm on Debian Jessie.
Asked
Active
Viewed 371 times
1 Answers
0
urxvt
and gnome-terminal
send different characters when you type altup. You can see this using cat -v
. In urxvt
, you would see ^[[A
, while gnome-terminal
copies xterm
, sending ^[[
;3A`.
Unless you have configured your zsh
key bindings to take that into account, they will not work as expected. Some workarounds are needed, because (although zsh
can use terminfo values), zsh
does not provide a way to use the terminal information for modified special keys.
Further reading:
- How can I see what my keyboard sends? (ncurses FAQ)
- How can I use shift- or control-modifiers? (ncurses FAQ)

Thomas Dickey
- 51,086
- 7
- 70
- 105
-
For me it works whether I do `bindkey "^[[A" up-line-or-beginning-search` or `bindkey "\e[A" up-line-or-beginning-search`, but I have to `source ~/.zshrc` manually each time after I enter urxvt. Do you know why? – Caleb Eby Aug 22 '16 at 00:12