mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 23:41:38 +08:00
[windows] Fix #2359 by not redirecting the accelerators to wndproc
If someone wants to handle accelerators they could use the key bindings in a cross-platform way.
This commit is contained in:
parent
2f3eb70a4d
commit
012eeab3aa
@ -1322,13 +1322,7 @@ func (w *windowsWebviewWindow) setupChromium() {
|
||||
chromium.WebResourceRequestedCallback = w.processRequest
|
||||
chromium.ContainsFullScreenElementChangedCallback = w.fullscreenChanged
|
||||
chromium.NavigationCompletedCallback = w.navigationCompleted
|
||||
chromium.AcceleratorKeyCallback = func(vkey uint) bool {
|
||||
if w.processKeyBinding(vkey) {
|
||||
return true
|
||||
}
|
||||
w32.PostMessage(w.hwnd, w32.WM_KEYDOWN, uintptr(vkey), 0)
|
||||
return false
|
||||
}
|
||||
chromium.AcceleratorKeyCallback = w.processKeyBinding
|
||||
|
||||
chromium.Embed(w.hwnd)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user