diff options
author | Eduardo Julián | 2021-07-14 14:44:53 -0400 |
---|---|---|
committer | GitHub | 2021-07-14 14:44:53 -0400 |
commit | 89ca40f2f101b2b38187eab5cf905371cd47eb57 (patch) | |
tree | f05fd1677a70988c6b39c07e52d031d86eff28f1 /stdlib/source/library/lux/world/input/keyboard.lux | |
parent | 2431e767a09894c2f685911ba7f1ba0b7de2a165 (diff) | |
parent | 8252bdb938a0284dd12e7365b4eb84b5357bacac (diff) |
Merge pull request #58 from LuxLang/hierarchy_normalization
Hierarchy normalization
Diffstat (limited to 'stdlib/source/library/lux/world/input/keyboard.lux')
-rw-r--r-- | stdlib/source/library/lux/world/input/keyboard.lux | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/stdlib/source/library/lux/world/input/keyboard.lux b/stdlib/source/library/lux/world/input/keyboard.lux new file mode 100644 index 000000000..8c65fe493 --- /dev/null +++ b/stdlib/source/library/lux/world/input/keyboard.lux @@ -0,0 +1,112 @@ +(.module: + [library + [lux #*]]) + +(type: #export Key + Nat) + +(template [<code> <name>] + [(def: #export <name> Key <code>)] + + [00008 back_space] + [00010 enter] + [00016 shift] + [00017 control] + [00018 alt] + [00020 caps_lock] + [00027 escape] + [00032 space] + [00033 page_up] + [00034 page_down] + [00035 end] + [00036 home] + + [00037 left] + [00038 up] + [00039 right] + [00040 down] + + [00065 a] + [00066 b] + [00067 c] + [00068 d] + [00069 e] + [00070 f] + [00071 g] + [00072 h] + [00073 i] + [00074 j] + [00075 k] + [00076 l] + [00077 m] + [00078 n] + [00079 o] + [00080 p] + [00081 q] + [00082 r] + [00083 s] + [00084 t] + [00085 u] + [00086 v] + [00087 w] + [00088 x] + [00089 y] + [00090 z] + + [00096 num_pad_0] + [00097 num_pad_1] + [00098 num_pad_2] + [00099 num_pad_3] + [00100 num_pad_4] + [00101 num_pad_5] + [00102 num_pad_6] + [00103 num_pad_7] + [00104 num_pad_8] + [00105 num_pad_9] + + [00127 delete] + [00144 num_lock] + [00145 scroll_lock] + [00154 print_screen] + [00155 insert] + [00524 windows] + + [00112 f1] + [00113 f2] + [00114 f3] + [00115 f4] + [00116 f5] + [00117 f6] + [00118 f7] + [00119 f8] + [00120 f9] + [00121 f10] + [00122 f11] + [00123 f12] + [61440 f13] + [61441 f14] + [61442 f15] + [61443 f16] + [61444 f17] + [61445 f18] + [61446 f19] + [61447 f20] + [61448 f21] + [61449 f22] + [61450 f23] + [61451 f24] + ) + +(type: #export Press + {#pressed? Bit + #input Key}) + +(template [<bit> <name>] + [(def: #export (<name> key) + (-> Key Press) + {#pressed? <bit> + #input key})] + + [#0 release] + [#1 press] + ) |