fix key callback for glfw.KeyUnknown

This commit is contained in:
faiface 2017-03-09 22:11:59 +01:00
parent 94fe4019fd
commit fa774a4259
1 changed files with 3 additions and 0 deletions

View File

@ -329,6 +329,9 @@ func (w *Window) initInput() {
})
w.window.SetKeyCallback(func(_ *glfw.Window, key glfw.Key, scancode int, action glfw.Action, mods glfw.ModifierKey) {
if key == glfw.KeyUnknown {
return
}
switch action {
case glfw.Press:
w.currInp.buttons[Button(key)] = true