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" +
|
||||
"// How this file was generated:\n" +
|
||||
"// " + process.argv.join(" ") + "\n" +
|
||||
"var keysyms = (function(){\n" +
|
||||
" \"use strict\";\n" +
|
||||
" var keynames = {keysyms};\n" +
|
||||
" var codepoints = {codepoints};\n" +
|
||||
"var keynames = {keysyms};\n" +
|
||||
"var codepoints = {codepoints};\n" +
|
||||
"\n" +
|
||||
" function lookup(k) { return k ? {keysym: k, keyname: keynames ? keynames[k] : k} : undefined; }\n" +
|
||||
" return {\n" +
|
||||
" fromUnicode : function(u) {\n" +
|
||||
" var keysym = codepoints[u];\n" +
|
||||
" if (keysym === undefined) {\n" +
|
||||
" keysym = 0x01000000 | u;\n" +
|
||||
" }\n" +
|
||||
" return lookup(keysym);\n" +
|
||||
" },\n" +
|
||||
" lookup : lookup\n" +
|
||||
" };\n" +
|
||||
"})();\n";
|
||||
"function lookup(k) { return k ? {keysym: k, keyname: keynames ? keynames[k] : k} : undefined; }\n" +
|
||||
"export default {\n" +
|
||||
" fromUnicode : function(u) {\n" +
|
||||
" var keysym = codepoints[u];\n" +
|
||||
" if (keysym === undefined) {\n" +
|
||||
" keysym = 0x01000000 | u;\n" +
|
||||
" }\n" +
|
||||
" return lookup(keysym);\n" +
|
||||
" },\n" +
|
||||
" lookup : lookup\n" +
|
||||
"};\n";
|
||||
out = out.replace('{keysyms}', use_keynames ? JSON.stringify(keysyms) : "null");
|
||||
out = out.replace('{codepoints}', JSON.stringify(codepoints));
|
||||
|
||||
|
|
Loading…
Reference in New Issue