mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07: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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user