[Top][All Lists]

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

Re: two different internal representations of the key

From: Michael Schierl
Subject: Re: two different internal representations of the key
Date: Sun, 25 Nov 2007 02:22:30 +0100
User-agent: 40tude_Dialog/


On Wed, 21 Nov 2007 15:35:33 +0100, in gmane.emacs.bugs you wrote:

> Please, if someone can take a look on this issue, it's one of big
> advantages of emacs over vim for non-US users!

unfortunately this is an old and known issue (since Emacs 20 at least), and
I for myself have several "hacks" in my .emacs to work around it.


(defun mihi-insert-keycode () 
  (insert (format "%S" (read-key-sequence ""))))

This enables me to run M-x mihi-insert-keycode, press a key and have the
keycode in the current buffer. Then I have a cond block that defines keys
depending on system-configuration and/or window-system, like this:

 ((eq system-configuration 'windows-nt)
  (global-set-key [342387] "»")  ; C-ö
  (global-set-key [342398] "«")) ; C-ä
 ;; other configurations I use are here

Most likely this issue will vanish with Emacs 23, because that one will use
Unicode internally, so there won't be more than one codepoint for the same
character any longer.


#!/usr/bin/perl -I' # tekscribble.pl - start in an xterm and scribble with mouse
$|=1;$g="\35";sub g{getc}sub address@hidden"stty -icanon";p"\233?38h";for(;;){
p"$g\33\32";$_=g;$x=g;$X=g;$y=g;$Y=g;last if/q/;$k=$y.chr((ord$Y)+64).$x.chr((
ord$X)+32);p"\33\14"if/c/;p$g.(/ì/?$l:$k).$k;$l=$k;}p"\33\3";system"stty icanon"

reply via email to

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