Posted: Mon Mar 19, 2012 4:35 pm Post subject: Getch not detecting Ctrl?
What is it you are trying to achieve?
I'm trying to make a program that detects when the user has pressed Ctrl, and can run certain functions depending on what other keys have been pressed.
What is the problem you are having?
Getch isn't returning anything when I press ctrl.
Describe what you have tried to solve this problem
I tried using Input.KeyDown (It works, but makes my program go extremely slow), searching on the turing documentation, and searching the forum.
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Turing:
var ch :string(1) ifhaschthen getch(ch) if ch = KEY_CTRL then put"Ctrl pushed" endif endif
Please specify what version of Turing you are using
I'm using both Turing 4.1 and Turing 4.1.1 for this.
Sponsor Sponsor
Tony
Posted: Mon Mar 19, 2012 5:06 pm Post subject: RE:Getch not detecting Ctrl?
Ctrl is not a character and will not be found in the character stream to read. It will modify the output of the keyboard though, so you could watch for the "CTRL+C" key, for example.