Keys Method (Mobile Objects)

Applies to TestComplete 15.64, last modified on June 12, 2024


Types text in the active application and object on the connected mobile device.



TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
Keys [in]    Required    String    
Result None

Applies To

View Mode

To view this method in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.


The method has the following parameter:


The text to type. It can include special keys from the following table:

Code Simulated Key
^ Ctrl
! Shift
~ Alt
^^ ^
!! !
~~ ~
[[ [
[Apps] App switch key
[BS] Backspace
[Clear] Clear
[Del] Delete
[Down] Down
[End] End
[Enter] Enter
[Esc] Back
[F1] F1
[F2] F2
[F3] F3
[F4] F4
[F5] F5
[F6] F6
[F7] F7
[F8] F8
[F9] F9
[F10] F10
[F11] F11
[F12] F12
Code Simulated Key
[Home] Home
[Ins] Insert
[Left] Left
[NumAsterisk] Num * (* on the numeric keyboard)
[NumMinus] Num - (- on the numeric keyboard)
[NumPlus] Num + (+ on the numeric keyboard)
[NumSlash] Num / (/ on the numeric keyboard)
[PageDown] Page Down
[PageUp] Page Up
[Pause] Pause
[Right] Right
[Tab] Tab
[Up] Up
[Win] Home key
[Pnnn] Pauses typing for nnn milliseconds.
All constants (F1, PageDown, X, P, etc.) are case-sensitive.

Result Value



  • On Android devices, the Device.Keys method only supports Latin characters.

    The Element.Keys method also supports only Latin characters by default. To enable the Element.Keys method to support other character sets, use the unicodeKeyboard and resetKeyboard capabilities when opening a testing session on your Android device.

  • On iOS devices, the Keys method may fail to simulate pressing special keys, like SHIFT, CTRL, ALT, or Backspace.

See Also

About Mobile Tests

Highlight search results