
-----------------------------------
AsianNinja
Fri Jan 10, 2014 10:54 am

Prevent Keyboard Input
-----------------------------------
What is it you are trying to achieve?
Need to prevent keyboard input at certain points of my program


What is the problem you are having?
if i use getch, and someone types multiple letters, the program will then automatically enter the next few getch commands too


Describe what you have tried to solve this problem
not a lot, i cant think of a method at all


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)








Please specify what version of Turing you are using
4.1

-----------------------------------
Raknarg
Fri Jan 10, 2014 10:56 am

RE:Prevent Keyboard Input
-----------------------------------

loop
    if i_want_to_getch() then
        getch
    end if
end loop


Keep track of something to tell you whether or not you want to getch

-----------------------------------
AsianNinja
Mon Jan 13, 2014 10:09 pm

Re: Prevent Keyboard Input
-----------------------------------
I dont think that works for me, thanks though
but is there any way to clear the queue/cache/buffer in turing?

-----------------------------------
Raknarg
Mon Jan 13, 2014 10:12 pm

RE:Prevent Keyboard Input
-----------------------------------
Input.Flush I believe should work, but I'm not sure if it will work for getch as well.

-----------------------------------
Dreadnought
Mon Jan 13, 2014 10:47 pm

Re: Prevent Keyboard Input
-----------------------------------

Input.Flush I believe should work, but I'm not sure if it will work for getch as well.

It certainly does :)

-----------------------------------
AsianNinja
Tue Jan 14, 2014 10:15 am

Re: Prevent Keyboard Input
-----------------------------------
Input. Flush works :D
Thanks SO MUCH!!!
