MeVisLab Toolbox Reference
SoKeyGrabber.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef SO_KEY_GRABBER_H
14#define SO_KEY_GRABBER_H
15
16
18
19#include <Inventor/fields/SoFields.h>
20#include <Inventor/nodes/SoSeparator.h>
21#include <Inventor/nodes/SoSubNode.h>
22
24enum KeyType {
26 ANY = 0,
27
29 LEFT_SHIFT = 0xffe1,
30 RIGHT_SHIFT = 0xffe2,
31 LEFT_CONTROL = 0xffe3,
32 RIGHT_CONTROL = 0xffe4,
33 LEFT_ALT = 0xffe9,
34 RIGHT_ALT = 0xffea,
36
38 NUMBER_0 = 0x030,
39 NUMBER_1 = 0x031,
40 NUMBER_2 = 0x032,
41 NUMBER_3 = 0x033,
42 NUMBER_4 = 0x034,
43 NUMBER_5 = 0x035,
44 NUMBER_6 = 0x036,
45 NUMBER_7 = 0x037,
46 NUMBER_8 = 0x038,
47 NUMBER_9 = 0x039,
49
50
52 A = 0x061,
53 B = 0x062,
54 C = 0x063,
55 D = 0x064,
56 E = 0x065,
57 F = 0x066,
58 G = 0x067,
59 H = 0x068,
60 I = 0x069,
61 J = 0x06a,
62 K = 0x06b,
63 L = 0x06c,
64 M = 0x06d,
65 N = 0x06e,
66 O = 0x06f,
67 P = 0x070,
68 Q = 0x071,
69 R = 0x072,
70 S = 0x073,
71 T = 0x074,
72 U = 0x075,
73 V = 0x076,
74 W = 0x077,
75 X = 0x078,
76 Y = 0x079,
77 Z = 0x07a,
79
80
82 HOME = 0xff50,
83 LEFT_ARROW = 0xff51,
84 UP_ARROW = 0xff52,
85 RIGHT_ARROW = 0xff53,
86 DOWN_ARROW = 0xff54,
87 PAGE_UP = 0xff55,
88 PAGE_DOWN = 0xff56,
89 PRIOR = 0xff55,
90 NEXT = 0xff56,
91 END = 0xff57,
93
94
96 PAD_ENTER = 0xff8d,
97 PAD_F1 = 0xff91,
98 PAD_F2 = 0xff92,
99 PAD_F3 = 0xff93,
100 PAD_F4 = 0xff94,
101
102 PAD_0 = 0xff9e,
103 PAD_1 = 0xff9c,
104 PAD_2 = 0xff99,
105 PAD_3 = 0xff9b,
106 PAD_4 = 0xff96,
107 PAD_5 = 0xff9d,
108 PAD_6 = 0xff98,
109 PAD_7 = 0xff95,
110 PAD_8 = 0xff97,
111 PAD_9 = 0xff9a,
112
113 PAD_ADD = 0xffab,
114 PAD_SUBTRACT = 0xffad,
115 PAD_MULTIPLY = 0xffaa,
116 PAD_DIVIDE = 0xffaf,
117
118 PAD_SPACE = 0xff8d,
119 PAD_TAB = 0xff89,
120 PAD_INSERT = 0xff9e,
121 PAD_DELETE = 0xff9f,
122 PAD_PERIOD = 0xff9f,
124
126 F1 = 0xffbe,
127 F2 = 0xffbf,
128 F3 = 0xffc0,
129 F4 = 0xffc1,
130 F5 = 0xffc2,
131 F6 = 0xffc3,
132 F7 = 0xffc4,
133 F8 = 0xffc5,
134 F9 = 0xffc6,
135 F10 = 0xffc7,
136 F11 = 0xffc8,
137 F12 = 0xffc9,
139
140
142 BACKSPACE = 0xff08,
143 TAB = 0xff09,
144 RETURN = 0xff0d,
145 ENTER = 0xff0d,
146 PAUSE = 0xff13,
147 SCROLL_LOCK = 0xff14,
148 ESCAPE = 0xff1b,
149#ifdef WIN32
150 KEY_DELETE = 0xFFFF,
151#else
152 DELETE = 0xffff,
154#endif
155 PRINT = 0xff61,
156 INSERT = 0xff63,
157 RIGHT_SUPER = 0xff67,
158 NUM_LOCK = 0xff7f,
159 CAPS_LOCK = 0xffe5,
160 SHIFT_LOCK = 0xffe6,
161 LEFT_SUPER = 0xffe7,
162
163 SPACE = 0x020,
164 EXCLAM = 0x021,
165 QUOTEDBL = 0x022,
166 NUMBERSIGN = 0x023,
167 DOLLAR = 0x024,
168 PERCENT = 0x025,
169 AMPERSAND = 0x026,
170 APOSTROPHE = 0x027,
171 PARENLEFT = 0x028,
172 PARENRIGHT = 0x029,
173 ASTERISK = 0x02a,
174 PLUS = 0x02b,
175 COMMA = 0x02c,
176 MINUS = 0x02d,
177 PERIOD = 0x02e,
178 SLASH = 0x02f,
179
180 COLON = 0x03a,
181 SEMICOLON = 0x03b,
182 LESS = 0x03c,
183 EQUAL = 0x03d,
184 GREATER = 0x03e,
185 QUESTION = 0x03f,
186 AT = 0x040,
187
188 BRACKETLEFT = 0x05b,
189 BACKSLASH = 0x05c,
191 ASCIICIRCUM = 0x05e,
192 UNDERSCORE = 0x05f,
193 GRAVE = 0x060,
194
195 BRACELEFT = 0x07b,
196 BAR = 0x07c,
197 BRACERIGHT = 0x07d,
198 ASCIITILDE = 0x07e
200
201 };
202
203//=============================================================
205
206//=============================================================
250
251#endif
252
253
254
255
256
KeyType
SoKeyGrabber is a general facility to grab keyboard events.
@ PAD_DIVIDE
@ BRACERIGHT
@ ASCIITILDE
@ J
@ PAGE_UP
@ PAD_F3
@ RIGHT_SUPER
@ ESCAPE
@ F3
@ GRAVE
@ PAD_8
@ R
@ BACKSLASH
@ NUM_LOCK
@ NUMBER_9
@ NUMBER_5
@ APOSTROPHE
@ T
@ PAD_0
@ GREATER
@ F5
@ PAD_SUBTRACT
@ BRACKETLEFT
@ V
@ COLON
@ PAD_6
@ N
@ G
@ PERCENT
@ SHIFT_LOCK
@ NUMBER_1
@ PAD_5
@ RIGHT_ALT
@ PAD_F1
@ B
@ PAD_9
@ A
Letters.
@ LEFT_CONTROL
@ NUMBER_7
@ H
@ F11
@ M
@ RETURN
@ Y
@ SEMICOLON
@ PAUSE
@ ASCIICIRCUM
@ X
@ EQUAL
@ F1
Function keys.
@ LEFT_ARROW
@ PAD_PERIOD
@ NUMBER_2
@ K
@ RIGHT_ARROW
@ NUMBER_6
@ PAD_1
@ SCROLL_LOCK
@ F7
@ UNDERSCORE
@ PAGE_DOWN
@ C
@ NUMBER_0
Numbers.
@ NUMBER_8
@ D
@ NUMBER_3
@ ASTERISK
@ AT
@ PAD_ENTER
Keypad Functions.
@ P
@ PAD_F4
@ PLUS
@ EXCLAM
@ DOLLAR
@ F12
@ F4
@ PAD_TAB
@ HOME
Cursor control & motion.
@ PAD_DELETE
@ PAD_F2
@ NUMBERSIGN
@ TAB
@ LEFT_ALT
@ ENTER
@ LESS
@ AMPERSAND
@ QUOTEDBL
@ F9
@ LEFT_SUPER
@ BAR
@ ANY
Special constant for any key.
@ INSERT
@ F6
@ F2
@ Q
@ PAD_MULTIPLY
@ LEFT_SHIFT
Modifiers.
@ RIGHT_CONTROL
@ PAD_SPACE
@ Z
@ PRIOR
@ SLASH
@ PRINT
@ NEXT
@ E
@ PAD_INSERT
@ W
@ PAD_2
@ SPACE
@ U
@ PARENRIGHT
@ PARENLEFT
@ F8
@ I
@ QUESTION
@ BACKSPACE
Misc Functions.
@ CAPS_LOCK
@ RIGHT_SHIFT
@ PAD_ADD
@ NUMBER_4
@ DOWN_ARROW
@ END
@ PAD_7
@ BRACKETRIGHT
@ F10
@ KEY_DELETE
@ L
@ PAD_3
@ UP_ARROW
@ S
@ F
@ O
@ MINUS
@ PERIOD
@ BRACELEFT
@ COMMA
@ PAD_4
SoKeyGrabber is a general facility to grab keyboard events.
SoSFTrigger keyPressed
SoSFEnum key0
SoSFEnum key2
void GLRender(SoGLRenderAction *) override
SoSFBool isAutoRepeat
~SoKeyGrabber() override
SoSFTrigger key2Pressed
SoSFTrigger keyReleased
SoSFBool altPressed
SoSFBool ctrlPressed
SoSFTrigger key1Pressed
static void initClass()
SoSFEnum key4
SoSFBool shiftPressed
SoSFTrigger key0Pressed
SoSFTrigger key4Pressed
SoSFEnum lastKey
void handleEvent(SoHandleEventAction *action) override
SoSFEnum key3
bool affectsState() const override
this node does not affect the state, so return false!
SoSFTrigger key3Pressed
SoSFEnum key1
Target mlrange_cast(Source arg)
Generic version of checked ML casts.