stone/input.go
2022-10-31 15:51:28 -04:00

147 lines
6.5 KiB
Go

package stone
// FIXME: do not require import of glfw. this may require linking it, and also
// including the glfw go lib in the binary. horrible. we need to copy the key
// codes here ourselves.
import "github.com/go-gl/glfw/v3.3/glfw"
type Button int
const (
MouseButton1 Button = Button(glfw.MouseButton1)
MouseButton2 Button = Button(glfw.MouseButton2)
MouseButton3 Button = Button(glfw.MouseButton3)
MouseButton4 Button = Button(glfw.MouseButton4)
MouseButton5 Button = Button(glfw.MouseButton5)
MouseButton6 Button = Button(glfw.MouseButton6)
MouseButton7 Button = Button(glfw.MouseButton7)
MouseButton8 Button = Button(glfw.MouseButton8)
MouseButtonLast Button = Button(glfw.MouseButtonLast)
MouseButtonLeft Button = Button(glfw.MouseButtonLeft)
MouseButtonRight Button = Button(glfw.MouseButtonRight)
MouseButtonMiddle Button = Button(glfw.MouseButtonMiddle)
KeyUnknown Button = Button(glfw.KeyUnknown)
KeySpace Button = Button(glfw.KeySpace)
KeyApostrophe Button = Button(glfw.KeyApostrophe)
KeyComma Button = Button(glfw.KeyComma)
KeyMinus Button = Button(glfw.KeyMinus)
KeyPeriod Button = Button(glfw.KeyPeriod)
KeySlash Button = Button(glfw.KeySlash)
Key0 Button = Button(glfw.Key0)
Key1 Button = Button(glfw.Key1)
Key2 Button = Button(glfw.Key2)
Key3 Button = Button(glfw.Key3)
Key4 Button = Button(glfw.Key4)
Key5 Button = Button(glfw.Key5)
Key6 Button = Button(glfw.Key6)
Key7 Button = Button(glfw.Key7)
Key8 Button = Button(glfw.Key8)
Key9 Button = Button(glfw.Key9)
KeySemicolon Button = Button(glfw.KeySemicolon)
KeyEqual Button = Button(glfw.KeyEqual)
KeyA Button = Button(glfw.KeyA)
KeyB Button = Button(glfw.KeyB)
KeyC Button = Button(glfw.KeyC)
KeyD Button = Button(glfw.KeyD)
KeyE Button = Button(glfw.KeyE)
KeyF Button = Button(glfw.KeyF)
KeyG Button = Button(glfw.KeyG)
KeyH Button = Button(glfw.KeyH)
KeyI Button = Button(glfw.KeyI)
KeyJ Button = Button(glfw.KeyJ)
KeyK Button = Button(glfw.KeyK)
KeyL Button = Button(glfw.KeyL)
KeyM Button = Button(glfw.KeyM)
KeyN Button = Button(glfw.KeyN)
KeyO Button = Button(glfw.KeyO)
KeyP Button = Button(glfw.KeyP)
KeyQ Button = Button(glfw.KeyQ)
KeyR Button = Button(glfw.KeyR)
KeyS Button = Button(glfw.KeyS)
KeyT Button = Button(glfw.KeyT)
KeyU Button = Button(glfw.KeyU)
KeyV Button = Button(glfw.KeyV)
KeyW Button = Button(glfw.KeyW)
KeyX Button = Button(glfw.KeyX)
KeyY Button = Button(glfw.KeyY)
KeyZ Button = Button(glfw.KeyZ)
KeyLeftBracket Button = Button(glfw.KeyLeftBracket)
KeyBackslash Button = Button(glfw.KeyBackslash)
KeyRightBracket Button = Button(glfw.KeyRightBracket)
KeyGraveAccent Button = Button(glfw.KeyGraveAccent)
KeyWorld1 Button = Button(glfw.KeyWorld1)
KeyWorld2 Button = Button(glfw.KeyWorld2)
KeyEscape Button = Button(glfw.KeyEscape)
KeyEnter Button = Button(glfw.KeyEnter)
KeyTab Button = Button(glfw.KeyTab)
KeyBackspace Button = Button(glfw.KeyBackspace)
KeyInsert Button = Button(glfw.KeyInsert)
KeyDelete Button = Button(glfw.KeyDelete)
KeyRight Button = Button(glfw.KeyRight)
KeyLeft Button = Button(glfw.KeyLeft)
KeyDown Button = Button(glfw.KeyDown)
KeyUp Button = Button(glfw.KeyUp)
KeyPageUp Button = Button(glfw.KeyPageUp)
KeyPageDown Button = Button(glfw.KeyPageDown)
KeyHome Button = Button(glfw.KeyHome)
KeyEnd Button = Button(glfw.KeyEnd)
KeyCapsLock Button = Button(glfw.KeyCapsLock)
KeyScrollLock Button = Button(glfw.KeyScrollLock)
KeyNumLock Button = Button(glfw.KeyNumLock)
KeyPrintScreen Button = Button(glfw.KeyPrintScreen)
KeyPause Button = Button(glfw.KeyPause)
KeyF1 Button = Button(glfw.KeyF1)
KeyF2 Button = Button(glfw.KeyF2)
KeyF3 Button = Button(glfw.KeyF3)
KeyF4 Button = Button(glfw.KeyF4)
KeyF5 Button = Button(glfw.KeyF5)
KeyF6 Button = Button(glfw.KeyF6)
KeyF7 Button = Button(glfw.KeyF7)
KeyF8 Button = Button(glfw.KeyF8)
KeyF9 Button = Button(glfw.KeyF9)
KeyF10 Button = Button(glfw.KeyF10)
KeyF11 Button = Button(glfw.KeyF11)
KeyF12 Button = Button(glfw.KeyF12)
KeyF13 Button = Button(glfw.KeyF13)
KeyF14 Button = Button(glfw.KeyF14)
KeyF15 Button = Button(glfw.KeyF15)
KeyF16 Button = Button(glfw.KeyF16)
KeyF17 Button = Button(glfw.KeyF17)
KeyF18 Button = Button(glfw.KeyF18)
KeyF19 Button = Button(glfw.KeyF19)
KeyF20 Button = Button(glfw.KeyF20)
KeyF21 Button = Button(glfw.KeyF21)
KeyF22 Button = Button(glfw.KeyF22)
KeyF23 Button = Button(glfw.KeyF23)
KeyF24 Button = Button(glfw.KeyF24)
KeyF25 Button = Button(glfw.KeyF25)
KeyKP0 Button = Button(glfw.KeyKP0)
KeyKP1 Button = Button(glfw.KeyKP1)
KeyKP2 Button = Button(glfw.KeyKP2)
KeyKP3 Button = Button(glfw.KeyKP3)
KeyKP4 Button = Button(glfw.KeyKP4)
KeyKP5 Button = Button(glfw.KeyKP5)
KeyKP6 Button = Button(glfw.KeyKP6)
KeyKP7 Button = Button(glfw.KeyKP7)
KeyKP8 Button = Button(glfw.KeyKP8)
KeyKP9 Button = Button(glfw.KeyKP9)
KeyKPDecimal Button = Button(glfw.KeyKPDecimal)
KeyKPDivide Button = Button(glfw.KeyKPDivide)
KeyKPMultiply Button = Button(glfw.KeyKPMultiply)
KeyKPSubtract Button = Button(glfw.KeyKPSubtract)
KeyKPAdd Button = Button(glfw.KeyKPAdd)
KeyKPEnter Button = Button(glfw.KeyKPEnter)
KeyKPEqual Button = Button(glfw.KeyKPEqual)
KeyLeftShift Button = Button(glfw.KeyLeftShift)
KeyLeftControl Button = Button(glfw.KeyLeftControl)
KeyLeftAlt Button = Button(glfw.KeyLeftAlt)
KeyLeftSuper Button = Button(glfw.KeyLeftSuper)
KeyRightShift Button = Button(glfw.KeyRightShift)
KeyRightControl Button = Button(glfw.KeyRightControl)
KeyRightAlt Button = Button(glfw.KeyRightAlt)
KeyRightSuper Button = Button(glfw.KeyRightSuper)
KeyMenu Button = Button(glfw.KeyMenu)
KeyLast Button = Button(glfw.KeyLast)
)