Closed Geistyp closed 8 years ago
void BaseEngine::onKeyPressed(ofKeyEventArgs& event) { int key = event.keycode; io->KeysDown[key] = true; io->AddInputCharacter((unsigned short)event.codepoint); } void EngineGLFW::onKeyReleased(ofKeyEventArgs& event) { int key = event.keycode; io->KeysDown[key] = false; io->KeyCtrl = io->KeysDown[GLFW_KEY_LEFT_CONTROL] || io->KeysDown[GLFW_KEY_RIGHT_CONTROL]; io->KeyShift = io->KeysDown[GLFW_KEY_LEFT_SHIFT] || io->KeysDown[GLFW_KEY_RIGHT_SHIFT]; io->KeyAlt = io->KeysDown[GLFW_KEY_LEFT_ALT] || io->KeysDown[GLFW_KEY_RIGHT_ALT]; if(key < GLFW_KEY_ESCAPE) { io->AddInputCharacter((unsigned short)event.codepoint); } }
press and release add same codepoint, if I try input 'a', input text will be 'aa'
Thanks! I have commented it out of the BaseEngine
press and release add same codepoint, if I try input 'a', input text will be 'aa'