Open lacygoill opened 5 years ago
I'm not sure this is a bug, because maybe the keys are not meant to be used there, but I've also noticed that M-[hjkl]
don't work in some menus. For example, in the menu opened when you press l
to get the list of files opened by the process under the cursor.
OTOH, C-[np]
seem to work in all menus, and with any TERM
value.
I don't think they are documented – at least I couldn't find them here – but they are very handy, so I use them instead of M-[jk]
.
According to
$ man htop
,M-j
andM-k
can be pressed to scroll in the list of processes. On my machine, it works only when$TERM
has the valuexterm
orxterm-256color
.In tmux,
$TERM
must have the valuescreen
,screen-256color
,tmux
ortmux-256color
. Because of this,M-j
andM-k
don't work in htop inside tmux.I can reproduce on the latest commit of the htop github repository.
I don't think this is is a bug in tmux, because:
$ tmux -Lx -f/dev/null
)$ TERM=tmux-256color htop
I don't think the issue is in my
tmux-256color
terminal description, because:I have compiled the most recent version of terminfo:
I can reproduce with other
TERM
values, such asst-256color
,gnome-256color
,konsole-256color
.As a temporary experience, I have compiled a custom terminal description for
tmux-256color
which is identical to the one ofxterm
, and the issue still persists.I don't think the issue is in my shell, because:
$ env -i bash --norc --noprofile
,$ env -i zsh -f
,$ env -i dash
)As a workaround, I use this shell alias:
Here's a gif to illustrate the issue:
Environment: