[Top][All Lists]

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

Re: kbd vs read-key-sequence

From: Stefan Monnier
Subject: Re: kbd vs read-key-sequence
Date: Thu, 01 Mar 2007 18:23:58 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux)

>> [ BTW, please always specify whether this is in "console mode" or not,
>> because the way keys are translated can be different in each case. ]

> Sorry. No console; Windows or X (with GTK, BTW :).

OK, good, that's what I assumed.

>> Hmm... so w32 does decoding using keyboard-coding-system (aka
>> encoded-kb)?
> I suppose so.

>> What does keyboard-coding-system say?
> cp1252 on Windows, nil on Kubuntu.

Hmm... so I'm still wondering why does read-key-sequence return 186 as well?
What does M-: (keyboard-coding-system) say?
What does M-: (char-to-string 186) say?
What does the following piece of code say:

  (let ((str (char-to-string 186))
        (ccl (car (aref (coding-system-spec (keyboard-coding-system)) 4)))
        (vec [nil nil nil nil nil nil nil nil nil])
    (while (= (length (setq result (ccl-execute-on-string ccl vec str t))) 0)
      (dotimes (i 9) (aset vec i nil))
      (setq str (format "%s%c" str (read-char-exclusive))))
    (vector (aref result 0))))

-- Stefan

reply via email to

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