| 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 | |