python-for-android icon indicating copy to clipboard operation
python-for-android copied to clipboard

Bug in the keyboard event listener

Open Neizvestnyj opened this issue 5 years ago • 4 comments

  • Python: 3.8
  • OS: android
  • Kivy: 2.0.0, master
  • Cython: 0.29.19
  • OpenJDK: 8

When I click on the input field, the event handler that is declared in the init method stops working (events like 'back') , but if I switching focus away from the whole app, then back again, the handler starts working until I click on the text field again.

All this I tested with: api: 27, 28, 29, 30 ndk: 19b, 19c, 20b, 21e p4a branch: develop, master, release-2019.06.06, release-2020.06.02

p4a.bootstrap = sdl2 android.arch = armeabi-v7a, arm64-v8a

Code: https://pastebin.com/RJH6abdG

https://user-images.githubusercontent.com/40869738/108220548-e562b480-7147-11eb-97c9-211828d2bffd.mp4

Neizvestnyj avatar Feb 17 '21 15:02 Neizvestnyj

Well you didn't get an answer there https://github.com/kivy/kivy/issues/7374 So I suppose it doesn't hurt to try here ;)

However I think nobody understands what is going on as shown by:

https://github.com/kivy/python-for-android/issues/1903 https://github.com/kivy/kivy/issues/6686 https://github.com/spesmilo/electrum/issues/6276 https://github.com/kivy/kivy/issues/7375

RobertFlatt avatar Feb 18 '21 03:02 RobertFlatt

@RobertFlatt Yes, most likely the problem is with p4a, or rather with sdl, and the bug is old, and not related to Google, they are doing well

Neizvestnyj avatar Feb 18 '21 09:02 Neizvestnyj

Months later, I think this may be due to the event listener not returning a boolean, https://github.com/kivy/python-for-android/blob/develop/doc/source/apis.rst#handling-the-back-button

RobertFlatt avatar Jun 02 '21 02:06 RobertFlatt

Months later, I think this may be due to the event listener not returning a boolean, https://github.com/kivy/python-for-android/blob/develop/doc/source/apis.rst#handling-the-back-button

For my example, this did not solve the problem. But now suggestions works (It's still broken, but at least something). requirements = kivy==master p4a.branch = develop

Neizvestnyj avatar Jun 02 '21 11:06 Neizvestnyj

Hi everyone, has this bug been fixed yet?

Neizvestnyj avatar Oct 29 '22 08:10 Neizvestnyj

Fixed in kivy==master (2.2.0dev0)

Neizvestnyj avatar Jan 07 '23 19:01 Neizvestnyj