add Ctrl+R shortcut for reload
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
|||||||
var (
|
var (
|
||||||
ShortcutBack = desktop.CustomShortcut{KeyName: fyne.KeyLeft, Modifier: AltModifier}
|
ShortcutBack = desktop.CustomShortcut{KeyName: fyne.KeyLeft, Modifier: AltModifier}
|
||||||
ShortcutForward = desktop.CustomShortcut{KeyName: fyne.KeyRight, Modifier: AltModifier}
|
ShortcutForward = desktop.CustomShortcut{KeyName: fyne.KeyRight, Modifier: AltModifier}
|
||||||
|
ShortcutReload = desktop.CustomShortcut{KeyName: fyne.KeyR, Modifier: ControlModifier}
|
||||||
ShortcutSearch = desktop.CustomShortcut{KeyName: fyne.KeyF, Modifier: ControlModifier}
|
ShortcutSearch = desktop.CustomShortcut{KeyName: fyne.KeyF, Modifier: ControlModifier}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -98,6 +99,9 @@ func (m *MainWindow) addShortcuts() {
|
|||||||
m.BrowsingPane.GoForward()
|
m.BrowsingPane.GoForward()
|
||||||
m.Canvas().Focus(nil)
|
m.Canvas().Focus(nil)
|
||||||
})
|
})
|
||||||
|
m.Canvas().AddShortcut(&ShortcutReload, func(_ fyne.Shortcut) {
|
||||||
|
m.BrowsingPane.Reload()
|
||||||
|
})
|
||||||
m.Canvas().AddShortcut(&ShortcutSearch, func(_ fyne.Shortcut) {
|
m.Canvas().AddShortcut(&ShortcutSearch, func(_ fyne.Shortcut) {
|
||||||
if s := m.BrowsingPane.GetSearchBarIfAny(); s != nil {
|
if s := m.BrowsingPane.GetSearchBarIfAny(); s != nil {
|
||||||
m.Window.Canvas().Focus(s)
|
m.Window.Canvas().Focus(s)
|
||||||
|
|||||||
Reference in New Issue
Block a user