This code is in a widget, in the onHoverKey() method. If I hold the shift key while mousing-over the widget, then the bool control_key is TRUE and the debug text is output to the log. Any ideas why this might be?

// Here's the definition of RACK_MOD_MASK
#define RACK_MOD_MASK (GLFW_MOD_SHIFT | GLFW_MOD_CONTROL | GLFW_MOD_ALT | GLFW_MOD_SUPER)
// which is 1111 in binary
// Here's the definition of GLFW_MOD_SHIFT (according to https://www.glfw.org/docs/3.3/group__mods.html#ga14994d3196c290aaa347248e51740274)
#define GLFW_MOD_SHIFT 0x0001
// which is 000 0001 in binary
// Here's the definition of GLFW_MOD_CONTROL
#define GLFW_MOD_CONTROL 0x0002
// which is 0000 0010 in binary
// Here's my calculation for the control key flag again:
bool control_key = ((e.mods & RACK_MOD_MASK) && GLFW_MOD_CONTROL);
// Swapping the binary values in for the known variables gives:
bool control_key = ((e.mods & 0b1111) && 0b0010);
// This seems good on paper?