Share this page

# PressKey Method (IKeyboardDevice)

Presses the specified key. This method has multiple overloads.

In this topic:

## PressKey Method (Byte)

Presses the specified key using a keyboard scan code.

Remarks

Supports scan code set 1, such as the list shown at: http://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html.

C# Syntax

                            public void PressKey(
       byte keyScanCode
    )

Parameters

keyScanCode
  The keyboard scan code of the key.

## PressKey Method (Keys)

Presses the specified key using a keyboard virtual key.

C# Syntax

                            public void PressKey(
       Keyboard.Keys key
    )

Parameters

key
  The keyboard code of the key.Possible values: Keyboard.Keys

Tips to improve your search results... UFT Developer .NET SDK Reference Version 15.0-15.0.2 UFT Developer SDK Reference All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: