![]() |
Namespaces | |
SurgSim | |
SurgSim::Graphics | |
Macros | |
#define | CONTROL_CHAR_FROM_UPPERCASE(uppercaseCharacter) ((uppercaseCharacter) - ('A' - 1)) |
Calculate the key code value of Ctrl-{character}, given the uppercase character. More... | |
#define CONTROL_CHAR_FROM_UPPERCASE | ( | uppercaseCharacter | ) | ((uppercaseCharacter) - ('A' - 1)) |
Calculate the key code value of Ctrl-{character}, given the uppercase character.
If a key is pressed while holding Ctrl, OSG "helpfully" gives you the key code of the control character (i.e. ^A == 1) instead of the key itself ('A' == 65). To cope with this, you can use CONTROL_CHAR_FROM_UPPERCASE('A') which is easier to read than strange character ('\001') or integral (1) constants.