glutGetModifiers only detects CTRL, ALT, and SHIFT, not the β key.
The only way I know is to use Carbon ,
#include <Carbon/Carbon.h> KeyMap keyStates ; bool IS_KEYDOWN( uint16_t vKey ) { uint8_t index = vKey / 32 ; uint8_t shift = vKey % 32 ; return keyStates[index].bigEndianValue & (1 << shift) ; } void checkInput() { // This grabs all key states, then checks if you were holding down β or not GetKeys(keyStates) ; if( IS_KEYDOWN( kVK_Command ) ) puts( "β" ) ; }
source share