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
[ Bug ] Problem with HID device at first fire in the edit focused in pysimplegui tkinter. #6728
Comments
Android support has not been tested very well. We are also having some issues with focus on versions 8.65.12, 8.6.13 of tkinter (and likely more). I have recently added to the window.force_focus()
window['-INPUT-'].set_focus() You may need to do similar changes or experiment further. Can you please get the versions involved with your setup, such as tkinter's version? You can use sg.main() as one place to find it. I've simply not had the availability to do much with Android and PSG5 yet. We're working on the license changes for PSG 5 as a whole and that's consuming much of my time. I'll work with you offline on this problem too. I didn't understand as much as now. It's still very helpful to post versions, etc, as well as what we learn here so others benefit. |
Thanks for help. |
Ops, i have get another palm today ... i read is not pysimplegui5 ... but the problem is the same here (so is not PSGversion i think). |
I am doing a video, please wait, i will post it ASAP. |
Let me explain:
I hope I haven't messed up, I never use YouTube, I made a video and posted it, hoping it's visible to everyone. |
Hi, for the moment I have done a simple workaround: I force the warehouse worker to click on an edit field, and then on a button. In the meantime the keyboard has been activated, and the handheld is ready to fire. And after that, he has no problems. |
Bug
Problem with HID device at first fire in the edit focused in pysimplegui tkinter.
Operating System
Android
PySimpleGUI Port (tkinter, Qt, Wx, Web)
Tkinter
Versions
Version information can be obtained by calling
sg.main_get_debug_data()
Or you can print each version shown in ()
Android 13 (the phone is samsung).
PSG is 5, i reinstall and i have inserted my developer key (take care, the screen is too much large in orizontal, it has been difficult to insert the passcode, but i set it).
Python version (
sg.sys.version
)Pydroid ... i have not the cell in my hand now ... but seems thae pydroid has been update because running the pysimplegui app, library pusimplegui wasn't installed (they have been lost by pydroid). So is a recent pydrod i mean.
PySimpleGUI Version (
sg.__version__
)5 with developer key inserted correctly
GUI Version (tkinter (
sg.tclversion_detailed
), PySide2, WxPython, Remi)tkinter
Your Experience In Months or Years (optional)
6 Years Python programming experience
Since Commodore Vic 20 ... :-D ... Years Programming experience overall
Have used another Python GUI Framework? (tkinter, Qt, etc) (yes/no is fine)
No only the simpler tkinter
Anything else you think would be helpful?
I'm sorry is not simple to handle with warehouse workers ... it seems to me that the issue is due to some difference in recent android, with HID devices. Before, runned the psg app, it instantly fire barcode into che edit field. Now it's behaviour is changed, i do not know why, the app is the same. Some other phone has not this problem by i can't get now to see what android they have ...
If you can't give me some advice, I'll investigate further, but if in the meantime someone already had the solution to the problem... that's why I wrote.
Troubleshooting
These items may solve your problem. Please check those you've done by changing - [ ] to - [X]
Detailed Description
Hi, I have a problem on an android cell where I run pydroid with pysimplegui. This is the second time this has happened to me, because it had already happened to me on another cell phone. So: the mobile phone is connected to a barcode reader. When I fire the barcode, and I'm in an edit field, clearly the read code was inserted immediately (the barcode is in keyboard emulation, connected via bluetooth). The barcode does not give any errors: if I run it into any text editor, it transcribes the barcode.
Now, I launch the program on Android and I see a pysimplegui window, with the cursor flashing inside an edit field, until recently it didn't cause problems. If I fired, it immediately inserted into the edit field. Now, however, if I shoot, nothing happens. Only if with my real finger I click inside the edit field and the Android virtual keyboard is shown, then from that moment on, by shooting in the reader the barcode is inserted into the edit. It therefore seems that the first time I launch the window, even though the edit field is in focus, Android doesn't feel that focus until I click in it with my finger. It's a problem because the warehouse workers don't understand what's happening, they hear the reader beeping, but they don't enter the code. Unfortunately, the warehouses often have staff who come and go and so it is problematic that even though the cursor flashing inside the edi field is there, when shooting it doesn't read anything... has anyone had the same problem? How can it be solved? I've tried various things at the android level, but I can't get past it. If you focus on an edit field, Android should feel like the edit field has been clicked, or not? Why didn't this happen a while ago? Maybe it's a problem on Android versions? cell phones are quite recent.
Code To Duplicate
A simple form with one edit field get the issue ... i think it is not necessary to paste code ...
Again, i will do more tests... but is not so easy o go to customers ....so if you can help me the same, i appreciate ... other wise, i will do more tests by miself ...
Screenshot, Sketch, or Drawing
Watcha Makin?
Well, I have done a 3D autoprinted case to contain 1) an android phone 2) and a HID barcode connected via bluetooth. With pydroid and PSG - what a powerful couple !! - , I now have the most powerful app to read barcode in the world ... i am joking, but the intergration with my ERP is fanatstic ... but i had this issue recently ... unfortunately warehouse workers are often a category of demanding users: either things work perfectly, or they don't use them at all...
The text was updated successfully, but these errors were encountered: