KeyboardDevice Class
Abstract class that represents a keyboard device.
Assembly: PresentationCore (in PresentationCore.dll)
System.Windows.Threading::DispatcherObject
System.Windows.Input::InputDevice
System.Windows.Input::KeyboardDevice
| Name | Description | |
|---|---|---|
![]() | KeyboardDevice(InputManager^) | Initializes a new instance of the KeyboardDevice class. |
| Name | Description | |
|---|---|---|
![]() | ActiveSource | Gets the PresentationSource that is reporting input for this device. (Overrides InputDevice::ActiveSource.) |
![]() | DefaultRestoreFocusMode | Gets or sets the behavior of Windows Presentation Foundation (WPF) when restoring focus. |
![]() | Dispatcher | Gets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject.) |
![]() | FocusedElement | Gets the element that has keyboard focus. |
![]() | Modifiers | Gets the set of ModifierKeys which are currently pressed. |
![]() | Target | Gets the specified IInputElement that input from this device is sent to. (Overrides InputDevice::Target.) |
| Name | Description | |
|---|---|---|
![]() | CheckAccess() | Determines whether the calling thread has access to this DispatcherObject.(Inherited from DispatcherObject.) |
![]() | ClearFocus() | Clears focus. |
![]() | Equals(Object^) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.) |
![]() | Focus(IInputElement^) | Sets keyboard focus on the specified IInputElement. |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetKeyStates(Key) | Gets the set of key states for the specified Key. |
![]() | GetKeyStatesFromSystem(Key) | |
![]() | GetType() | |
![]() | IsKeyDown(Key) | Determines whether the specified Key is in the down state. |
![]() | IsKeyToggled(Key) | Determines whether the specified Key is in the toggled state. |
![]() | IsKeyUp(Key) | Determines whether the specified Key is in the up state. |
![]() | MemberwiseClone() | |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
![]() | VerifyAccess() | Enforces that the calling thread has access to this DispatcherObject.(Inherited from DispatcherObject.) |
The KeyboardDevice supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.
For keyboard related input, use the Keyboard class. The Keyboard class represents the keyboard to an application and provides methods, properties, and events that reflect the state of the keyboard.
The Keyboard class delegates to the appropriate KeyboardDevice.
Each InputDevice object represents one particular input device. For example, if there are two mice, there will be two InputDevice objects.
Available since 3.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


