From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.help Subject: Re: Which key combos are not possible in remote Emacs session because terminal interferes? Date: Sun, 08 Feb 2015 18:04:56 +0000 Message-ID: References: <20150207182704268672544@bob.proulx.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1423418717 24501 80.91.229.3 (8 Feb 2015 18:05:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Feb 2015 18:05:17 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 08 19:05:16 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YKWEM-00087t-5F for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Feb 2015 19:05:14 +0100 Original-Received: from localhost ([::1]:57330 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKWEL-0000nX-HH for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Feb 2015 13:05:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKWE8-0000n6-7Q for help-gnu-emacs@gnu.org; Sun, 08 Feb 2015 13:05:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKWE6-0000OO-91 for help-gnu-emacs@gnu.org; Sun, 08 Feb 2015 13:05:00 -0500 Original-Received: from mail-wi0-x22e.google.com ([2a00:1450:400c:c05::22e]:38150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKWE5-0000OK-Uy for help-gnu-emacs@gnu.org; Sun, 08 Feb 2015 13:04:58 -0500 Original-Received: by mail-wi0-f174.google.com with SMTP id n3so12662037wiv.1 for ; Sun, 08 Feb 2015 10:04:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:from:date:message-id:subject:to :content-type; bh=jyLOEJzV6ziILxTDDRABkZhOmyKFm1pjz1aUk0O86Hk=; b=utlJnwcZ1CRPJKmJ+AoDgCvBabqnNJsfR/BZPU7T60SmAYxFE6U7ha1qMmZm8ViR1u WVSiZLFazrPdn9MrW/E/X7UBLbL/ZRdukcr0Hn2CTdVlNlNwt9Wr3vm4qL5vYQgmKn5K H1st3GdWTccCYLfmxAQ9H8RgqIN055mg5pAfSR0nDvegyiBZ9zoLtZBo6GtN9zXiPV/J s3h4OTRu6Dj2ljiEy+68mvPqoeTh51DZb/KPVH/W1RwRIiVkEti2r56BwILjIY65eB/D 1SkgTCau0kXnFUUcHzKQIdbX4mMaAhq3QpwNJFvIqF0I166NZVNVfKBf6g06iURjonwZ H9eA== X-Received: by 10.180.74.229 with SMTP id x5mr27115626wiv.1.1423418697258; Sun, 08 Feb 2015 10:04:57 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::22e X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102582 Archived-At: For reference, the full list of the escape sequences supported by xterm and compatible emulators is at http://invisible-island.net/xterm/ctlseqs/ctlseqs.html. Unfortunately besides Ctrl and Meta no modifier keys can be encoded, though in theory it shouldn't be too hard to define additional escape sequences for Super, Hyper and Alt. Bob Proulx schrieb am Sun Feb 08 2015 at 03:16:44: > Chris Seberino wrote: > > When using Emacs on a remote server by SSH-ing, not all key combos > > can be used as shortcuts like locally. > > What key combinations are you wanting to use that are not available? > > When using a local graphical interface every key press and release is > individually available for use. Therefore any combination is > possible. > > When operating over an ssh connection your terminal emulator is the > graphical interface. Your terminal emulator reads your keys and sends > characters down the 8-bit serial interface over the network to the > remote emacs. The remote emacs will operate as if it were on a serial > terminal using the terminfo/termcap specifications for $TERM and the > associated terminal database of terminal display capabilities. > > The standard ASCII characters are self-explaining (and self-inserting, > haha) but only a small set. Control characters are the character with > the 7th bit cleared, same as subtracting 0x40 hex from it. For > example character 'H' is 0x48 hex. Control-H is 0x8 hex. Which > explains why Control-G is 0x7 the bell character. The bell interrupts > something and rings the bell and so does Control-G in emacs. Control > characters are fairly consistently implemented up through C-z but are > inconsistently implemented for the last few {, |, }, ~, DEL. Those > control combinations tend not to work depending upon the emulator. > > At one time the meta key set the "high" bit. ASCII is a 7-bit > encoding leaving the 8th bit available to be set. This now conflicts > with use of UTF-8 unicode and AFAIK this is no longer used anywhere by > anyone who cares about UTF-8 due to this. I do not miss it. > > Most terminals now encode the meta key as an escape sequence sending > the ESC character followed by the desired character. M-w for example > (holding down Alt on a US-PC keyboard and pressing w) will be encoded > as an ESC w two character sequence. This often needs explicit > configuration. XTerm for example needs this resource set explicitly > or it will instend send the 8-bit value yielding different results. > > XTerm*metaSendsEscape:true > > Some people undoubtedly like the 8-bit Alt key behavior. For example > it allows typing in many glyphs using the Alt key instead of the > Compose or AltGr keys using the international input methods. It is a > personal preference but I prefer to have a working meta key for emacs > and I can enter the non-ascii characters using the Compose key. > > Without a working meta key they would send all M- sequences by sending > ESC explicitly first. ESC w is the same to emacs as M-w. Any C-M- > something or M-C- something sequences will be ESC followed by the C- > something character. For example C-M-r would be ESC C-r. > > Also C-[ is the same as ESC. A quick touch typist learns C-[ as way > to enter ESC without removing fingers from the home row. C-[ w is the > same as C-w for example. C-[ C-r would be the same as ESC C-r and the > same as C-M-r. > > Some terminal emulators also interface with the mouse. An abomination > as I am sure you realize but some terminal emulators will encode mouse > activity into the serial data stream. This is again terminal emulator > dependent depending upon many things. > > Hopefully the above gives some explanation and insight into working > with emacs. Understanding that should explain why any particular key > combination is possible or not over an ssh connection. The biggest > lever is not ssh but the terminal emulator you are using at the time. > Different terminal emulators have different capabilities and > limitations. > > > Which key combos are not possible in remote Emacs session because > > terminal interferes? > > > > Is there a table or list somewhere? > > Every terminal emulator is different. A similar question would be > could we generate a list of colors that are used by artists when they > paint. It is similarly open-ended. > > Bob > >