Skip to content

Commit 8bbb661

Browse files
Merge pull request #2 from FrameworkComputer/laptop16-quickpress
laptop16: Detect powerbutton short-press immediately
2 parents 0550524 + 1b929fe commit 8bbb661

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/state_machine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ pub fn start(
11621162

11631163
// Detect short press of power button
11641164
// Short press (or ESC) will exit and boot (skip all further checks)
1165-
let short_press = (!button_pressed && state.prev_pressed && long_press == 1)
1165+
let short_press = (!button_pressed && state.prev_pressed)
11661166
|| state.keypress == Some(Key::Special(ScanCode::ESCAPE));
11671167
match (short_press, state.frame.clone()) {
11681168
// Reboot

0 commit comments

Comments
 (0)