1SoKeyboardEvent(3IV)()                                  SoKeyboardEvent(3IV)()
2
3
4

NAME

6       SoKeyboardEvent — keyboard key press and release events
7

INHERITS FROM

9       SoEvent > SoButtonEvent > SoKeyboardEvent
10

SYNOPSIS

12       #include <Inventor/events/SoKeyboardEvent.h>
13
14       #define SO_KEY_PRESS_EVENT(EVENT,KEY)
15             (SoKeyboardEvent::isKeyPressEvent(EVENT,SoKeyboardEvent::KEY))
16       #define SO_KEY_RELEASE_EVENT(EVENT,KEY)
17             (SoKeyboardEvent::isKeyReleaseEvent(EVENT,SoKeyboardEvent::KEY))
18
19     enum Key {
20          SoKeyboardEvent::ANY         Special constant for any key
21          SoKeyboardEvent::LEFT_SHIFT  Modifiers
22          SoKeyboardEvent::RIGHT_SHIFT
23          SoKeyboardEvent::LEFT_CONTROL
24
25          SoKeyboardEvent::RIGHT_CONTROL
26
27          SoKeyboardEvent::LEFT_ALT
28          SoKeyboardEvent::RIGHT_ALT
29          SoKeyboardEvent::NUMBER_0    Numbers
30          SoKeyboardEvent::NUMBER_1
31          SoKeyboardEvent::NUMBER_2
32          SoKeyboardEvent::NUMBER_3
33          SoKeyboardEvent::NUMBER_4
34          SoKeyboardEvent::NUMBER_5
35          SoKeyboardEvent::NUMBER_6
36          SoKeyboardEvent::NUMBER_7
37          SoKeyboardEvent::NUMBER_8
38          SoKeyboardEvent::NUMBER_9
39          SoKeyboardEvent::A           Letters
40          SoKeyboardEvent::B
41          SoKeyboardEvent::C
42          SoKeyboardEvent::D
43          SoKeyboardEvent::E
44          SoKeyboardEvent::F
45          SoKeyboardEvent::G
46          SoKeyboardEvent::H
47          SoKeyboardEvent::I
48          SoKeyboardEvent::J
49          SoKeyboardEvent::K
50          SoKeyboardEvent::L
51          SoKeyboardEvent::M
52          SoKeyboardEvent::N
53          SoKeyboardEvent::O
54          SoKeyboardEvent::P
55          SoKeyboardEvent::Q
56          SoKeyboardEvent::R
57          SoKeyboardEvent::S
58          SoKeyboardEvent::T
59          SoKeyboardEvent::U
60          SoKeyboardEvent::V
61          SoKeyboardEvent::W
62          SoKeyboardEvent::X
63          SoKeyboardEvent::Y
64          SoKeyboardEvent::Z
65          SoKeyboardEvent::HOME        Cursor control and motion
66          SoKeyboardEvent::LEFT_ARROW
67          SoKeyboardEvent::UP_ARROW
68          SoKeyboardEvent::RIGHT_ARROW
69          SoKeyboardEvent::DOWN_ARROW
70          SoKeyboardEvent::PAGE_UP
71          SoKeyboardEvent::PAGE_DOWN
72          SoKeyboardEvent::PRIOR
73          SoKeyboardEvent::NEXT
74          SoKeyboardEvent::END
75          SoKeyboardEvent::PAD_ENTER   Keypad functions
76          SoKeyboardEvent::PAD_F1
77          SoKeyboardEvent::PAD_F2
78          SoKeyboardEvent::PAD_F3
79          SoKeyboardEvent::PAD_F4
80          SoKeyboardEvent::PAD_0
81          SoKeyboardEvent::PAD_1
82          SoKeyboardEvent::PAD_2
83          SoKeyboardEvent::PAD_3
84          SoKeyboardEvent::PAD_4
85          SoKeyboardEvent::PAD_5
86          SoKeyboardEvent::PAD_6
87          SoKeyboardEvent::PAD_7
88          SoKeyboardEvent::PAD_8
89          SoKeyboardEvent::PAD_9
90          SoKeyboardEvent::PAD_ADD
91          SoKeyboardEvent::PAD_SUBTRACT
92
93          SoKeyboardEvent::PAD_MULTIPLY
94
95          SoKeyboardEvent::PAD_DIVIDE
96          SoKeyboardEvent::PAD_SPACE
97          SoKeyboardEvent::PAD_TAB
98          SoKeyboardEvent::PAD_INSERT
99          SoKeyboardEvent::PAD_DELETE
100          SoKeyboardEvent::PAD_PERIOD
101          SoKeyboardEvent::F1          Function keys
102          SoKeyboardEvent::F2
103          SoKeyboardEvent::F3
104          SoKeyboardEvent::F4
105          SoKeyboardEvent::F5
106          SoKeyboardEvent::F6
107          SoKeyboardEvent::F7
108          SoKeyboardEvent::F8
109          SoKeyboardEvent::F9
110          SoKeyboardEvent::F10
111          SoKeyboardEvent::F11
112          SoKeyboardEvent::F12
113          SoKeyboardEvent::BACKSPACE   Miscellaneous
114          SoKeyboardEvent::TAB
115          SoKeyboardEvent::RETURN
116          SoKeyboardEvent::ENTER
117          SoKeyboardEvent::PAUSE
118          SoKeyboardEvent::SCROLL_LOCK
119          SoKeyboardEvent::ESCAPE
120          SoKeyboardEvent::DELETE
121          SoKeyboardEvent::PRINT
122          SoKeyboardEvent::INSERT
123          SoKeyboardEvent::NUM_LOCK
124          SoKeyboardEvent::CAPS_LOCK
125          SoKeyboardEvent::SHIFT_LOCK
126          SoKeyboardEvent::SPACE
127          SoKeyboardEvent::APOSTROPHE
128          SoKeyboardEvent::COMMA
129          SoKeyboardEvent::MINUS
130          SoKeyboardEvent::PERIOD
131          SoKeyboardEvent::SLASH
132          SoKeyboardEvent::SEMICOLON
133          SoKeyboardEvent::EQUAL
134          SoKeyboardEvent::BRACKETLEFT
135          SoKeyboardEvent::BACKSLASH
136          SoKeyboardEvent::BRACKETRIGHT
137
138          SoKeyboardEvent::GRAVE
139     }
140
141          Methods from class SoKeyboardEvent:
142
143                           SoKeyboardEvent()
144     static SoType         getClassTypeId()
145     void                  setKey(SoKeyboardEvent::Key whichKey)
146     SoKeyboardEvent::Key  getKey() const
147     static   SbBool         isKeyPressEvent(const  SoEvent  *e,  SoKeyboardE‐
148                                vent::Key whichKey)
149     static SbBool         isKeyReleaseEvent(const  SoEvent  *e,  SoKeyboardE‐
150                                vent::Key whichKey)
151     char                  getPrintableCharacter() const
152
153          Methods from class SoButtonEvent:
154
155     void                  setState(SoButtonEvent::State s)
156     SoButtonEvent::State  getState() const
157
158          Methods from class SoEvent:
159
160     virtual SoType      getTypeId() const
161     SbBool              isOfType(SoType type) const
162     void                setTime(SbTime t)
163     SbTime              getTime() const
164     void                setPosition(const SbVec2s &p)
165     const SbVec2s &     getPosition() const
166     const SbVec2s &     getPosition(const SbViewportRegion &vpRgn) const
167     const  SbVec2f &     getNormalizedPosition(const SbViewportRegion &vpRgn)
168                              const
169     void                setShiftDown(SbBool isDown)
170     void                setCtrlDown(SbBool isDown)
171     void                setAltDown(SbBool isDown)
172     SbBool              wasShiftDown() const
173     SbBool              wasCtrlDown() const
174     SbBool              wasAltDown() const
175
176

DESCRIPTION

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

METHODS

182                           SoKeyboardEvent()
183          Constructor.
184
185     static SoType         getClassTypeId()
186          Return the type id for the SoKeyboardEvent class.
187
188     void                  setKey(SoKeyboardEvent::Key whichKey)
189     SoKeyboardEvent::Key  getKey() const
190          Set and get which key generated the event.
191
192     static   SbBool         isKeyPressEvent(const  SoEvent  *e,  SoKeyboardE‐
193                                vent::Key whichKey)
194     static SbBool         isKeyReleaseEvent(const  SoEvent  *e,  SoKeyboardE‐
195                                vent::Key whichKey)
196          Returns  whether  the  passed  event  is a keyboard press or release
197          event of the passed key. When SoKeyboardEvent::ANY is  passed,  this
198          returns  TRUE if the event represents a keyboard press or release of
199          any key.
200
201     char                  getPrintableCharacter() const
202          Convenience routine that returns the character representing the key,
203          if it's printable. If not, this returns NULL ('\0').
204
205

SEE ALSO

207       SoEvent,  SoButtonEvent,  SoLocation2Event, SoMotion3Event, SoMouseBut‐
208       tonEvent, SoSpaceballButtonEvent, SoHandleEventAction, SoEventCallback,
209       SoSelection, SoInteraction, SoXtDevice
210
211
212
213
214                                                        SoKeyboardEvent(3IV)()
Impressum