At my current place of employment, I single-handedly (ok dual-handedly because I'm missing no limbs) maintain approximately 700 laptops. Due to the nature and frequency of their use, I often find they are returned with a bit of damage. For this problem, my primary concern is when a laptop is returned with a broken or defunct keyboard. When the hardware repairman fixes these broken keyboards, it becomes necessary to test them. The test involves using each...and...every...single...key. What a drag right? The problem is, sometimes I lose track of if I typed a key or not.
Write a program/script that:
- Takes user input
- Upon submission (in whatever way you deem fit), determines whether each key was pressed.
- Outputs yes or no or any way to indicate that either I was successful in pressing all the keys or not. (Indicate in your answer the two possible outputs if it's not something obvious).
- Uppercase, lowercase, both? Whichever way you deem fit. As long as it's [A-Z], [a-z] or [A-Za-z]. Same goes with numbers and other symbols. (So if = was typed in, + doesn't matter). Your choice if you want to include shifted characters or not.
- You needn't worry about tabs or spaces
- No needs for function keys, CTRL, ALT, Esc or any other keys that don't output something on the screen
- This assumes an EN-US keyboard and the laptops do not include a numpad.
- OS agnostic, whatever language you prefer
- It doesn't matter if the key has been pressed multiple times (for when the tester just gets lazy and starts button smashing like it's Mortal Kombat)
Here's a potential input set that would return true (or yes, or "You did it!")
Winner is determined by the least number of characters.