ALT key
Monkey Targets Forums/Desktop/ALT key
| ||
Is there a solution for recognizing the ALT key on GLFW target? |
| ||
I don't remember well, but yes, at least for the GLFW2 target - you just need to do this (copied from my old, still in use custom GLFW target ^_^ ) in glfwgame.cpp, just add this to the key list. VKEY_LALT=164,VKEY_RALT, And then, on Transkey: case GLFW_KEY_LALT:return VKEY_LALT; case GLFW_KEY_RALT:return VKEY_RALT; And you're done. |
| ||
For GLFW3 edit \targets\glfw3\modules\native\glfwgame.cpp Add to the enum list starting at line 77 VKEY_ALT=14, And then in TransKey add case GLFW_KEY_LEFT_ALT: case GLFW_KEY_RIGHT_ALT:return VKEY_ALT; Then in your project add Const KEY_ALT = 14 Then you can use alt in GLFW3. You could make it so you distinguish left/right alt, but if you look at the files monkey already doesn't care about left/right control left/right shift so this conforms to that existing standard. |