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

Input.getKeyboard().started() / released() firing multiple times on Linux #950

Closed
Occult-Dev opened this issue Oct 15, 2018 · 4 comments
Closed

Comments

@Occult-Dev
Copy link

The Issue: In my script, I watch for when the spacebar is started & released. However, the code runs more than it should. It behaves like the down method. Also, the bug tends to get fixed when pressing another key while holding down spacebar [ _so, if I just press and hold spacebar, started and released constantly return true. BUT, if I press another key, they seem to get reset to their proper values ]

Quick link to script in question: https://pastebin.com/EPkKZrpC

My OS: Linux Mint
Blender Version: 2.79
Armory Version: 0.5


More Info: So, when using Keyboard.started() or Keyboard.released() in my code, they will continue to fire off even though, according to the docs, they should only fire once [ when pressed and when released, respectively ].

In this gif, you can see the issue. Note: I'm holding down the spacebar in this gif, but the trace keeps getting called as though I'm rapidly pressing it.
keyboard_bug


Blender File:
spaceyMcspaceface.blend.zip

@luboslenco
Copy link
Member

luboslenco commented Oct 15, 2018

(related weirdness: Kode/Kha#820, https://github.com/Kode/Kore/issues/327, should be Linux only)

@luboslenco luboslenco changed the title Input.getKeyboard().started() and Input.getKeyboard().released() are firing multiple times Input.getKeyboard().started() / released() firing multiple times on Linux Jan 22, 2019
@trsh
Copy link

trsh commented Feb 3, 2019

Still there:

package arm;

import iron.system.Input;

class XXX extends iron.Trait {
    var kb = Input.getKeyboard();

    public function new() {
        super();
        notifyOnUpdate(function() {
            if (kb.released("right")) {
                trace("Right - released"); // fires even not released
            }
        });
    }
}

@TheStarvingOne
Copy link

I confirm as above, both started() and released().

KDE Neon 5.14 Linux 4.15.0-45-generic
Intel Core2 Quad Q8300
Radeon RX580
8GB RAM

@luboslenco
Copy link
Member

Patched at https://github.com/Kode/Kore/pull/366.

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

No branches or pull requests

4 participants