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
x |= y specifically turns on (sets to 1) those bits in x present in y, leaving all the others in x as they were.
x |= y
x
y
x &= ~y specifically turns off (sets to 0) those bits in x present in y, leaving all the others in x as they were.
x &= ~y