mirror of
https://xff.cz/git/pinephone-keyboard
synced 2024-12-21 20:38:48 -05:00
Fix re-entry to sleep after the first keypress
This commit is contained in:
parent
61e90842de
commit
6145b3df0a
@ -2142,8 +2142,16 @@ void main(void)
|
||||
// if active scanning is not active and port 6 change was
|
||||
// detected, and some key is still pressed, enter active
|
||||
// scanning mode
|
||||
if (!scan_active && keyscan_idle_is_pressed())
|
||||
keyscan_active();
|
||||
if (!scan_active) {
|
||||
if (keyscan_idle_is_pressed())
|
||||
keyscan_active();
|
||||
|
||||
// when the scan is not active, we may have been woken up
|
||||
// by port 6 change interrupt, so we want to clear the
|
||||
// port 6 change flag here, to allow the controller to
|
||||
// sleep again in case the active scanning is not needed
|
||||
p6_changed = 0;
|
||||
}
|
||||
|
||||
// if we're in active scanning, scan the keys, and report
|
||||
// new state
|
||||
|
Loading…
Reference in New Issue
Block a user