From 656bf89583eac99e374da4b619335f2c5f58029f Mon Sep 17 00:00:00 2001 From: Liam Galvin Date: Fri, 30 Nov 2018 21:35:00 +0000 Subject: [PATCH] Support alternative keyboard layouts --- config/keys_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config/keys_test.go b/config/keys_test.go index 1508ce3..6887469 100644 --- a/config/keys_test.go +++ b/config/keys_test.go @@ -14,14 +14,14 @@ func TestKeyCombinations(t *testing.T) { require.Nil(t, err) require.NotNil(t, combi) - assert.Equal(t, glfw.KeyA, combi.key) + assert.Equal(t, 'a', combi.char) assert.Equal(t, glfw.ModControl+glfw.ModAlt, combi.mods) - assert.True(t, combi.Match(glfw.ModControl^glfw.ModAlt, glfw.KeyA)) - assert.False(t, combi.Match(glfw.ModControl^glfw.ModAlt, glfw.KeyB)) - assert.False(t, combi.Match(glfw.ModControl, glfw.KeyA)) - assert.False(t, combi.Match(glfw.ModAlt, glfw.KeyA)) - assert.False(t, combi.Match(0, glfw.KeyA)) - assert.False(t, combi.Match(glfw.ModControl^glfw.ModAlt^glfw.ModShift, glfw.KeyA)) + assert.True(t, combi.Match(glfw.ModControl^glfw.ModAlt, 'a')) + assert.False(t, combi.Match(glfw.ModControl^glfw.ModAlt, 'b')) + assert.False(t, combi.Match(glfw.ModControl, 'b')) + assert.False(t, combi.Match(glfw.ModAlt, 'd')) + assert.False(t, combi.Match(0, 'e')) + assert.False(t, combi.Match(glfw.ModControl^glfw.ModAlt^glfw.ModShift, 'f')) }