Fixed keyboard shortcuts on linux.

This commit is contained in:
Emil Segerås 2015-07-26 09:57:44 +02:00
parent 78f44600fc
commit e65907488c

View File

@ -220,15 +220,10 @@ static void key_callback(GLFWwindow *window, int key, int scancode, int action,
key_super = down;
break;
default:
// GLFW has some platform issues with keyboard handling that needs workaround until
// it's fixed properly in glfw. This code must not run on linux with glfw 3.0.4 (it
// has changed several times in the past). issue #10.
#ifndef TB_TARGET_LINUX
// glfw calls key_callback instead of char_callback
// when pressing a character while ctrl is also pressed.
if ((key_ctrl || key_super) && !key_alt && key >= 32 && key <= 255)
InvokeKey(window, key, TB_KEY_UNDEFINED, modifier, down);
#endif
break;
}
}