GNU bug report logs -
#78714
30.1; failure binding keys to certain unicode characters
Previous Next
Reported by: John Holman <john.g.holman <at> gmail.com>
Date: Sat, 7 Jun 2025 11:48:01 UTC
Severity: normal
Tags: fixed
Found in version 30.1
Fixed in version 30.2
Done: Robert Pluim <rpluim <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #35 received at 78714 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Mon, 9 Jun 2025 22:12:40 +0100, John Holman <john.g.holman <at> gmail.com> said:
John> Hi Robert
John> I just tried using key-description, for example
John> (define-minor-mode math-typing-mode
John> "A minor mode for typing maths characters"
John> :init-value nil
John> :lighter " Math"
John> (let ((map (make-sparse-keymap)))
John> (if math-typing-mode
John> (progn
John> (define-key map (kbd "C-3") (key-description "\u00B3"))
John> (use-local-map map))
John> (use-local-map nil))))
John> but this produces the same result as
John> (define-key map (kbd "C-3") "\u00B3")
John> while
John> (define-key map (kbd "C-3") [?\u00B3]) or my original lambda works (inserts
John> the unicode character when you press C-3)
John> Probably I misunderstand what you are suggesting though?
No, Iʼd forgotten about one of the corner cases of
`key-description'. `key-parse' would work here, but that probably has
other issues, so specifying the vector is your best bet.
Robert
--
This bug report was last modified 7 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.