From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: How does the Meta/Alt-Key work behind the scenes? Date: Wed, 31 Oct 2012 09:44:01 +0100 Message-ID: <878vanvxny.fsf@googlemail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1351673065 23605 80.91.229.3 (31 Oct 2012 08:44:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Oct 2012 08:44:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 31 09:44:34 2012 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 1TTTub-00008C-2b for geh-help-gnu-emacs@m.gmane.org; Wed, 31 Oct 2012 09:44:33 +0100 Original-Received: from localhost ([::1]:48128 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTTuS-0001Hi-Pp for geh-help-gnu-emacs@m.gmane.org; Wed, 31 Oct 2012 04:44:24 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTTuN-0001HW-6a for help-gnu-emacs@gnu.org; Wed, 31 Oct 2012 04:44:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTTuM-0003rZ-6M for help-gnu-emacs@gnu.org; Wed, 31 Oct 2012 04:44:19 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:48148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTTuM-0003rI-0C for help-gnu-emacs@gnu.org; Wed, 31 Oct 2012 04:44:18 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TTTuQ-0008Lv-3c for help-gnu-emacs@gnu.org; Wed, 31 Oct 2012 09:44:22 +0100 Original-Received: from e178055183.adsl.alicedsl.de ([85.178.55.183]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 31 Oct 2012 09:44:22 +0100 Original-Received: from tjolitz by e178055183.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 31 Oct 2012 09:44:22 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 35 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178055183.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.93 (gnu/linux) Cancel-Lock: sha1:bWsUdkw0U9gATqHPCNlUBmMX10Q= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:87499 Archived-At: Hi List, I'm trying to emulate the (most basic) Emacs keybindings for the commandline of another Lisp dialect. Most of the functionality is already there, I only have to adopt the keybindings. This works fine with the 'Control' prefix, e.g. 'C-f' or 'C-b' (I can write them down as ^f and ^b). I can even emulate key-chords by waiting for the second key, e.g. 'C-x', wait 500, if next key is 'u' -> undo (C-x u). But I would like to have 'M-f', 'M-b', 'M-d' etc. as well, and maybe even 'C-M-f' and 'C-M-b'. Now, I'm writing this in Emacs/GNUS in a TMUX managed console session, and I can use my ALT keys for all the 'M-' keybindings given in the last paragraph, and of course it works in an X11 session too. Even bindings like 'M-S-5' ('M-%') work on the console. However, I was told to hardcode the Meta/Alt-Keybindings as ESC-key sequences, e.g. '^[', wait 500, then 'f', so that they can either be used as 'ALT-f' or as 'ESC f'. But only the latter (very uncomfortable) option works for me, and any keybindings that include the SHIFT key don't work at all. How did they do it in Emacs to make the 'M' and 'S' bindings work even on the console? My keyboard seems to send the right signals, how would Emacs recognize the keys otherwise - but why do 'M' and 'S' seem to be dead in my own implementation? Thanks for any hints. -- cheers, Thorsten