DerJantob / TSW2_Controller

Control TSW2 with a joystick or other controllers
25 stars 4 forks source link

Control key keeps being depressed after closing TSW Controller program #18

Closed danbaz101 closed 2 years ago

danbaz101 commented 2 years ago

Hi Jannik,

Thanks for latest update. Helped me too.

Trying to add a button for the Tempomat (kind of cruise control). Switch on: Ctrl + R Switch off: Ctrl+ R When I got it to "work" it kept saying that Tempomat key was pressed. When I closed the program and TSW2 and then went to google chrome and moved my scroll wheel, the page zoomed in and out without me pressing the control key. So the TSW Controller prog was still pressing the control key. I had to log off from Windows and log back on to be able to use my keyboard again. I could not type too..

Hope that from this description you know what could be the issue, but available to provide more info as required.

Kind regards,

Daniel

DerJantob commented 2 years ago

It sounds like the ctrl key does not get released. Do you release the button in your shortcut? grafik

danbaz101 commented 2 years ago

Hi Jannik,

It was my error. For second line I had r[down][80] instead of [press]. It works great now. When possible to program it would be good that any key presses are released when the program is closed, terminated or crashed.

The program crashed on me today. I have one of my pedals set as SIFA. For the condition I had it set to > 10 instead of >10, so with a space in between. When I then selected the train and connected to the sim the TSW Controller program crashed.

Just did a full run with the BR442 with SIFA and PZB, all with my joysticks and it was a lot of fun!

Have a nice evening,

Daniel

DerJantob commented 2 years ago

I'm really, really happy that you like the program! I'm always excited about feedback :)

I will try to add a notification if the user does an error in the input, to prevent crashes. I also like the idea that pressed keys are automatically released after closing. But it will probably take a while for the next update, because I am currently quite busy with school.