Use uiautomator pressKeyCode

The adb solution doesn't wait until the key has finished which causes problems
in tests. uiautomator's built in pressKeyCode is much better.