Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shift + Letter Requires Long Hold #39

Open
adcox opened this issue Jun 15, 2016 · 3 comments
Open

Shift + Letter Requires Long Hold #39

adcox opened this issue Jun 15, 2016 · 3 comments
Labels
legacy-version For issues releated to the older legacy code, before all the refactorings in the develop branch.

Comments

@adcox
Copy link
Contributor

adcox commented Jun 15, 2016

This issue is similar to #37. When typing in a textInput box, you have to hold Shift and a letter down for a longer than usual to get a capitalized letter. Similar result with Shift + Tab - holding Shift for a second and then pressing tab will result in the desired behavior.

I've looked at the code a bit but having figured out how to solve this issue. I tried adding

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];

to the BaseEngine::onKeyReleased function because I thought perhaps the Shift key wasn't being registered, but that didn't help.

As with issue #37, the opengl_example in the ImGui project demonstrates the desired behavior, so the issue must lie somewhere between OF and the functions in ofxImGui that pass the key events to ImGui.

Thoughts?

@adcox
Copy link
Contributor Author

adcox commented Jun 15, 2016

Also, is there a reason we don't set io.KeySuper as in the ImGui opengl example?

@jvcleave
Copy link
Owner

Like with #37 , Does it behave as expected with ofSetVerticalSync(false)?

not sure about the GLFW_KEY_LEFT_SUPER

@adcox
Copy link
Contributor Author

adcox commented Jun 16, 2016

No, setting vertical sync to false does not solve the problem.

@adcox adcox mentioned this issue Jul 21, 2016
@Daandelange Daandelange added the legacy-version For issues releated to the older legacy code, before all the refactorings in the develop branch. label Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy-version For issues releated to the older legacy code, before all the refactorings in the develop branch.
Projects
None yet
Development

No branches or pull requests

3 participants