add handlers for C-w and C-q

This commit is contained in:
Aaron Bieber 2024-10-31 08:02:24 -06:00
parent 83f68cca4a
commit 981d34dbc1
No known key found for this signature in database

View File

@ -117,6 +117,15 @@ func main() {
), ),
) )
ctrlQ := &desktop.CustomShortcut{KeyName: fyne.KeyQ, Modifier: fyne.KeyModifierControl}
ctrlW := &desktop.CustomShortcut{KeyName: fyne.KeyW, Modifier: fyne.KeyModifierControl}
w.Canvas().AddShortcut(ctrlQ, func(shortcut fyne.Shortcut) {
a.Quit()
})
w.Canvas().AddShortcut(ctrlW, func(shortcut fyne.Shortcut) {
w.Hide()
})
go func() { go func() {
duration := workTime duration := workTime
w.Hide() w.Hide()