]> git.proxmox.com Git - mirror_novnc.git/blobdiff - core/input/util.js
Uncomment ES6 module syntax
[mirror_novnc.git] / core / input / util.js
index efdccedcda9ef0b6a684c1a432034edc39215181..f34a9abfee284a1129c54813bb16ec189917a541 100644 (file)
@@ -1,7 +1,6 @@
-/* [module]
- * import KeyTable from "./keysym";
- * import keysyms from "./keysymdef";
- */
+import KeyTable from "./keysym.js";
+import keysyms from "./keysymdef.js";
+
 
 var KeyboardUtil = {};
 
@@ -184,10 +183,7 @@ var KeyboardUtil = {};
             codepoint = evt.keyCode;
         }
         if (codepoint) {
-            var res = keysyms.fromUnicode(substituteCodepoint(codepoint));
-            if (res) {
-                return res;
-            }
+            return keysyms.fromUnicode(substituteCodepoint(codepoint));
         }
         // we could check evt.key here.
         // Legal values are defined in http://www.w3.org/TR/DOM-Level-3-Events/#key-values-list,
@@ -679,4 +675,4 @@ KeyboardUtil.EscapeModifiers = function(next) {
     };
 };
 
-/* [module] export default KeyboardUtil; */
+export default KeyboardUtil;