From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.help Subject: Re: How get escape sequence generated by keyboard shortcut in Emacs? Date: Sat, 28 Feb 2015 17:45:01 +0000 Message-ID: <87385qaq1u.fsf@robertthorpeconsulting.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1425145986 31806 80.91.229.3 (28 Feb 2015 17:53:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Feb 2015 17:53:06 +0000 (UTC) Cc: Dan Espen , Andrey Lisin To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 28 18:52:54 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 1YRlZN-0000YM-Vy for geh-help-gnu-emacs@m.gmane.org; Sat, 28 Feb 2015 18:52:54 +0100 Original-Received: from localhost ([::1]:41949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRlZN-0003NE-HX for geh-help-gnu-emacs@m.gmane.org; Sat, 28 Feb 2015 12:52:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRlZC-0003LB-J5 for help-gnu-emacs@gnu.org; Sat, 28 Feb 2015 12:52:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YRlZ6-0007ic-8c for help-gnu-emacs@gnu.org; Sat, 28 Feb 2015 12:52:42 -0500 Original-Received: from outbound-smtp04.blacknight.com ([81.17.249.35]:44137) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRlZ6-0007i4-3b for help-gnu-emacs@gnu.org; Sat, 28 Feb 2015 12:52:36 -0500 Original-Received: from mail.blacknight.com (pemlinmail06.blacknight.ie [81.17.255.152]) by outbound-smtp04.blacknight.com (Postfix) with ESMTPS id 58AB298816 for ; Sat, 28 Feb 2015 17:45:03 +0000 (UTC) Original-Received: (qmail 6743 invoked from network); 28 Feb 2015 17:43:47 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[109.76.89.10]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 28 Feb 2015 17:43:46 -0000 In-Reply-To: (message from Dan Espen on Sat, 28 Feb 2015 12:25:06 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.35 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:102956 Archived-At: Dan Espen writes: > Andrey Lisin writes: > >> Hi, >> >> sometimes it's necessary to know what sequence generates particular >> keyboard shortcut. In my case, for instance, I need to know, what escape >> sequences is generated by Shift+arrow shortcut. Of course, I can look in >> terminal emulator settings, but I wish there would be a way to make >> Emacs show sequences it receives. > > Try ^h k > > then hit shift arrow. > > In an rxvt, I just see . That's right C-h k shows the key you press. If it's bound then it pops up a help buffer with the key in it and a description of what it does. If it's unbound then it shows the key in the echo area and says something like "C-' is undefined". Using a terminal emulator window limits the number of keys you can use. The keys you press are translated by the terminal emulator into the form that actual terminals emitted, Emacs recieves the result of that. For example, in a terminal C-m and are the same. In GUI Emacs you can remap them to different things, but in terminal Emacs both will always do whatever C-m does. BR, Robert Thorpe