input.go no longer depends on glfw
This commit is contained in:
parent
fea20558ac
commit
ce6a108d27
273
input.go
273
input.go
@ -1,146 +1,143 @@
|
|||||||
package stone
|
package stone
|
||||||
|
|
||||||
// FIXME: do not require import of glfw. this may require linking it, and also
|
// These should be identical to the glfw keys
|
||||||
// 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
|
type Button int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MouseButton1 Button = Button(glfw.MouseButton1)
|
KeyUnknown Button = -1
|
||||||
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 = 162
|
||||||
KeySpace Button = Button(glfw.KeySpace)
|
KeyApostrophe Button = 161
|
||||||
KeyApostrophe Button = Button(glfw.KeyApostrophe)
|
KeyComma Button = 96
|
||||||
KeyComma Button = Button(glfw.KeyComma)
|
KeyMinus Button = 93
|
||||||
KeyMinus Button = Button(glfw.KeyMinus)
|
KeyPeriod Button = 92
|
||||||
KeyPeriod Button = Button(glfw.KeyPeriod)
|
KeySlash Button = 91
|
||||||
KeySlash Button = Button(glfw.KeySlash)
|
Key0 Button = 90
|
||||||
Key0 Button = Button(glfw.Key0)
|
Key1 Button = 89
|
||||||
Key1 Button = Button(glfw.Key1)
|
Key2 Button = 88
|
||||||
Key2 Button = Button(glfw.Key2)
|
Key3 Button = 87
|
||||||
Key3 Button = Button(glfw.Key3)
|
Key4 Button = 86
|
||||||
Key4 Button = Button(glfw.Key4)
|
Key5 Button = 85
|
||||||
Key5 Button = Button(glfw.Key5)
|
Key6 Button = 84
|
||||||
Key6 Button = Button(glfw.Key6)
|
Key7 Button = 83
|
||||||
Key7 Button = Button(glfw.Key7)
|
Key8 Button = 82
|
||||||
Key8 Button = Button(glfw.Key8)
|
Key9 Button = 81
|
||||||
Key9 Button = Button(glfw.Key9)
|
KeySemicolon Button = 80
|
||||||
KeySemicolon Button = Button(glfw.KeySemicolon)
|
KeyEqual Button = 79
|
||||||
KeyEqual Button = Button(glfw.KeyEqual)
|
KeyA Button = 78
|
||||||
KeyA Button = Button(glfw.KeyA)
|
KeyB Button = 77
|
||||||
KeyB Button = Button(glfw.KeyB)
|
KeyC Button = 76
|
||||||
KeyC Button = Button(glfw.KeyC)
|
KeyD Button = 75
|
||||||
KeyD Button = Button(glfw.KeyD)
|
KeyE Button = 74
|
||||||
KeyE Button = Button(glfw.KeyE)
|
KeyF Button = 73
|
||||||
KeyF Button = Button(glfw.KeyF)
|
KeyG Button = 72
|
||||||
KeyG Button = Button(glfw.KeyG)
|
KeyH Button = 71
|
||||||
KeyH Button = Button(glfw.KeyH)
|
KeyI Button = 70
|
||||||
KeyI Button = Button(glfw.KeyI)
|
KeyJ Button = 69
|
||||||
KeyJ Button = Button(glfw.KeyJ)
|
KeyK Button = 68
|
||||||
KeyK Button = Button(glfw.KeyK)
|
KeyL Button = 67
|
||||||
KeyL Button = Button(glfw.KeyL)
|
KeyM Button = 66
|
||||||
KeyM Button = Button(glfw.KeyM)
|
KeyN Button = 65
|
||||||
KeyN Button = Button(glfw.KeyN)
|
KeyO Button = 61
|
||||||
KeyO Button = Button(glfw.KeyO)
|
KeyP Button = 59
|
||||||
KeyP Button = Button(glfw.KeyP)
|
KeyQ Button = 57
|
||||||
KeyQ Button = Button(glfw.KeyQ)
|
KeyR Button = 56
|
||||||
KeyR Button = Button(glfw.KeyR)
|
KeyS Button = 55
|
||||||
KeyS Button = Button(glfw.KeyS)
|
KeyT Button = 54
|
||||||
KeyT Button = Button(glfw.KeyT)
|
KeyU Button = 53
|
||||||
KeyU Button = Button(glfw.KeyU)
|
KeyV Button = 52
|
||||||
KeyV Button = Button(glfw.KeyV)
|
KeyW Button = 51
|
||||||
KeyW Button = Button(glfw.KeyW)
|
KeyX Button = 50
|
||||||
KeyX Button = Button(glfw.KeyX)
|
KeyY Button = 49
|
||||||
KeyY Button = Button(glfw.KeyY)
|
KeyZ Button = 48
|
||||||
KeyZ Button = Button(glfw.KeyZ)
|
KeyLeftBracket Button = 47
|
||||||
KeyLeftBracket Button = Button(glfw.KeyLeftBracket)
|
KeyBackslash Button = 46
|
||||||
KeyBackslash Button = Button(glfw.KeyBackslash)
|
KeyRightBracket Button = 45
|
||||||
KeyRightBracket Button = Button(glfw.KeyRightBracket)
|
KeyGraveAccent Button = 44
|
||||||
KeyGraveAccent Button = Button(glfw.KeyGraveAccent)
|
KeyWorld1 Button = 39
|
||||||
KeyWorld1 Button = Button(glfw.KeyWorld1)
|
KeyWorld2 Button = 32
|
||||||
KeyWorld2 Button = Button(glfw.KeyWorld2)
|
|
||||||
KeyEscape Button = Button(glfw.KeyEscape)
|
KeyEscape Button = 348
|
||||||
KeyEnter Button = Button(glfw.KeyEnter)
|
KeyEnter Button = 347
|
||||||
KeyTab Button = Button(glfw.KeyTab)
|
KeyTab Button = 346
|
||||||
KeyBackspace Button = Button(glfw.KeyBackspace)
|
KeyBackspace Button = 345
|
||||||
KeyInsert Button = Button(glfw.KeyInsert)
|
KeyInsert Button = 344
|
||||||
KeyDelete Button = Button(glfw.KeyDelete)
|
KeyDelete Button = 343
|
||||||
KeyRight Button = Button(glfw.KeyRight)
|
KeyRight Button = 342
|
||||||
KeyLeft Button = Button(glfw.KeyLeft)
|
KeyLeft Button = 341
|
||||||
KeyDown Button = Button(glfw.KeyDown)
|
KeyDown Button = 340
|
||||||
KeyUp Button = Button(glfw.KeyUp)
|
KeyUp Button = 336
|
||||||
KeyPageUp Button = Button(glfw.KeyPageUp)
|
KeyPageUp Button = 335
|
||||||
KeyPageDown Button = Button(glfw.KeyPageDown)
|
KeyPageDown Button = 334
|
||||||
KeyHome Button = Button(glfw.KeyHome)
|
KeyHome Button = 333
|
||||||
KeyEnd Button = Button(glfw.KeyEnd)
|
KeyEnd Button = 332
|
||||||
KeyCapsLock Button = Button(glfw.KeyCapsLock)
|
KeyCapsLock Button = 331
|
||||||
KeyScrollLock Button = Button(glfw.KeyScrollLock)
|
KeyScrollLock Button = 330
|
||||||
KeyNumLock Button = Button(glfw.KeyNumLock)
|
KeyNumLock Button = 329
|
||||||
KeyPrintScreen Button = Button(glfw.KeyPrintScreen)
|
KeyPrintScreen Button = 328
|
||||||
KeyPause Button = Button(glfw.KeyPause)
|
KeyPause Button = 327
|
||||||
KeyF1 Button = Button(glfw.KeyF1)
|
KeyF1 Button = 326
|
||||||
KeyF2 Button = Button(glfw.KeyF2)
|
KeyF2 Button = 325
|
||||||
KeyF3 Button = Button(glfw.KeyF3)
|
KeyF3 Button = 324
|
||||||
KeyF4 Button = Button(glfw.KeyF4)
|
KeyF4 Button = 323
|
||||||
KeyF5 Button = Button(glfw.KeyF5)
|
KeyF5 Button = 322
|
||||||
KeyF6 Button = Button(glfw.KeyF6)
|
KeyF6 Button = 321
|
||||||
KeyF7 Button = Button(glfw.KeyF7)
|
KeyF7 Button = 320
|
||||||
KeyF8 Button = Button(glfw.KeyF8)
|
KeyF8 Button = 314
|
||||||
KeyF9 Button = Button(glfw.KeyF9)
|
KeyF9 Button = 313
|
||||||
KeyF10 Button = Button(glfw.KeyF10)
|
KeyF10 Button = 312
|
||||||
KeyF11 Button = Button(glfw.KeyF11)
|
KeyF11 Button = 311
|
||||||
KeyF12 Button = Button(glfw.KeyF12)
|
KeyF12 Button = 310
|
||||||
KeyF13 Button = Button(glfw.KeyF13)
|
KeyF13 Button = 309
|
||||||
KeyF14 Button = Button(glfw.KeyF14)
|
KeyF14 Button = 308
|
||||||
KeyF15 Button = Button(glfw.KeyF15)
|
KeyF15 Button = 307
|
||||||
KeyF16 Button = Button(glfw.KeyF16)
|
KeyF16 Button = 306
|
||||||
KeyF17 Button = Button(glfw.KeyF17)
|
KeyF17 Button = 305
|
||||||
KeyF18 Button = Button(glfw.KeyF18)
|
KeyF18 Button = 304
|
||||||
KeyF19 Button = Button(glfw.KeyF19)
|
KeyF19 Button = 303
|
||||||
KeyF20 Button = Button(glfw.KeyF20)
|
KeyF20 Button = 302
|
||||||
KeyF21 Button = Button(glfw.KeyF21)
|
KeyF21 Button = 301
|
||||||
KeyF22 Button = Button(glfw.KeyF22)
|
KeyF22 Button = 300
|
||||||
KeyF23 Button = Button(glfw.KeyF23)
|
KeyF23 Button = 299
|
||||||
KeyF24 Button = Button(glfw.KeyF24)
|
KeyF24 Button = 298
|
||||||
KeyF25 Button = Button(glfw.KeyF25)
|
KeyF25 Button = 297
|
||||||
KeyKP0 Button = Button(glfw.KeyKP0)
|
KeyKP0 Button = 296
|
||||||
KeyKP1 Button = Button(glfw.KeyKP1)
|
KeyKP1 Button = 295
|
||||||
KeyKP2 Button = Button(glfw.KeyKP2)
|
KeyKP2 Button = 294
|
||||||
KeyKP3 Button = Button(glfw.KeyKP3)
|
KeyKP3 Button = 293
|
||||||
KeyKP4 Button = Button(glfw.KeyKP4)
|
KeyKP4 Button = 292
|
||||||
KeyKP5 Button = Button(glfw.KeyKP5)
|
KeyKP5 Button = 291
|
||||||
KeyKP6 Button = Button(glfw.KeyKP6)
|
KeyKP6 Button = 290
|
||||||
KeyKP7 Button = Button(glfw.KeyKP7)
|
KeyKP7 Button = 284
|
||||||
KeyKP8 Button = Button(glfw.KeyKP8)
|
KeyKP8 Button = 283
|
||||||
KeyKP9 Button = Button(glfw.KeyKP9)
|
KeyKP9 Button = 282
|
||||||
KeyKPDecimal Button = Button(glfw.KeyKPDecimal)
|
KeyKPDecimal Button = 281
|
||||||
KeyKPDivide Button = Button(glfw.KeyKPDivide)
|
KeyKPDivide Button = 280
|
||||||
KeyKPMultiply Button = Button(glfw.KeyKPMultiply)
|
KeyKPMultiply Button = 269
|
||||||
KeyKPSubtract Button = Button(glfw.KeyKPSubtract)
|
KeyKPSubtract Button = 268
|
||||||
KeyKPAdd Button = Button(glfw.KeyKPAdd)
|
KeyKPAdd Button = 267
|
||||||
KeyKPEnter Button = Button(glfw.KeyKPEnter)
|
KeyKPEnter Button = 266
|
||||||
KeyKPEqual Button = Button(glfw.KeyKPEqual)
|
KeyKPEqual Button = 265
|
||||||
KeyLeftShift Button = Button(glfw.KeyLeftShift)
|
KeyLeftShift Button = 264
|
||||||
KeyLeftControl Button = Button(glfw.KeyLeftControl)
|
KeyLeftControl Button = 263
|
||||||
KeyLeftAlt Button = Button(glfw.KeyLeftAlt)
|
KeyLeftAlt Button = 262
|
||||||
KeyLeftSuper Button = Button(glfw.KeyLeftSuper)
|
KeyLeftSuper Button = 261
|
||||||
KeyRightShift Button = Button(glfw.KeyRightShift)
|
KeyRightShift Button = 260
|
||||||
KeyRightControl Button = Button(glfw.KeyRightControl)
|
KeyRightControl Button = 259
|
||||||
KeyRightAlt Button = Button(glfw.KeyRightAlt)
|
KeyRightAlt Button = 258
|
||||||
KeyRightSuper Button = Button(glfw.KeyRightSuper)
|
KeyRightSuper Button = 257
|
||||||
KeyMenu Button = Button(glfw.KeyMenu)
|
KeyMenu Button = 256
|
||||||
KeyLast Button = Button(glfw.KeyLast)
|
|
||||||
|
MouseButton1 Button = 0
|
||||||
|
MouseButton2 Button = 1
|
||||||
|
MouseButton3 Button = 2
|
||||||
|
MouseButton4 Button = 3
|
||||||
|
MouseButton5 Button = 4
|
||||||
|
MouseButton6 Button = 5
|
||||||
|
MouseButton7 Button = 6
|
||||||
|
MouseButton8 Button = 7
|
||||||
|
MouseButtonLeft Button = MouseButton1
|
||||||
|
MouseButtonRight Button = MouseButton2
|
||||||
|
MouseButtonMiddle Button = MouseButton3
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user