Skip to main content

MODIFIER_MASK

Constant MODIFIER_MASK 

const MODIFIER_MASK: u32 = _; // 31u32
Expand description

Bits in KEY_EVENT_RECORD::dwControlKeyState that represent “real” modifier keys (Ctrl / Alt / Shift) as opposed to lock toggles (CAPSLOCK_ON, NUMLOCK_ON, SCROLLLOCK_ON) or the ENHANCED_KEY flag.

Control-mode key classification ANDs dwControlKeyState with this mask before matching; otherwise an enabled CapsLock or NumLock would make dwControlKeyState non-zero and silently skip every (VK_*, 0) arm.