Original Post
Hello, I use a global array which stores the pressed keys:
bool g_key[255];
now, when a key is pressed the corresponding index in the array is set to true:
void special_keys(int a_keys, int x, int y)
{
g_key[a_keys] = true;
}
This works fine, but e.g. these two keys have the same integer value:
GLUT_KEY_RIGHT == 102
(unsigned int)'f' == 102
So when I press one of these keys, both actions are executed :(. How can I fix this? Thank you,