From: Edgar Merino <donvodka@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: Keybindings lost in Xterm after top exits
Date: Wed, 06 Jun 2012 13:45:50 -0500 [thread overview]
Message-ID: <4FCFA55E.4090606@gmail.com> (raw)
In-Reply-To: <120530075824.ZM6547@torch.brasslantern.com>
Thank you very much for your solution and in depth explanation of the
problem, I had no idea how to resolve this. I did the tests you
mentioned and indeed top was enabling both application cursor keys and
application keybad.
I would like to wrap top within a function, however I don't know how to
set the mode back to normal mode from a script, can you point me to any
source where I could investigate on how to this?
Thanks in advance!
On 30/05/12 09:58, Bart Schaefer wrote:
> On May 30, 12:40am, Edgar Merino wrote:
> }
> } I mean, I've got keybindings to fix my home/end keys, also to use
> } up-line-or-search/down-line-or-search with up/bottom keys, these
> } keybindings are lost when I exit the "top" command line utility, and
> } this happens only when using xterm.
>
> This probably means that top is switching the "keypad transmit mode"
> setting of the terminal and then leaving it in a different state than
> when it began. This could either be because of a bug (top sets the
> state to X at startup and never restores it) or because your terminal
> starts out in state X but top resets it to Y at exit anyway.
>
> The manual page for xterm may refer to keypad transmit mode as "the
> application keypad mode". Try this:
>
> Use ctrl-middle-button to bring up the "VT options" menu and examine
> the state of the checkmarks for "enable application cursor keys" and
> "enable application keypad".
>
> Run top and exit, then look at the state of the menu again. If those
> checkmarks have changed, that's your problem.
>
> You have a couple of choices here:
>
> Use that menu to reset the terminal every time you run top; or
>
> Make sure your keybindings are set the same way for both "normal mode"
> and "keypad transmit mode" so zsh doesn't care what top does; or
>
> Create a wrapper function for top that explicitly sets the mode to
> the one your bindings expect, after top finishes.
next prev parent reply other threads:[~2012-06-06 18:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-30 5:40 Edgar Merino
2012-05-30 14:58 ` Bart Schaefer
2012-06-06 18:45 ` Edgar Merino [this message]
2012-06-07 4:19 ` Bart Schaefer
2012-06-07 4:53 ` Mikael Magnusson
2012-06-07 5:15 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FCFA55E.4090606@gmail.com \
--to=donvodka@gmail.com \
--cc=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).