Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,19 @@
|
|||
# syntax: TAWK -f KEYBOARD_INPUT_KEYPRESS_CHECK.AWK
|
||||
BEGIN {
|
||||
arr["\b"] = "BACKSPACE"
|
||||
arr["\t"] = "TAB"
|
||||
arr["\x0D"] = "ENTER"
|
||||
printf("%s Press any key; ESC to exit\n",ctime())
|
||||
while (1) {
|
||||
nkeys++
|
||||
key = getkey()
|
||||
if (key in arr) { key = arr[key] }
|
||||
space = ((length(key) > 1 && nkeys > 1) || length(p_key) > 1) ? " " : ""
|
||||
keys = keys space key
|
||||
if (key == "ESC") { break }
|
||||
p_key = key
|
||||
}
|
||||
printf("%s %d keys were pressed\n",ctime(),nkeys)
|
||||
printf("%s\n",keys)
|
||||
exit(0)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue