Click or drag to resize
Ranorex

Keyboard Class

Provides keyboard actions and events.
Inheritance Hierarchy
SystemObject
  RanorexKeyboard

Namespace:  Ranorex
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
public class Keyboard

The Keyboard type exposes the following members.

Constructors
  NameDescription
Public methodKeyboard
Initializes a new instance of the Keyboard class
Top
Properties
  NameDescription
Public propertyStatic memberAbortKey
Gets or sets a key-modifier combination that aborts the current thread if pressed.
Public propertyStatic memberCharacterMappingEnabled
Gets or sets a value whether Unicode characters are tried to be mapped to virtual keyboard inputs.
Public propertyStatic memberDefaultKeyPressTime
Gets or sets the default time for a key press, i.e. the time elapsed between a key being pressed (KeyDown event) and released (KeyUp event) again.
Public propertyStatic memberEnabled
Gets or sets a value indicating whether physical keyboard actions are enabled.
Public propertyStatic memberPauseKey
Gets or sets a key-modifier combination that pauses or resumes the current test execution if pressed.
Top
Methods
  NameDescription
Public methodStatic memberDown(Char)
Sets the state of the key associated with the specified character to pressed/down.
Public methodStatic memberDown(Keys)
Sets the state of the specified key to pressed/down.
Public methodStatic memberDown(Char, Boolean)
Sets the state of the key associated with the specified character to pressed/down.
Public methodStatic memberDown(Keys, Int32, Boolean)
Sets the state of the specified key to pressed/down.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodStatic memberEscapeSequence
Replaces escape characters in sequence by their escaped representation to be used with the Press(String) method.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodStatic memberGetSequenceFromKeyEvents(IListKeyValuePairKeyEventArgs, Boolean)
Gets a string that can be passed to Press(String) from a list of key events.
Public methodStatic memberGetSequenceFromKeyEvents(IListKeyValuePairKeyEventArgs, Boolean, Int32)
Gets a string that can be passed to Press(String) from a list of key events.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberPrepareFocus
Tries to set the focus to the specified element if necessary and also tries to make the element visible (if EnsureVisible is specified).
Public methodStatic memberPress(Char)
Presses the key associated with the specified character and releases it again.
Public methodStatic memberPress(String)
Presses the keys specified by sequence.
Public methodStatic memberPress(Keys)
Presses the specified key and releases it again.
Public methodStatic memberPress(Char, Duration)
Presses the key associated with the specified character and releases it again after the specified time.
Public methodStatic memberPress(Char, Boolean)
Presses the key associated with the specified character and releases it again.
Public methodStatic memberPress(String, Duration)
Presses the keys specified by sequence.
Public methodStatic memberPress(Keys, Duration)
Presses the specified key and releases it again after the specified time.
Public methodStatic memberPress(Element, String)
Presses the keys specified by sequence.
Public methodStatic memberPress(Char, Duration, Boolean)
Presses the key associated with the specified character and releases it again after the specified time.
Public methodStatic memberPress(Char, Duration, Int32)
Presses and releases the key associated with the specified character for the specified number of times.
Public methodStatic memberPress(Keys, Duration, Int32)
Presses and releases the specified key for the specified number of times.
Public methodStatic memberPress(Element, String, Duration)
Presses the keys specified by sequence.
Public methodStatic memberPress(Char, Duration, Int32, Boolean)
Presses and releases the key associated with the specified character for the specified number of times.
Public methodStatic memberPress(Keys, Int32, Duration, Int32, Boolean)
Presses and releases the specified key for the specified number of times.
Public methodStatic memberSet(Char, Boolean)
Sets the state of the key associated with the specified character to either pressed/down or released/up.
Public methodStatic memberSet(Keys, Boolean)
Sets the state of the specified key to either pressed/down or released/up.
Public methodStatic memberSet(Char, Boolean, Boolean)
Sets the state of the key associated with the specified character to either pressed/down or released/up.
Public methodStatic memberSet(Keys, Int32, Boolean, Boolean)
Sets the state of the specified key to either pressed/down or released/up.
Public methodStatic memberToKey
Converts the specified string representation (see ToString(Keys)) to a Keys value.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodStatic memberToString(Keys)
Returns a string representation of the specified key.
Public methodStatic memberUp(Char)
Sets the state of the key associated with the specified character to released/up.
Public methodStatic memberUp(Keys)
Sets the state of the specified key to released/up.
Public methodStatic memberUp(Char, Boolean)
Sets the state of the key associated with the specified character to released/up.
Public methodStatic memberUp(Keys, Int32, Boolean)
Sets the state of the specified key to released/up.
Top
Events
  NameDescription
Public eventStatic memberKeyDown
Occurs when a key is pressed or hold down.
Public eventStatic memberKeyUp
Occurs when a key is released.
Top
Fields
  NameDescription
Public fieldStatic memberDefaultScanCode
Specify this value if you want to use the default hardware scan code corresponding to a specified virtual key code (see Keys).
Top
See Also