We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fd3b7e commit 1769580Copy full SHA for 1769580
vlib/gg/keyboard.v
@@ -0,0 +1,8 @@
1
+module gg
2
+
3
+// is_key_down returns whether the given key is currently pressed.
4
+// You can use this, if you do not want to implement your own key event handling.
5
+@[inline]
6
+pub fn (mut ctx Context) is_key_down(k KeyCode) bool {
7
+ return ctx.pressed_keys[int(k)]
8
+}
0 commit comments