help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alt as meta, except for certain keys, how?


From: Jussi Piitulainen
Subject: Re: Alt as meta, except for certain keys, how?
Date: 12 Aug 2003 11:26:34 +0300
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Kevin Rodgers writes:

> So you need to use the vector notation for keys containing
> meta-modified non-ASCII characters:
> 
> (define-key key-translation-map [?\M- ...] ...)

M-space? Anyway, that did not seem to work when I tried it. The key
remained unbound.

>> Is there a way to turn every valid key code into an
>> Escape-Meta-Alt-Control-Shift-something? Or can I use a numeric key
>> code with function-key-map?
> 
> I don't understand your question.

I'm sorry. A concrete instance of the first question is this. I'll
write "letter" for the non-ASCII letters. The following works:

   (define-key key-translation-map [-134217482] "o")

I would like to find out a more transparent syntax for that number;
text-char-description does not do it. Things like [?\M-letter] and
[?\M- ?letter] and [(meta ?letter)] do not seem to work.

For the second question I know the answer now: the following works.

   (global-unset-key [-134217500])
   (define-key function-key-map [-134217500] "a")

I got these numbers by pressing the key I want to bind: Alt-letter,
where Alt is Meta and letter is outside ASCII. However, ?\M-letter
evaluates to -134215434 rather than -134217482. If I omit to set
mac-keyboard-text-encoding to Latin-1, ?\M-letter evaluates to
-134217574, which is again something else (and the key in question
cannot be used to produce the letter any more).

"\M-letter" evaluates to a string that contains just the letter.

I think I'll use the numbers for these few keys.
-- 
Jussi 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]