0

So i'm trying to make something that waits for a user to press a key, and it stores whatever key they pressed in a variable without pressing enter. I heard of mscvrt but that only works on Windows, but i'm trying to make this on linux. Any ideas?

ShadowRanger
  • 124,179
  • 11
  • 158
  • 228
EmperorBale
  • 488
  • 5
  • 19
  • Why the big LINUX in the title? Do you have any reason whatsoever to think this would be different across platforms? – Charles Duffy Nov 28 '17 at 02:55
  • @CharlesDuffy: Sadly, the OS does matter here. Direct terminal reads of a single character (without waiting for a newline to be entered) are surprisingly non-portable (see answers to duplicate question). – ShadowRanger Nov 28 '17 at 02:57

0 Answers0