How do I press alphabet key from keyboard while running Appium tests? I am using Java

How do I press alphabet key from keyboard while running Appium tests? I am using Java.

Hi Miro,

You can press the alphabet key using the below command:

driver.pressKey(new KeyEvent(AndroidKey.S)); // 's'
driver.pressKey(new KeyEvent(AndroidKey.R)); //'r'