5

Is there a way of converting a UTF-8 character to its corresponding xmodmap name?

So if the input is the output would be rightdoublequotemark.

Tyilo
  • 5,981

1 Answers1

1

man xmodmap says:

The list of keysym names may be found in the header file <X11/keysymdef.h> (without the XK_ prefix), supplemented by the keysym database /usr/local/share/X11/XKeysymDB.

For your example, the corresponding line of X11/keysymdef.h is:

 #define XK_rightdoublequotemark          0x0ad3  /* U+201D RIGHT DOUBLE QUOTATION MARK */

Recent versions of this file has comment header that describes how to parse it reliably using Perl/etc. for any needed machine action, including making reverse table.

Netch
  • 2,529