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.
实际上,我正在尝试从用户那里获取输入,直到他按下+CTRL或1+CTRL或D+CTRL或s或ESC{键盘按钮}ENDF7
每当用户按下指定按钮或这些按钮的组合时,如何让我的 perl 代码知道这一点?
use strict; use Term::ReadKey; ReadMode 4; my $key = ReadKey(0); print "Get key ", ord($key), "\n"; ReadMode 0; # Reset tty mode before exiting