Add listening to Escape and 'Q' keys to close Win32 sample window
このコミットが含まれているのは:
1 親
9feaae0d86
コミット
3695ca3fac
1ファイル変更
+6
@@ -148,6 +148,12 @@ internal unsafe static class Win32ApplicationRunner
|
||||
{
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
|
||||
// Also listen to Escape and 'Q' to Quit.
|
||||
if (msg.message == Windows.WM_KEYUP && (msg.wParam == Windows.VK_ESCAPE || msg.wParam == 0x51))
|
||||
{
|
||||
_ = Windows.DestroyWindow(hwnd);
|
||||
}
|
||||
}
|
||||
|
||||
tokenSource.Cancel();
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする