KeyboardDevice Class

 

Abstract class that represents a keyboard device.

Namespace:   System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)


public abstract class KeyboardDevice : InputDevice

NameDescription
System_CAPS_protmethodKeyboardDevice(InputManager)

Initializes a new instance of the KeyboardDevice class.

NameDescription
System_CAPS_pubpropertyActiveSource

Gets the PresentationSource that is reporting input for this device. (Overrides InputDevice.ActiveSource.)

System_CAPS_pubpropertyDefaultRestoreFocusMode

Gets or sets the behavior of Windows Presentation Foundation (WPF) when restoring focus.

System_CAPS_pubpropertyDispatcher

Gets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject.)

System_CAPS_pubpropertyFocusedElement

Gets the element that has keyboard focus.

System_CAPS_pubpropertyModifiers

Gets the set of ModifierKeys which are currently pressed.

System_CAPS_pubpropertyTarget

Gets the specified IInputElement that input from this device is sent to. (Overrides InputDevice.Target.)

NameDescription
System_CAPS_pubmethodCheckAccess()

Determines whether the calling thread has access to this DispatcherObject.(Inherited from DispatcherObject.)

System_CAPS_pubmethodClearFocus()

Clears focus.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodFocus(IInputElement)

Sets keyboard focus on the specified IInputElement.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetKeyStates(Key)

Gets the set of key states for the specified Key.

System_CAPS_protmethodGetKeyStatesFromSystem(Key)

When overridden in a derived class, obtains the KeyStates for the specified Key.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodIsKeyDown(Key)

Determines whether the specified Key is in the down state.

System_CAPS_pubmethodIsKeyToggled(Key)

Determines whether the specified Key is in the toggled state.

System_CAPS_pubmethodIsKeyUp(Key)

Determines whether the specified Key is in the up state.

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodVerifyAccess()

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.

.NET Framework
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.

Return to top
Show: