When typing, if a key is released quickly (looks like it's only if it's released in the same frame it's pressed, but not 100% sure) after being pressed, it won't be registered. I'm running into this due to parts of my keyboard layout sending rapid press/release events that are almost always ignored. If I add a delay so the events are spaced out by ~25ms, they start registering reliably. In other words, I suspect Picotron is doing something like this each frame:
# Process key events keymap = {} for event in events: if event.type == "key_up": keymap[event.key] = false elif event.type == "key_down": keymap[event.key] = true # Now handle events if keymap[...]: do_keypress() |
Not sure whether this reproduces on other OSes, but I think this would also manifest itself as dropped keypresses when running at very low framerates. I haven't been able to validate that theory yet though.
The candidate changelog for 0.1.0f (arriving "Friday-ish" as of Wednesday morning) lists this as fixed:
Fixed: key() / keyp() returns false when received keyup and keydown messages in same frame (should be true for 1 frame) |
[Please log in to post a comment]