This documentation is archived and is not being maintained.

Keyboard Members

Represents the keyboard device.

The Keyboard type exposes the following members.

  NameDescription
Public method Static member AddGotKeyboardFocusHandler Adds a handler for the Keyboard.GotKeyboardFocus attached event.
Public method Static member AddKeyDownHandler Adds a handler for the Keyboard.KeyDown attached event.
Public method Static member AddKeyUpHandler Adds a handler for the Keyboard.KeyUp attached event.
Public method Static member AddLostKeyboardFocusHandler Adds a handler for the Keyboard.LostKeyboardFocus attached event.
Public method Static member AddPreviewGotKeyboardFocusHandler Adds a handler for the Keyboard.PreviewGotKeyboardFocus attached event.
Public method Static member AddPreviewKeyDownHandler Adds a handler for the Keyboard.PreviewKeyDown attached event.
Public method Static member AddPreviewKeyUpHandler Adds a handler for the Keyboard.PreviewKeyUp attached event.
Public method Static member AddPreviewLostKeyboardFocusHandler Adds a handler for the Keyboard.PreviewLostKeyboardFocus attached event.
Public method Static member Focus Sets keyboard focus on the specified element.
Public method Static member GetKeyStates Gets the set of key states for the specified key.
Public method Static member IsKeyDown Determines whether the specified key is pressed.
Public method Static member IsKeyToggled Determines whether the specified key is toggled.
Public method Static member IsKeyUp Determines whether the specified key is released.
Public method Static member RemoveGotKeyboardFocusHandler Removes a handler for the Keyboard.GotKeyboardFocus attached event.
Public method Static member RemoveKeyDownHandler Removes a handler for the Keyboard.KeyDown attached event.
Public method Static member RemoveKeyUpHandler Removes a handler for the Keyboard.KeyUp attached event.
Public method Static member RemoveLostKeyboardFocusHandler Removes a handler for the Keyboard.LostKeyboardFocus attached event.
Public method Static member RemovePreviewGotKeyboardFocusHandler Removes a handler for the Keyboard.PreviewGotKeyboardFocus attached event.
Public method Static member RemovePreviewKeyDownHandler Removes a handler for the Keyboard.PreviewKeyDown attached event.
Public method Static member RemovePreviewKeyUpHandler Removes a handler for the Keyboard.PreviewKeyUp attached event.
Public method Static member RemovePreviewLostKeyboardFocusHandler Removes a handler for the Keyboard.PreviewLostKeyboardFocus attached event.
Top

  NameDescription
Public field Static member GotKeyboardFocusEvent Identifies the Keyboard.GotKeyboardFocus attached event.
Public field Static member KeyDownEvent Identifies the Keyboard.KeyDown attached event.
Public field Static member KeyUpEvent Identifies the Keyboard.KeyUp attached event.
Public field Static member LostKeyboardFocusEvent Identifies the Keyboard.LostKeyboardFocus attached event.
Public field Static member PreviewGotKeyboardFocusEvent Identifies the Keyboard.PreviewGotKeyboardFocus attached event.
Public field Static member PreviewKeyDownEvent Identifies the Keyboard.PreviewKeyDown attached event.
Public field Static member PreviewKeyUpEvent Identifies the Keyboard.PreviewKeyUp attached event.
Public field Static member PreviewLostKeyboardFocusEvent Identifies the Keyboard.PreviewLostKeyboardFocus attached event.
Top

  NameDescription
Public property Static member FocusedElement Gets the element that has keyboard focus.
Public property Static member Modifiers Gets the set of ModifierKeys that are currently pressed.
Public property Static member PrimaryDevice Gets the primary keyboard input device.
Top

  NameDescription
Public attached event GotKeyboardFocus Occurs when an element receives keyboard focus.
Public attached event KeyDown Occurs when a key on the keyboard is pressed.
Public attached event KeyUp Occurs when a key on the keyboard is released.
Public attached event LostKeyboardFocus Occurs when an element loses keyboard focus.
Public attached event PreviewGotKeyboardFocus Occurs when an element is in the process of acquiring keyboard focus.
Public attached event PreviewKeyDown Occurs when a key on the keyboard is pressed.
Public attached event PreviewKeyUp Occurs when a key on the keyboard is released.
Public attached event PreviewLostKeyboardFocus Occurs when an element is in the process of losing keyboard focus.
Top
Show: