From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21020 invoked by alias); 30 May 2012 14:58:56 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30494 Received: (qmail 8049 invoked from network); 30 May 2012 14:58:54 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <120530075824.ZM6547@torch.brasslantern.com> Date: Wed, 30 May 2012 07:58:24 -0700 In-reply-to: <4FC5B2CB.6090701@gmail.com> Comments: In reply to Edgar Merino "Keybindings lost in Xterm after top exits" (May 30, 12:40am) References: <4FC5B2CB.6090701@gmail.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Edgar Merino , "zsh-workers@zsh.org " Subject: Re: Keybindings lost in Xterm after top exits MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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.