func GetKeyboardState() *KeyboardState { var state C.ALLEGRO_KEYBOARD_STATE C.al_get_keyboard_state(&state) return (*KeyboardState)(&state) }
// Gets the state of a given keyboard key by keycode. True is down, false is up. func KeyDown(keycode int) bool { state := &C.ALLEGRO_KEYBOARD_STATE{} C.al_get_keyboard_state(state) return bool(C.al_key_down(state, C.int(keycode))) }
func GetKeyboardState() *KeyboardState { ks := new(C.ALLEGRO_KEYBOARD_STATE) C.al_get_keyboard_state(ks) return (*KeyboardState)(unsafe.Pointer(ks)) }