Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v
/
vlib
/
gg
/
keyboard.v
8
lines
·
7
sloc
·
260 bytes
·
17695801eab63685f46517b22e1b46223baa37d2
Raw
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
}
9