How to simulate enter button keyboard

On Android, you can interact with the keyboard through:

AndroidDriver<?> driver = MobileDriverFactory.getDriver()
driver.pressKeyCode(AndroidKeyCode.ENTER)

Where AndroidKeyCode is an enum with all of the possible key entries.