mirror of https://github.com/Wox-launcher/Wox
Prevent the error/beep sound when alt+number/letter is pressed on windows
This commit is contained in:
parent
42586c9e05
commit
7a6ec18a35
|
@ -2,7 +2,4 @@ pre-commit:
|
|||
commands:
|
||||
go-vet:
|
||||
root: "Wox/"
|
||||
run: go vet
|
||||
ui-build:
|
||||
root: "Wox.UI.React/"
|
||||
run: pnpm build
|
||||
run: go vet
|
|
@ -45,8 +45,16 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
|||
}
|
||||
window.SetQuitOnClose(true);
|
||||
|
||||
::MSG msg;
|
||||
while (::GetMessage(&msg, nullptr, 0, 0)) {
|
||||
::MSG msg = { };
|
||||
while (::GetMessage(&msg, nullptr, 0, 0) > 0) {
|
||||
// prevent the error/beep sound when alt+number/letter is pressed
|
||||
if (msg.message == WM_SYSKEYDOWN) {
|
||||
msg.message = WM_KEYDOWN;
|
||||
::TranslateMessage(&msg);
|
||||
::DispatchMessage(&msg);
|
||||
continue;
|
||||
}
|
||||
|
||||
::TranslateMessage(&msg);
|
||||
::DispatchMessage(&msg);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue