Get parse.js in sync with generated code
The generated keysymdef.js was recently converted to ES modules, but the generating script was overlooked.
This commit is contained in:
parent
7e19216368
commit
9076defaca
|
@ -80,23 +80,20 @@ var out = "// This file describes mappings from Unicode codepoints to the keysym
|
||||||
"// (and optionally, key names) expected by the RFB protocol\n" +
|
"// (and optionally, key names) expected by the RFB protocol\n" +
|
||||||
"// How this file was generated:\n" +
|
"// How this file was generated:\n" +
|
||||||
"// " + process.argv.join(" ") + "\n" +
|
"// " + process.argv.join(" ") + "\n" +
|
||||||
"var keysyms = (function(){\n" +
|
"var keynames = {keysyms};\n" +
|
||||||
" \"use strict\";\n" +
|
"var codepoints = {codepoints};\n" +
|
||||||
" var keynames = {keysyms};\n" +
|
|
||||||
" var codepoints = {codepoints};\n" +
|
|
||||||
"\n" +
|
"\n" +
|
||||||
" function lookup(k) { return k ? {keysym: k, keyname: keynames ? keynames[k] : k} : undefined; }\n" +
|
"function lookup(k) { return k ? {keysym: k, keyname: keynames ? keynames[k] : k} : undefined; }\n" +
|
||||||
" return {\n" +
|
"export default {\n" +
|
||||||
" fromUnicode : function(u) {\n" +
|
" fromUnicode : function(u) {\n" +
|
||||||
" var keysym = codepoints[u];\n" +
|
" var keysym = codepoints[u];\n" +
|
||||||
" if (keysym === undefined) {\n" +
|
" if (keysym === undefined) {\n" +
|
||||||
" keysym = 0x01000000 | u;\n" +
|
" keysym = 0x01000000 | u;\n" +
|
||||||
" }\n" +
|
" }\n" +
|
||||||
" return lookup(keysym);\n" +
|
" return lookup(keysym);\n" +
|
||||||
" },\n" +
|
" },\n" +
|
||||||
" lookup : lookup\n" +
|
" lookup : lookup\n" +
|
||||||
" };\n" +
|
"};\n";
|
||||||
"})();\n";
|
|
||||||
out = out.replace('{keysyms}', use_keynames ? JSON.stringify(keysyms) : "null");
|
out = out.replace('{keysyms}', use_keynames ? JSON.stringify(keysyms) : "null");
|
||||||
out = out.replace('{codepoints}', JSON.stringify(codepoints));
|
out = out.replace('{codepoints}', JSON.stringify(codepoints));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue