PC Tsw2 And Elgato Stream Deck

Discussion in 'TSW Troubleshooting & Issues Discussion' started by bb20200, Sep 7, 2021.

  1. bb20200

    bb20200 New Member

    Joined:
    Sep 7, 2021
    Messages:
    3
    Likes Received:
    4
    TSW2 does not handle correctly Elgato Stream Deck when Ctrl key is assigned to an Hotkey (eg Ctrl-P, Shift-Ctrl-P...). First time, it works but notification still show on screen. After, any Ctrl key assigned to an Hotkey does not work. I doesn't think Stream Deck send wrong key code.
    You can reproduce this blocked notification without Stream Deck. For example in game, press on keyboard Ctrl-P (DB ICE circuit breaker) and release Ctrl key before P key.

    Configuration: Keyboard Logitech K740, French Language. SetPoint utility not installed
    Keyboard layout code: 0000040C, build number 82
     
    • Like Like x 1
  2. paul.pavlinovich

    paul.pavlinovich Well-Known Member

    Joined:
    Aug 21, 2020
    Messages:
    1,684
    Likes Received:
    1,998
    Streamdeck does keys in really weird ways so I'm not surprised at this... 8 avoid using it with games just using it to control OBS and start/stop apps.
     
  3. brzivoz

    brzivoz New Member

    Joined:
    Jun 1, 2022
    Messages:
    2
    Likes Received:
    0
  4. paul.pavlinovich

    paul.pavlinovich Well-Known Member

    Joined:
    Aug 21, 2020
    Messages:
    1,684
    Likes Received:
    1,998
    I don't think there is with the stream deck or other similar devices as they are a device unto themselves with a driver and their own proprietary software, they're not a keyboard.

    I have built my own keyboard using a game/joystick controller and buttons which I use for doors, alerter and the three PZB functions. It wasn't all that hard to build https://forums.dovetailgames.com/threads/i-made-a-control-box-for-tsw2.51585/#post-448079 and because the buttons are seen as keyboard keys by windows they work with everything.
     
  5. DazrahT

    DazrahT Member

    Joined:
    Oct 29, 2022
    Messages:
    22
    Likes Received:
    35
    I've recently ran into this issue myself, but think I've found a work-around (after 4 hours of trying!)

    I kept blowing the circuit breaker on the DB BR 110 and wanted a button to reset it rather than having to move the view to look at the switch or remember the key combination! Invariably it'd work first time but the toggle switch in the cab would stay in the 'Close breaker position' and never return to its centre, default position, meaning if you pressed it again it'd do nothing.

    If you download Super Macro by BarRaider you can control how the command (timing) is sent over rather than relying on the default Elgato of just firing Ctrl+P at the sim in one go.

    Here is what I've got for resetting the circuit breaker, the first part sends the Ctrl+P as before, the second part after the brief pause (probably not needed though) restores the toggle switch in the cab to its default centre position. I've got another button that opens the circuit breaker should I need it as well.

    upload_2023-1-6_3-48-18.png
     
    • Like Like x 1
  6. DazrahT

    DazrahT Member

    Joined:
    Oct 29, 2022
    Messages:
    22
    Likes Received:
    35
    I might at some point just move the code I use for the open breaker onto the same button rather than having a separate button, and have a short press (as now) closing it, and a long pause (the next box down) for opening it (or vice versa). I guess for 'safety' a quick press should be the one to open the breaker and a long press to close it.
     
  7. DazrahT

    DazrahT Member

    Joined:
    Oct 29, 2022
    Messages:
    22
    Likes Received:
    35
    Which I've now implemented (and finally got around to tidying some icons up), short press of Pantograph button drops it, Long press (1 second) raises it, same with the Circuit Breaker Button, short press open breaker, long press close breaker. Works definitely with the DB BR 110 and the n-wagen, but should work with most, if not all overhead electric stock.

    upload_2023-1-9_23-10-19.png

    If anyone else has a Stream Deck and is struggling to get it to work here's the code behind the buttons using the Bar Raider - Super Macro plugin

    Create a Super Macro button by dragging it to where you want it, set an icon etc. and set the following settings for the button

    Pantograph Lower (cut and paste into short press macro box)
    {{KeyDown:SHIFT}}{{KeyDown:p}}
    {{PAUSE:50}}{{KeyUp:p}}{{KeyUp:SHIFT}}

    Pantograph Raise (cut and paste into long press macro box)
    {{KeyDown:p}}{{PAUSE:50}}{{KeyUp:p}}

    Set Long press time slider to 1000ms (1 second)
    Set output delay to 100ms (not sure if this really makes a difference, but this is what mine is set to)

    For the circuit breaker it's pretty much the same as the pantrograph button
    New button and the following

    Circuit Breaker Open (cut and paste into short press macro box)
    {{KeyDown:CTRL}}{{KeyDown:SHIFT}}{{KeyDown:p}}
    {{PAUSE:50}}{{KeyUp:p}}{{KeyUp:CTRL}}{{KeyUp:SHIFT}}

    Circuit Breaker Closed (cut and paste into long press macro box)
    {{KeyDown:CTRL}}
    {{KeyDown:p}}
    {{PAUSE:50}}{{KeyUp:p}}
    {{KeyUp:CTRL}}

    Set Long press time slider to 1000ms (1 second)
    Set output delay to 100ms

    If anyone knows what the shortcut key is to Save game and also contract signaller then I'd be grateful, at present I'm having to fool TSW by sending a string of commands, so for save it's [Esc], wait, S, wait, [Esc][Esc], surely there's a proper save shortcut without having to Escape to the pause menu?? Same with contact signaller, currently having to send [Tab], sending [Up] a load of times and then [Enter], again is there a proper shortcut for this???
     
    Last edited: Jan 9, 2023
    • Like Like x 2
  8. bb20200

    bb20200 New Member

    Joined:
    Sep 7, 2021
    Messages:
    3
    Likes Received:
    4
    Thank you DazrahT for the time you passed to make Stream Deck fully functional with TSW2.
    I did the same research a cup of months ago. The same identical solution that I found is to add Super Macro Plug-in from BarRaider to Stream Deck. At this time, I think, it's the only way and it's works pretty well with the good settings obviously ;).

    For example:
    Reverser Key:
    - Short-Press = Forward (Vorne): {{KeyDown:w}}{{PAUSE:100}}{{KeyUp:w}}
    - Long-Press = Reverse (Rückwärt): {{KeyDown:s}}{{PAUSE:100}}{{KeyUp:s}}
    With Long Keypress 600 ms and Output Delay 15 ms

    Cab Light:
    - Long-Press = Light On : KeyDown:SHIFT}}{{KeyDown:i}}{{PAUSE:300}}{{KeyUp:i}}{{KeyUp:SHIFT}}
    - Short-Press = Light Off : {{KeyDown:i}}{{PAUSE:300}}{{KeyUp:i}}
    With Long Keypress 600 ms and Output Delay 15 ms

    AFB Speed (Cruise Control):
    - Long-Press = Cruise Increase : {{KeyDown:r}}{{PAUSE:300}}{{KeyUp:r}}
    - Short-Press = Cruise Decrease : {{KeyDown:f}}{{KeyUp:f}}
    With Long Keypress 600 ms and Output Delay 144 ms

    I Posted a video about TSW2 and Stream Deck XL with Pedal. Many keys have dual function (purple dot on image) with Short-Press and Long-Press timings. The icons have been slightly modified since. it's less flashy now. :cool:


    Here is the actual version of my Stream Deck profile for BR442 Talent 2:
    BR442a.jpg
    BR442B.jpg
    The icons are made with Logoist (Mac)
    I will post this Stream Deck XL profile and icons soon.

    Links:
    Stream Deck Super Macro :love: Plug-in from BarRaider : https://apps.elgato.com/
    Logoist : https://www.syniumsoftware.com/ also on App Store
     
    • Like Like x 2
  9. VGK

    VGK New Member

    Joined:
    Aug 13, 2021
    Messages:
    20
    Likes Received:
    14


    Hi, I am thinking of getting a Stream deck and have a setup like your above, I was just wondering how you get on with this, i.e. does the programming work within TSW4 and is your button artworks available for general download and use? I am very new to this and do not stream or make content, just thinking it would be cool if the setup was relatively painless! Thanks
     

Share This Page