MCPcopy Create free account
hub / github.com/SolarLune/masterplan / Key

Method Key

events.go:115–123  ·  view source on GitHub ↗
(keycode sdl.Keycode)

Source from the content-addressed store, hash-verified

113}
114
115func (keyboard Keyboard) Key(keycode sdl.Keycode) *InputState {
116
117 if _, exists := keyboard.KeyState[keycode]; !exists {
118 keyboard.KeyState[keycode] = &InputState{}
119 }
120
121 return keyboard.KeyState[keycode]
122
123}
124
125func (keyboard Keyboard) HeldKeys() []sdl.Keycode {
126 inputs := []sdl.Keycode{}

Callers 8

GlobalShortcutsMethod · 0.80
UpdateMethod · 0.80
UpdateMethod · 0.80
ConsumeKeysMethod · 0.80
PressedMethod · 0.80
handleEventsFunction · 0.80
mainFunction · 0.80
ConstructMenusFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected