mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
pomodoro: accept event on keybind cuz recommended by qt docs
This commit is contained in:
@@ -22,20 +22,24 @@ Item {
|
||||
} else if (event.key === Qt.Key_PageUp) {
|
||||
currentTab = Math.max(currentTab - 1, 0)
|
||||
}
|
||||
event.accepted = true
|
||||
} else if (event.key === Qt.Key_Space || event.key === Qt.Key_S) { // Pause/resume with Space or S
|
||||
if (currentTab === 0) {
|
||||
Pomodoro.togglePomodoro()
|
||||
} else {
|
||||
Pomodoro.toggleStopwatch()
|
||||
}
|
||||
event.accepted = true
|
||||
} else if (event.key === Qt.Key_R) { // Reset with R
|
||||
if (currentTab === 0) {
|
||||
Pomodoro.resetPomodoro()
|
||||
} else {
|
||||
Pomodoro.stopwatchReset()
|
||||
}
|
||||
event.accepted = true
|
||||
} else if (event.key === Qt.Key_L) { // Record lap with L
|
||||
Pomodoro.stopwatchRecordLap()
|
||||
event.accepted = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user