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

Ctrl and Shift key events masked when one already pressed #12993

Closed
ghost opened this issue Nov 17, 2017 · 5 comments · Fixed by #31740
Closed

Ctrl and Shift key events masked when one already pressed #12993

ghost opened this issue Nov 17, 2017 · 5 comments · Fixed by #31740

Comments

@ghost
Copy link

ghost commented Nov 17, 2017

Operating system or device, Godot version, GPU Model and driver (if graphics related):
Windows 10 Pro Build 15063 x86_64
Godot v2.1.4.stable.official 64-bit

Update
I just confirmed masking to be present on Ubuntu Mate 16.04 w/ Linux 4.10.0-35-generic

Issue description:
When either control or shift are mapped to an action and pressed, pressing one key will mask all events of the other key. I believe this is due to their property as modifier keys.

To workaround, don't use both control and shift in player controls.

Steps to reproduce:
With the inputs of shift and control monitored in some fashion in _input:

  1. Press Shift (The keypress will register)
  2. Press Ctrl (The keypress will not register)
  3. Release Shift (The release won't register)
  4. Release Ctrl (The release will register)

Link to minimal example project:
input_bug_test.zip

Just open the test scene and run it.
I have m_ctrl mapped to Control and m_shift mapped to Shift, and the events of either being pressed or released printing to the debug console.

@ghost ghost added this to the 2.1 milestone Nov 18, 2017
@ghost
Copy link

ghost commented Nov 18, 2017

Works as expected on master ca19403

Shift has been pressed!
Ctrl has been pressed!
Shift has been released!
Ctrl has been released!

@rosshadden
Copy link
Contributor

rosshadden commented Apr 23, 2018

I get a very similar but much less straightforward issue. It's easiest to sum it up as "if I map an action to shift or use input.is_key_pressed(KEY_SHIFT), everything goes absolutely haywire". It's like from the moment I hit shift, no other controls work properly.

Update: The issue I am talking about seems to be explicitly addressed by #18185, so I'll move my focus over there.

@akien-mga
Copy link
Member

Since #18020 claims to fix this issue, I assume it's still reproducible in the master branch so changing milestone :)

@akien-mga
Copy link
Member

Well I just tested and I also can't reproduce the bug in OP (on Linux/X11), I have the same results as #12993 (comment)

Updated test project:
input_bug_test_3.1.zip

@bruvzg Is #18020 still addressing this issue, and if so what part of it?

@akien-mga akien-mga modified the milestones: 3.1, 3.2 Jan 19, 2019
@bojidar-bg
Copy link
Contributor

I am also unable to reproduce the bug on Arch Linux, eb70999, using the example project.
Could it be a Windows-specific bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants