You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using fast keyboard-like devices (e.g. barcode scanners) characters are lost in the TextInput field (for longish barcodes). For example: 1234ABCDE12345678 could end up as 12DE12345 or 12DE!"§$%.
If the characters end up upper case the "virtual caps-lock" remains until the restart of the kivy app. I was able to observe this behavior with multiple apps using TextInput fields on raspbian with the sdl2 backend.
Expected behavior
I would expect the text is correctly captured independent of input device and speed. No characters or symbols are missing and there should be no "virtual caps-lock" when characters go missing.
To Reproduce
Use a barcode scanner (without any interkey delay - this "fixes" the problem, but is a nuisance for long barcodes in productive settings) with the Kivy RST-Editor example. Continuously scan long barcodes (>10 symbols) with letters (upper/lower case) and numbers.
Code and Logs and screenshots
There was no obvious error related to this issue in the logs.
Additional context
I was able to narrow down the problem to the kivy/core/window/_window_sdl2.pyx.
In _WindowSDL2Storage:
(line 536, class member poll) SDL_PollEvent is called with the gil released. The return value rv is hence in an undefined state after the with nogil block.
(line 530, class member wait_event) SDL_WaitEvent(NULL) is called with gil released and never waited.
Removing the nogil statements (around the aforementioned lines) fixes my barcode scanner problem (but may cause other problems).
The text was updated successfully, but these errors were encountered:
Software Versions
Describe the bug
When using fast keyboard-like devices (e.g. barcode scanners) characters are lost in the TextInput field (for longish barcodes). For example: 1234ABCDE12345678 could end up as 12DE12345 or 12DE!"§$%.
If the characters end up upper case the "virtual caps-lock" remains until the restart of the kivy app. I was able to observe this behavior with multiple apps using TextInput fields on raspbian with the sdl2 backend.
Expected behavior
I would expect the text is correctly captured independent of input device and speed. No characters or symbols are missing and there should be no "virtual caps-lock" when characters go missing.
To Reproduce
Use a barcode scanner (without any interkey delay - this "fixes" the problem, but is a nuisance for long barcodes in productive settings) with the Kivy RST-Editor example. Continuously scan long barcodes (>10 symbols) with letters (upper/lower case) and numbers.
Code and Logs and screenshots
There was no obvious error related to this issue in the logs.
Additional context
I was able to narrow down the problem to the kivy/core/window/_window_sdl2.pyx.
In _WindowSDL2Storage:
Removing the nogil statements (around the aforementioned lines) fixes my barcode scanner problem (but may cause other problems).
The text was updated successfully, but these errors were encountered: