mirror of
https://github.com/vlang/v.git
synced 2025-08-03 09:47:15 -04:00
9 lines
260 B
V
9 lines
260 B
V
module gg
|
|
|
|
// is_key_down returns whether the given key is currently pressed.
|
|
// You can use this, if you do not want to implement your own key event handling.
|
|
@[inline]
|
|
pub fn (mut ctx Context) is_key_down(k KeyCode) bool {
|
|
return ctx.pressed_keys[int(k)]
|
|
}
|