GNU bug report logs -
#78714
30.1; failure binding keys to certain unicode characters
Previous Next
Full log
Message #8 received at 78714 <at> debbugs.gnu.org (full text, mbox):
> From: John Holman <john.g.holman <at> gmail.com>
> Date: Sat, 7 Jun 2025 12:46:56 +0100
>
> Attempting to bind unicode characters (e.g. \u111E) to keys in a minor mode with syntax like
> (define-key my-test-mode-map (kbd "c") "\u221E")
> usually works. In this case, C-h k c shows
>
> c runs the command #<string CB7> (found in my-test-mode-map), which is
> a keyboard macro.
> It is bound to c.
> Macro: M-\20636
> Keyboard macro.
>
> However the same syntax fails for some characters (so far I've noticed this for \u00B0 to \u00B6 but there
> will be more) e.g
> after (define-key my-test-mode-map (kbd "a") "\u00B2") C-h k shows
>
> a runs the command #<string B6B> (found in my-test-mode-map), which is
> a keyboard macro.
> It is bound to a.
> Macro: M-2
> Keyboard macro.
>
> and the effect of pressing "a" is to invoke command-digit-argument rather than insert the required character
It's a feature: #xB2 is #x32 with the high bit set, and the Meta bit
sets that bit. See current-input-mode.
This bug report was last modified 4 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.