I have a part of code that contains the following functions:
void Keyboard(int key) { switch (key) { case GLFW_KEY_A: m_controlState |= TDC_LEFT; bre
it's a simple way to set & reset specific bit in a word.
bitword |= MASK is a shorthand of bitword = bitword | MASK which sets the mask bit
bitword &= ~MASK clears that bit (check your boolean algebra notebook to see why)