Mon 21 Jul 22:43:21 CEST 2025
This commit is contained in:
parent
a443133ec9
commit
a309409c77
35
js/x11/core/keysyms.update.sh
Normal file
35
js/x11/core/keysyms.update.sh
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
keysymdef_url=http://cgit.freedesktop.org/xorg/proto/xproto/plain/keysymdef.h
|
||||||
|
keysymdef=$(mktemp)
|
||||||
|
|
||||||
|
wget $keysymdef_url -O $keysymdef
|
||||||
|
|
||||||
|
(
|
||||||
|
echo "
|
||||||
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\\
|
||||||
|
|
||||||
|
This file is automatically translated from X.Org's xproto/keysymdef.h
|
||||||
|
Please, do not update this file with your hands, run $(basename "$0").
|
||||||
|
|
||||||
|
\\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
"
|
||||||
|
|
||||||
|
sed -r '
|
||||||
|
s/#ifdef\s+/\/\/ Group /
|
||||||
|
s/#endif.*//
|
||||||
|
s/#define\s+([^ ]+)(\s+)([^ ]+)\s*\/\*\s*([^\*]+[^ ])\s*\*\// \1:\2{ code: \3, description: "\4" },/
|
||||||
|
s/(\b)U\+([0-9A-F]+)(\b)/\1(\\u\2)\3/i
|
||||||
|
s/#define\s+([^ ]+)(\s+)([^ ]+)/ \1:\2{ code: \3, description: null },/
|
||||||
|
#s/#define\s+([^ ]+)(\s+[^ ]+)/ \1:\2,/
|
||||||
|
' $keysymdef
|
||||||
|
|
||||||
|
echo -n '
|
||||||
|
NoSymbol: 0
|
||||||
|
};'
|
||||||
|
|
||||||
|
) > "$(dirname "$0")/keysyms.js"
|
||||||
|
|
||||||
|
rm $keysymdef
|
Loading…
Reference in New Issue
Block a user