AndroidViewClient
AndroidViewClient copied to clipboard
time.sleep() on KeyEvents
I noticed that sometime the KeyEvents (like KEYCODE_MENU) are too fast so it don't work when you use two of them in a row. May be it would be a good idea too add a time.sleep(0.5) before and after all of them so that user don't have to write it each time?
Having a time.sleep()
call may be undesirable to some users for all KeyEvents. Myself, I prefer to choose the amount of time slept on a per script basis. Perhaps an optional argument (defaulting to 0 for backwards compatibility) for KeyEvents to specify the amount of time to sleep would be appropriate?
Yes this would work.
About that just a little question, is there a way to send the "next" key? (the one on the bottom right corner, it's the same action as "KEYCODE_ENTER" or "KEYCODE_TAB" but not always) I tried ACTION_DOWN, ACTION_UP and even FLAG_EDITOR_ACTION but it doesn't work.