You can use something like this:
sendKeys(KeyEvent.KEYCODE_ALT_LEFT, KeyEvent.KEYCODE_9,
KeyEvent.KEYCODE_ALT_LEFT, KeyEvent.KEYCODE_0);
assertEquals("()", mTV.getText().toString());
On Apr 25, 2:38 am, Rui <[email protected]> wrote:
> Hello,
>
> I am trying to test my application with
> ActivityInstrumentationTestCase2. My application is for a specific
> hardware, which has a hardware keyboard including ctrl and alt key,
> and has functions which are fired by combination keys, e.g., Ctrl +
> BackSpace, Ctrl + C, Ctrl + Right, and etc.
>
> Does anybody know how to send these combination keys to Android
> applications?
>
> Thank you for advance.
> -Rui
--
Have you read my blog ?
http://dtmilano.blogspot.com
android junit tests ui linux cult thin clients
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en