diff --git a/src/window_eglut.cpp b/src/window_eglut.cpp index 13d7aa5..90ac35e 100644 --- a/src/window_eglut.cpp +++ b/src/window_eglut.cpp @@ -225,11 +225,12 @@ int EGLUTWindow::getKeyMinecraft(int keyCode) { void EGLUTWindow::_eglutKeyboardSpecialFunc(int key, int action) { if (currentWindow == nullptr) return; + if (key > 65535) + return; if (key == 65507) currentWindow->modCTRL = (action != EGLUT_KEY_RELEASE); - if (currentWindow->modCTRL && (key == 86 || key == 118) && action == EGLUT_KEY_PRESS) { + if (currentWindow->modCTRL && (key == 86 || key == 118) && action == EGLUT_KEY_PRESS) eglutRequestPaste(); - } int mKey = getKeyMinecraft(key); KeyAction enumAction = (action == EGLUT_KEY_PRESS ? KeyAction::PRESS : (action == EGLUT_KEY_REPEAT ? KeyAction::REPEAT : KeyAction::RELEASE)); @@ -261,4 +262,4 @@ void EGLUTWindow::getWindowSize(int& width, int& height) const { void EGLUTWindow::setClipboardText(std::string const &text) { eglutSetClipboardText(text.c_str()); -} \ No newline at end of file +}