Skip to main content

is_ctrl_alt_del

Function is_ctrl_alt_del 

Source
pub fn is_ctrl_alt_del(report: &[u8; 8]) -> bool
Expand description

True if a keyboard boot report is the Ctrl+Alt+Del chord: either Ctrl (left 0x01 / right 0x10) and either Alt (left 0x04 / right 0x40) held, with the Delete key down. This is the secure-attention combo - a driver checks it each poll for a keyboard device and, when true, pushes CTRL_ALT_DEL_SIGNAL for the shell to act on; the driver itself cannot reboot (SEC-2). (This said the driver “issues the reboot syscall”, which SEC-2 removed.) Apply this ONLY to keyboard reports: a mouse boot report’s button byte (byte 0) can alias the Ctrl/Alt modifier bits, so it must never be tested here.