[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Non-ASCII characters Key binding (emacs 21.4)
From: |
Mounir AITTAHAR |
Subject: |
Re: Non-ASCII characters Key binding (emacs 21.4) |
Date: |
Wed, 19 Oct 2005 10:51:32 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.7 (X11/20050923) |
Here: (kbd "é") --> [2281]
What do you get on your computer?
Something amazing :) See yourself :
(kbd "é")-->[233]
(kbd "è")-->[232]
Okay, but read this :
(read-key-sequence ""), and typing "é" ---> [3945]
(read-key-sequence ""), and typing "è" ---> [3944]
It seems this is (kbd %c) + 3712. Why 3712.
So, if I do emacs (with X), it works :
(global-set-key [3945] (lambda()(interactive)(insert "e acute")))
(global-set-key [3944] (lambda()(interactive)(insert "e grave")))
Amazing, isn't it ?
-----------------------------------------------------------------
Related :
If i do this in emacs -nw, it works (unless i put keyboard-coding-system
to iso-latin-1 or latin-1) :
(global-set-key [233] (lambda()(interactive)(insert "e acute")))
(global-set-key [232] (lambda()(interactive)(insert "e grave")))
or
(global-set-key (kbd "é") (lambda()(interactive)(insert "e acute")))
(global-set-key (kbd "è") (lambda()(interactive)(insert "e grave")))
If i do this in emacs (*true* console mode), it works too.
------------------------------------------------------------------
--
Mounir AITTAHAR
Re: Non-ASCII characters Key binding (emacs 21.4), Mounir AITTAHAR, 2005/10/17
Re: [solved] Non-ASCII characters Key binding (emacs 21.4), Mounir AITTAHAR, 2005/10/24