[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Alt as meta, except for certain keys, how?
From: |
Kevin Rodgers |
Subject: |
Re: Alt as meta, except for certain keys, how? |
Date: |
Thu, 07 Aug 2003 12:38:54 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 |
Jussi Piitulainen wrote:
I want to use Alt as a Meta key, with the exception that certain keys
should be interpreted as ordinary unmodified characters: Alt-7 should
produce vertical bar |, Shift-Alt-7 alias Alt-/ should produce
backslash \, and there are a few others, all in ASCII.
I have managed to (global-set-key "\M-7" "|"). That works for writing
but is not a real solution. At least in an incremental search Alt-7
has already been interpreted as two keys: the escape terminates the
search and 7 is inserted in the buffer.
Try setting search-exit-option to nil.
I could not work out how to use keyboard-translate to turn Alt-7 into
vertical bar. If this is possible, could someone please show me the
concrete command? Or any other way to achieve my goal?
(keyboard-translate ?\M-7 ?|) doesn't work, because keyboard-translate-table
is a char-table, which only handles unmodified characters.
So perhaps you can use (abuse?) function-key-map:
(define-key function-key-map "\M-7" [?|])
That only takes effect if you also remove its default binding:
(global-unset-key "\M-7")
Emacs is 21.3.50.6 from 2002-11-27, a binary distribution for Mac OS
X, the keyboards are Apple's - Finnish layout - Alt is sometimes
called Option. I know I lose a couple of command bindings; I can
produce all accented letters with dead keys.
--
Kevin Rodgers
- Alt as meta, except for certain keys, how?, Jussi Piitulainen, 2003/08/07
- Re: Alt as meta, except for certain keys, how?,
Kevin Rodgers <=
- Re: Alt as meta, except for certain keys, how?, Ehud Karni, 2003/08/08
- Message not available
- Re: Alt as meta, except for certain keys, how?, Kevin Rodgers, 2003/08/08
- Re: Alt as meta, except for certain keys, how?, Ehud Karni, 2003/08/08
- Message not available
- Re: Alt as meta, except for certain keys, how?, Jussi Piitulainen, 2003/08/11
- Re: Alt as meta, except for certain keys, how?, Kevin Rodgers, 2003/08/11
- Re: Alt as meta, except for certain keys, how?, Jussi Piitulainen, 2003/08/12
- Re: Alt as meta, except for certain keys, how?, Kevin Rodgers, 2003/08/12
- Re: Alt as meta, except for certain keys, how?, Jussi Piitulainen, 2003/08/13
- Re: Alt as meta, except for certain keys, how?, Kai Großjohann, 2003/08/15
- Message not available
- Re: Alt as meta, except for certain keys, how?, Kevin Rodgers, 2003/08/11