SOXTKEYBOARD(3iv)

πŸ’– SoXtKeyboard(3IV) β€” the keyboard girlie of the Inventor Xt world

okay bestie, welcome to SoXtKeyboard(3IV). That's the page name plus the manual section, and yes we're doing this together, no cap. Grab a snack, we're reading a manpage πŸ“


🌸 NAME

SoXtKeyboard β€” translates and reports events for the keyboard. That's the whole job description. She listens to keys, she tells you what happened. Iconic behavior, honestly πŸ’…

πŸ¦‹ INHERITS FROM

SoXtDevice > SoXtKeyboard

So she's a SoXtDevice, but specifically the keyboard one. Inheritance chain ate, as always ✨

✨ 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

okay so this class manages events generated by the keyboard, and that includes key press and release events β€” aka SoKeyboardEvent. That's the whole thing. She catches the keys, she reports the keys. main character energy fr fr πŸŽ€

🧚 METHODS

          SoXtKeyboard(EventMask mask =
               SO_XT_ALL_KEYBOARD_EVENTS)
          ~SoXtKeyboard()

Constructor and destructor, the classic duo 🫢

To the constructor you pass which keyboard events you are interested in, as a bitwise OR of these values:

  • KeyPressMask β€” Key press events
  • KeyReleaseMask β€” Key release events

Or you can just pass the defined value SO_XT_ALL_KEYBOARD_EVENTS if you want all keyboard events, because why choose πŸ’β€β™€οΈ

heads up bestie: the device will only report events of this type for the widget it is enabled on. So whatever mask you hand over is the vibe check she's running, periodt.

🌈 SEE ALSO

SoXtDevice, SoKeyboardEvent β€” go read those too, they're the extended universe, iykyk πŸ“šβœ¨


and that's the page! this one signs off as SoXtKeyboard(3IV)() β€” the same title stamped at the bottom, with the source/version and date slots sitting there empty, like a girl who left the party without saying bye πŸ˜­πŸ’– go forth and handle your key events, bestie, you're gonna slay πŸ”₯πŸ‘‘