Browse Source

* More precise key handling

Michaël Van Canneyt 3 months ago
parent
commit
1f261235d5
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/pas2js/fresnel.wasm.shared.pp

+ 4 - 2
src/pas2js/fresnel.wasm.shared.pp

@@ -223,8 +223,10 @@ Const
   WASMSG_KEYSTATE_KIND       = 1;
   WASMSG_KEYSTATE_SHIFTSTATE = 2;
 
-  WASMSG_KEYKIND_CHAR    = 0;
-  WASMSG_KEYKIND_SPECIAL = 1;
+  // WASMSG_KEYSTATE_KIND tells How to intepret the WASMSG_KEYSTATE_KEYCODE field.
+  WASMSG_KEYKIND_CHAR              = 0;  // normal character key
+  WASMSG_KEYKIND_SPECIAL_SCANCODE  = 1;  // Special key: use keycode
+  WASMSG_KEYKIND_SPECIAL_MAP       = 2;  // Special key: use map to map to numerical key code
 
   // Location of data in measuretext array
   WASMMEASURE_WIDTH     = 0;