Open Inventor Reference
SoKeyboardEvent Class Reference

several windows headers define DELETE More...

#include <Inventor/events/SoKeyboardEvent.h>

Inheritance diagram for SoKeyboardEvent:
SoButtonEvent SoEvent

List of all members.

Public Types

enum  Key {
  ANY = 0, LEFT_SHIFT = 0xffe1, RIGHT_SHIFT = 0xffe2, LEFT_CONTROL = 0xffe3,
  RIGHT_CONTROL = 0xffe4, LEFT_ALT = 0xffe9, RIGHT_ALT = 0xffea, NUMBER_0 = 0x030,
  NUMBER_1 = 0x031, NUMBER_2 = 0x032, NUMBER_3 = 0x033, NUMBER_4 = 0x034,
  NUMBER_5 = 0x035, NUMBER_6 = 0x036, NUMBER_7 = 0x037, NUMBER_8 = 0x038,
  NUMBER_9 = 0x039, A = 0x061, B = 0x062, C = 0x063,
  D = 0x064, E = 0x065, F = 0x066, G = 0x067,
  H = 0x068, I = 0x069, J = 0x06a, K = 0x06b,
  L = 0x06c, M = 0x06d, N = 0x06e, O = 0x06f,
  P = 0x070, Q = 0x071, R = 0x072, S = 0x073,
  T = 0x074, U = 0x075, V = 0x076, W = 0x077,
  X = 0x078, Y = 0x079, Z = 0x07a, HOME = 0xff50,
  LEFT_ARROW = 0xff51, UP_ARROW = 0xff52, RIGHT_ARROW = 0xff53, DOWN_ARROW = 0xff54,
  PAGE_UP = 0xff55, PAGE_DOWN = 0xff56, PRIOR = 0xff55, NEXT = 0xff56,
  END = 0xff57, PAD_ENTER = 0xff8d, PAD_F1 = 0xff91, PAD_F2 = 0xff92,
  PAD_F3 = 0xff93, PAD_F4 = 0xff94, PAD_0 = 0xff9e, PAD_1 = 0xff9c,
  PAD_2 = 0xff99, PAD_3 = 0xff9b, PAD_4 = 0xff96, PAD_5 = 0xff9d,
  PAD_6 = 0xff98, PAD_7 = 0xff95, PAD_8 = 0xff97, PAD_9 = 0xff9a,
  PAD_ADD = 0xffab, PAD_SUBTRACT = 0xffad, PAD_MULTIPLY = 0xffaa, PAD_DIVIDE = 0xffaf,
  PAD_SPACE = 0xff8d, PAD_TAB = 0xff89, PAD_INSERT = 0xff9e, PAD_DELETE = 0xff9f,
  PAD_PERIOD = 0xff9f, F1 = 0xffbe, F2 = 0xffbf, F3 = 0xffc0,
  F4 = 0xffc1, F5 = 0xffc2, F6 = 0xffc3, F7 = 0xffc4,
  F8 = 0xffc5, F9 = 0xffc6, F10 = 0xffc7, F11 = 0xffc8,
  F12 = 0xffc9, BACKSPACE = 0xff08, TAB = 0xff09, RETURN = 0xff0d,
  ENTER = 0xff0d, PAUSE = 0xff13, SCROLL_LOCK = 0xff14, ESCAPE = 0xff1b,
  DELETE = 0xffff, KEY_DELETE = DELETE, PRINT = 0xff61, INSERT = 0xff63,
  NUM_LOCK = 0xff7f, CAPS_LOCK = 0xffe5, SHIFT_LOCK = 0xffe6, SPACE = 0x020,
  APOSTROPHE = 0x027, COMMA = 0x02c, MINUS = 0x02d, PERIOD = 0x02e,
  SLASH = 0x02f, SEMICOLON = 0x03b, EQUAL = 0x03d, BRACKETLEFT = 0x05b,
  BACKSLASH = 0x05c, BRACKETRIGHT = 0x05d, GRAVE = 0x060
}
 the keyboard keys... More...

Public Member Functions

 SoKeyboardEvent ()
 Constructor.
virtual ~SoKeyboardEvent ()
void setKey (SoKeyboardEvent::Key whichKey)
 set/get which key generated the event (e.g. SoKeyboardEvent::A)
SoKeyboardEvent::Key getKey () const
char getPrintableCharacter () const
 Convenience routine that returns the character representing the key, if it's printable.

Static Public Member Functions

static SbBool isKeyPressEvent (const SoEvent *e, SoKeyboardEvent::Key whichKey)
 convenience routines to see if an SoEvent is a press or release of the passed keyboard key
static SbBool isKeyReleaseEvent (const SoEvent *e, SoKeyboardEvent::Key whichKey)
static void initClass ()
 Initializes base event class.

Detailed Description

Keyboard key press and release events.

SoKeyboardEvent represents keyboard key press and release events in the Inventor event model.

See Also
SoEvent, SoButtonEvent, SoLocation2Event, SoMotion3Event, SoMouseButtonEvent, SoSpaceballButtonEvent, SoHandleEventAction, SoEventCallback, SoSelection, SoInteraction

Definition at line 92 of file SoKeyboardEvent.h.


Member Enumeration Documentation

Enumerator:
ANY 

Special constant for any key.

LEFT_SHIFT 

Modifiers.

RIGHT_SHIFT 
LEFT_CONTROL 
RIGHT_CONTROL 
LEFT_ALT 
RIGHT_ALT 
NUMBER_0 

Numbers.

NUMBER_1 
NUMBER_2 
NUMBER_3 
NUMBER_4 
NUMBER_5 
NUMBER_6 
NUMBER_7 
NUMBER_8 
NUMBER_9 
A 

Letters.

B 
C 
D 
E 
F 
G 
H 
I 
J 
K 
L 
M 
N 
O 
P 
Q 
R 
S 
T 
U 
V 
W 
X 
Y 
Z 
HOME 

Cursor control & motion.

LEFT_ARROW 
UP_ARROW 
RIGHT_ARROW 
DOWN_ARROW 
PAGE_UP 
PAGE_DOWN 
PRIOR 
NEXT 
END 
PAD_ENTER 

Keypad Functions.

PAD_F1 
PAD_F2 
PAD_F3 
PAD_F4 
PAD_0 
PAD_1 
PAD_2 
PAD_3 
PAD_4 
PAD_5 
PAD_6 
PAD_7 
PAD_8 
PAD_9 
PAD_ADD 
PAD_SUBTRACT 
PAD_MULTIPLY 
PAD_DIVIDE 
PAD_SPACE 
PAD_TAB 
PAD_INSERT 
PAD_DELETE 
PAD_PERIOD 
F1 

Function keys.

F2 
F3 
F4 
F5 
F6 
F7 
F8 
F9 
F10 
F11 
F12 
BACKSPACE 

Misc Functions.

TAB 
RETURN 
ENTER 
PAUSE 
SCROLL_LOCK 
ESCAPE 
DELETE 
KEY_DELETE 

Several Windows headers define DELETE, better to use a different name Also added for TGS Open Inventor compatibility.

PRINT 
INSERT 
NUM_LOCK 
CAPS_LOCK 
SHIFT_LOCK 
SPACE 
APOSTROPHE 
COMMA 
MINUS 
PERIOD 
SLASH 
SEMICOLON 
EQUAL 
BRACKETLEFT 
BACKSLASH 
BRACKETRIGHT 
GRAVE 

Definition at line 99 of file SoKeyboardEvent.h.


Constructor & Destructor Documentation

SoKeyboardEvent::SoKeyboardEvent ( )
virtual SoKeyboardEvent::~SoKeyboardEvent ( ) [virtual]

Member Function Documentation

SoKeyboardEvent::Key SoKeyboardEvent::getKey ( ) const [inline]

Definition at line 259 of file SoKeyboardEvent.h.

char SoKeyboardEvent::getPrintableCharacter ( ) const

If not, this returns NULL ('\0').

static void SoKeyboardEvent::initClass ( ) [static]

Reimplemented from SoButtonEvent.

static SbBool SoKeyboardEvent::isKeyPressEvent ( const SoEvent e,
SoKeyboardEvent::Key  whichKey 
) [static]
static SbBool SoKeyboardEvent::isKeyReleaseEvent ( const SoEvent e,
SoKeyboardEvent::Key  whichKey 
) [static]
void SoKeyboardEvent::setKey ( SoKeyboardEvent::Key  whichKey) [inline]

Definition at line 258 of file SoKeyboardEvent.h.


The documentation for this class was generated from the following file: