add handlers for C-w and C-q
This commit is contained in:
parent
83f68cca4a
commit
981d34dbc1
9
main.go
9
main.go
@ -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() {
|
||||
duration := workTime
|
||||
w.Hide()
|
||||
|
Loading…
Reference in New Issue
Block a user