---
name: "SoXtKeyboard"
section: "3iv"
platform: "linux"
package: "inventor-doc"
version: "2.1.6+ds-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SoXtKeyboard"
---

# SoXtKeyboard(3iv)

translates and reports events for the keyboard

## NAME

SoXtKeyboard — translates and reports events for the keyboard

## INHERITS FROM

SoXtDevice \> SoXtKeyboard

## SYNOPSIS

**#include \<Inventor/Xt/devices/SoXtKeyboard.h\>**

**#define SO\_XT\_ALL\_KEYBOARD\_EVENTS (KeyPressMask \| KeyReleaseMask)**

Methods from class SoXtKeyboard:

	**SoXtKeyboard(EventMask mask = SO\_XT\_ALL\_KEYBOARD\_EVENTS)**\
 	**~SoXtKeyboard()**

Methods from class SoXtDevice:

**virtual void**	**enable(Widget w, XtEventHandler f, XtPointer data, Window win = NULL)**\
 **virtual void**	**disable(Widget w, XtEventHandler f, XtPointer data)**\
 **virtual const SoEvent \***	**translateEvent(XAnyEvent \*xevent)**\
 **void**	**setWindowSize(const SbVec2s &size)**\
 **const SbVec2s &**	**getWindowSize() const**

## DESCRIPTION

**This class manages events generated by the keyboard, including key press and release events (SoKeyboardEvent**).

## METHODS

	**SoXtKeyboard(EventMask mask = SO\_XT\_ALL\_KEYBOARD\_EVENTS)**\
 	**~SoXtKeyboard()**\
 Constructor and destructor. To the constructor, pass which keyboard events you are interested in as a bitwise OR of the following values:

KeyPressMask — Key press events

KeyReleaseMask — Key release events

Or simply pass the defined value SO\_XT\_ALL\_KEYBOARD\_EVENTS for all keyboard events. The device will only report events of this type for the widget it is enabled on.

## SEE ALSO

**SoXtDevice, SoKeyboardEvent**
