KeyboardDevice.IsKeyDown(Key) Method

Definition

Determines whether the specified Key is in the down state.

public:
 bool IsKeyDown(System::Windows::Input::Key key);
public bool IsKeyDown (System.Windows.Input.Key key);
member this.IsKeyDown : System.Windows.Input.Key -> bool
Public Function IsKeyDown (key As Key) As Boolean

Parameters

key
Key

The key to check.

Returns

true if key is in the down state; otherwise, false.

Exceptions

key is not a valid key.

Applies to