How to send “Enter” key with legacy script or Javascript

Solved
R
rathasatekun
Gosoft (Thailand) Co.,Ltd.

I have case for open App and execute App by

start app and then send enter key  for execute application

but I have not found script to do that ,

please advise me for this case

a year ago
Android
ANSWERS
ZC
Zafer Cigdem
a year ago

Hi,

Your questions should be answer by Raymond already. Just to add a point here; depending on the app and where you are you may also need to click on Tab or such, so you can find the list of the injection key events here: KeyEvent  |  Android Developers

MobiControl JS souce: Namespace: device | Android Agent JavaScript (soti.net)

Examples:

mobicontrol.device.injectKey(24); // press the VOLUME UP key
mobicontrol.device.injectKey(66); // press the ENTER key
Solution
RC
Raymond Chan Diamond Contributor
a year ago

Javascript :

     mobicontrol.device.injectKey(66); // press the ENTER key

A
AKMOD@SOTI
a year ago

Hi rathasatekun,

Thanks for posting on SOTI Pulse, Thanks  Raymond and Zafer for responding to the post, your expertise and willingness to help are greatly appreciated!

Have you had an opportunity to test the suggested solutions by Raymond and Zafer , and has it successfully addressed your query?

If not, or If you have any additional questions or concerns, please don't hesitate to reach out. We're dedicated to providing assistance and support.