In our program, we have several different areas where you can type CW using either paddles or a straight key. We have a separate class that handles input, and there is a handle typing method that is being ran in a thread. It handles the keyboard input and then sends the CW back to the controller to then be displayed on screen. A thread starts when you select an input mode, and then stops when you change the mode of input or leave that practice mode.
This works in all of the practice modes upon starting the program. You can go into any of them and it will work. You should then be able to switch between modes and it should still work, since the old thread will close and a new one will start. This does not always work however.
There is no clear cause for it, as for it will stop working at random times. Sometimes you will be able to switch between modes 5-6 times before it stops working, other it will stop after switching 1 time. There is no certain practice mode causing it either, as it can happen when switching from any mode to any other mode, including back to the same mode.
I was wondering if it could be something with the thread or something else could cause it. Please let me know if you have any idea of where to look for a cause or what to try since I am not getting any errors either.