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
|
@ -3,6 +3,3 @@ pre-commit:
|
||||||
go-vet:
|
go-vet:
|
||||||
root: "Wox/"
|
root: "Wox/"
|
||||||
run: go vet
|
run: go vet
|
||||||
ui-build:
|
|
||||||
root: "Wox.UI.React/"
|
|
||||||
run: pnpm build
|
|
|
@ -45,8 +45,16 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
||||||
}
|
}
|
||||||
window.SetQuitOnClose(true);
|
window.SetQuitOnClose(true);
|
||||||
|
|
||||||
::MSG msg;
|
::MSG msg = { };
|
||||||
while (::GetMessage(&msg, nullptr, 0, 0)) {
|
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);
|
::TranslateMessage(&msg);
|
||||||
::DispatchMessage(&msg);
|
::DispatchMessage(&msg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue