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 the PS/2 Keyboard scan code set 1.

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... OpenText™ Functional Testing for Developers .NET SDK Version: 25.2 OpenText™ Functional Testing for Developers SDK 25.2 All View Local Help Center View Online Help Center Version: