Implementing feature request 2824176: detection of X11 special keys: SHIFT, CTRL, ALT
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@867 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
89054dd9a7
commit
860aa2a786
@ -38,6 +38,12 @@
|
|||||||
#define GLUT_KEY_NUM_LOCK 0x006D
|
#define GLUT_KEY_NUM_LOCK 0x006D
|
||||||
#define GLUT_KEY_BEGIN 0x006E
|
#define GLUT_KEY_BEGIN 0x006E
|
||||||
#define GLUT_KEY_DELETE 0x006F
|
#define GLUT_KEY_DELETE 0x006F
|
||||||
|
#define GLUT_KEY_SHIFT_L 0x0070
|
||||||
|
#define GLUT_KEY_SHIFT_R 0x0071
|
||||||
|
#define GLUT_KEY_CTRL_L 0x0072
|
||||||
|
#define GLUT_KEY_CTRL_R 0x0073
|
||||||
|
#define GLUT_KEY_ALT_L 0x0074
|
||||||
|
#define GLUT_KEY_ALT_R 0x0075
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GLUT API Extension macro definitions -- behaviour when the user clicks on an "x" to close a window
|
* GLUT API Extension macro definitions -- behaviour when the user clicks on an "x" to close a window
|
||||||
|
@ -1387,6 +1387,13 @@ void FGAPIENTRY glutMainLoopEvent( void )
|
|||||||
case XK_Num_Lock : special = GLUT_KEY_NUM_LOCK; break;
|
case XK_Num_Lock : special = GLUT_KEY_NUM_LOCK; break;
|
||||||
case XK_KP_Begin : special = GLUT_KEY_BEGIN; break;
|
case XK_KP_Begin : special = GLUT_KEY_BEGIN; break;
|
||||||
case XK_KP_Delete: special = GLUT_KEY_DELETE; break;
|
case XK_KP_Delete: special = GLUT_KEY_DELETE; break;
|
||||||
|
|
||||||
|
case XK_Shift_L: special = GLUT_KEY_SHIFT_L; break;
|
||||||
|
case XK_Shift_R: special = GLUT_KEY_SHIFT_R; break;
|
||||||
|
case XK_Control_L: special = GLUT_KEY_CTRL_L; break;
|
||||||
|
case XK_Control_R: special = GLUT_KEY_CTRL_R; break;
|
||||||
|
case XK_Alt_L: special = GLUT_KEY_ALT_L; break;
|
||||||
|
case XK_Alt_R: special = GLUT_KEY_ALT_R; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user