Windowsのコンソール入力を読み取るのにReadConsoleInputW
を使用しています。 Ctrl + を押すと検出できるようにしたい。私が持っているコードを使用して、私は問題なくはCtrl +Qを検出することができますが、私はCtrlキー+Sのために何を見ていませんよ。 Ctrl + も検出できますか?ReadConsoleInputWを含むWindowsコンソールのCtrl-S入力イベント
以下はCtrl +Q続いはCtrl +S数回押したときに私が読んINPUT_RECORD
の配列です。
Key { key_down: true, repeat_count: 1, key_code: 17, scan_code: 29, wide_char: 0, control_key_state: 40 }
Key { key_down: true, repeat_count: 1, key_code: 17, scan_code: 29, wide_char: 0, control_key_state: 40 }
Key { key_down: true, repeat_count: 1, key_code: 17, scan_code: 29, wide_char: 0, control_key_state: 40 }
Key { key_down: true, repeat_count: 1, key_code: 17, scan_code: 29, wide_char: 0, control_key_state: 40 }
Key { key_down: true, repeat_count: 1, key_code: 17, scan_code: 29, wide_char: 0, control_key_state: 40 }
Key { key_down: true, repeat_count: 1, key_code: 17, scan_code: 29, wide_char: 0, control_key_state: 40 }
Key { key_down: true, repeat_count: 1, key_code: 17, scan_code: 29, wide_char: 0, control_key_state: 40 }
Key { key_down: true, repeat_count: 1, key_code: 17, scan_code: 29, wide_char: 0, control_key_state: 40 }
Key { key_down: true, repeat_count: 1, key_code: 81, scan_code: 16, wide_char: 17, control_key_state: 40 }
重要な場合は、これはRustでwio
を使用しています。
どの端末エミュレータを使用していますか?あなたは 'cmd.exe'を使っていますか?パワーシェル? bashのようなもの?ターミナルエミュレータプログラムがそのキーコンボをインターセプトできますか? – Shepmaster
['SetConsoleMode'](https://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v = vs.85).aspx)を使用して' ENABLE_PROCESSED_INPUT'を無効にすることはできますか? – wimh
私は 'cmd.exe'を使用しています。私は今夜 'ENABLE_PROCESSED_INPUT'を無効にしようとします。ありがとう。 – oconnor0