[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Translating keys
From: |
Stefan Monnier |
Subject: |
Re: Translating keys |
Date: |
Sun, 16 Oct 2005 23:03:01 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> (local-set-key "ò" (lambda () (interactive) (insert "{")))
> but it doesn't work.
> I think I should know the code generated by the key. Is there a way?
There are many different ò. And the one sent by your keyboard's key is not
always the same depending on the version of Emacs, and the one read from
your .emacs is not always the same either depending on your locale, your
Emacs settings and maybe a -*- coding -*- cookie in the file.
Try M-: (read-event) RET and then hit your ò key. It'll return the code
Elisp receives in response to this key (e.g. 2290). You can then bind it
with (local-set-key [2290] "{").
> Anyway, the "insert" function is not useful, because the generated character
> does not behave like the original one (I've electric C enabled and the
> { generated by "insert" is not recognized as electric; the original { is).
Try (local-set-key "ò" "{"). The "{" part is a keyboard macro which tells
Emacs to behave as if you had typed the key sequence "{" (i.e. composed of
a single key).
Stefan
- Re: Translating keys, (continued)
- Re: Translating keys, Pascal Bourguignon, 2005/10/17
- Re: Translating keys, Mounir AITTAHAR, 2005/10/17
- Re: Translating keys, Mounir AITTAHAR, 2005/10/18
- Re: Translating keys, Pascal Bourguignon, 2005/10/18
- Re: Translating keys, Mounir AITTAHAR, 2005/10/19
- Re: Translating keys, Stefan Monnier, 2005/10/19
- Re: Translating keys, Mounir AITTAHAR, 2005/10/20
- Re: Translating keys, Mounir AITTAHAR, 2005/10/20
- Re: Translating keys, Mounir AITTAHAR, 2005/10/20
- Re: Translating keys [solved], Mounir AITTAHAR, 2005/10/21
Re: Translating keys,
Stefan Monnier <=