Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
c ++の文字列シーケンスの最後で、エスケープキーが押されたかのように「エスケープキー」をシミュレートする方法は?
Escape キーが押されるまで文字列データを受け入れる stdin 入力を提供する必要があります。
そのために文字を正しく受け取りますが、最終的に「エスケープキーストローク」を送信するにはどうすればよいですか?
「escape」のASCIIコードは27(= 16進数で1b)です。エスケープを送信するには、その文字を送信する必要があります'\0x1b'。
'\0x1b'