]>
git.proxmox.com Git - mirror_novnc.git/blob - utils/u2x11
3 # Convert "U+..." commented entries in /usr/include/X11/keysymdef.h
4 # into JavaScript for use by noVNC. Note this is likely to produce
5 # a few duplicate properties with clashing values, that will need
8 # Colin Dean <colin@xvpsource.org>
11 regex
="^#define[ \t]+XK_[A-Za-z0-9_]+[ \t]+0x([0-9a-fA-F]+)[ \t]+\/\*[ \t]+U\+([0-9a-fA-F]+)[ \t]+[^*]+.[ \t]+\*\/[ \t]*$"
12 echo "unicodeTable = {"
14 if echo "${line}" |
egrep -qs "${regex}"; then
16 x11
=$
(echo "${line}" |
sed -r "s/${regex}/\1/")
17 vnc
=$
(echo "${line}" |
sed -r "s/${regex}/\2/")
19 if echo "${vnc}" |
egrep -qs "^00[2-9A-F][0-9A-F]$"; then
20 : # skip ISO Latin-1 (U+0020 to U+00FF) as 1-to-1 mapping
22 # note 1-to-1 is possible (e.g. for Euro symbol, U+20AC)
23 echo " 0x${vnc} : 0x${x11},"
26 done < /usr
/include
/X11
/keysymdef.h |
uniq