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

Accessibility is triggered when typing 'a' in Console and Input #1990

Closed
Beuc opened this issue Aug 31, 2019 · 5 comments

Comments

@Beuc
Copy link
Contributor

commented Aug 31, 2019

Hi,

When using the Console, and more generally when entering text, the Accessibility menu is sometimes triggers.
This seems specific to RenPyWeb, and it seems to depend on how one presses the keys (a rapid succession of 'a' is more likely to trigger it).
This is quite annoying for the player (and for the developer working in the Console ;)).

I'm not sure why that happens and would appreciate help/guidance on debugging this.

@kobaltcore

This comment has been minimized.

Copy link
Contributor

commented Sep 2, 2019

I can confirm that this issue exists on macOS as well as Windows, too.
This has been tested on the latest Ren'Py release (7.3.2.320) on macOS Catalina and macOS Mojave as well as Windows 10 with "The Question" to avoid any custom code messing with it.
Unfortunately I can't reliably replicate it as the amount of A's required appears to be random. Sometimes it happens instantly, sometimes it take a lot of key presses before it does.

What I did find out however is that all inputs are affected. For example a simple

$ renpy.input("A-Key Spam")

and subsequent repeated pressing of the A key will also cause this behavior to occur.

The keypress also seems to get intercepted somewhat. If a typed A happens to trigger the accessibility screen, it does not appear in the text input afterwards. However, if one prints all the KEYDOWN events in renpy.display.behavior.Input@event, then the event shows up as registered, just not propagated until the character is actually displayed.

See the attached screenshot below for an example of this behavior. My methodology was to repeatedly enter the letters sa, prefixing the A by something so it would be easier to tell whether it properly triggered or not. Whenever the accessibility screen triggered, the A was skipped, however the event was still registered (the 97).
Screen Shot

@renpytom

This comment has been minimized.

Copy link
Member

commented Sep 10, 2019

I landed a0dad58 , my attempt to fix this. My guess is that this is happening because a KEYDOWN event is being delivered before a TEXTINPUT event makes the queue, but I wasn't able to repeat this on web, windows, or linux. So if someone could try out that patch and let me know if it fixes the problem, I'd appreciate it.

@kobaltcore

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2019

The problem appears to have been solved, at least on my end.
I reproduced the issue, then applied the changes, then tried reproducing it again without success.
As such it appears that your fix has worked.
I can not confirm for renpyweb, but macOS and Windows appear to be fine now, from my POV.

@Beuc

This comment has been minimized.

Copy link
Contributor Author

commented Sep 10, 2019

Thanks @renpytom !
Same as @kobaltcore when testing with RenPyWeb (7.3.2 + this patch).
Note: without the patch, I couldn't trigger the bug for 'v', only for 'a'.

@renpytom

This comment has been minimized.

Copy link
Member

commented Sep 10, 2019

Thanks everyone. Closing the bug now.

@renpytom renpytom closed this Sep 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.