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,721
    Likes Received:
    2,078
    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,721
    Likes Received:
    2,078
    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 Member

    Joined:
    Aug 13, 2021
    Messages:
    33
    Likes Received:
    31


    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
     
  10. Nasenhupe

    Nasenhupe Member

    Joined:
    Nov 21, 2018
    Messages:
    50
    Likes Received:
    51
    Thank you for this thread! I was sad because I could not get the Stream Deck to work in TSW when assigning key combinations. It worked with the Super Macro plugin mentioned above. It was a nuisance to set up but works great now.


    upload_2025-3-15_13-14-42.png

    upload_2025-3-15_13-15-1.png
     
  11. darrylhamster

    darrylhamster New Member

    Joined:
    Apr 8, 2025
    Messages:
    5
    Likes Received:
    0
    I'm having trouble to get anyting to work with TSW 5 i guess stream deck doesnt work could do with a little tutorial maybe anyone know where to find one please?
     
  12. VGK

    VGK Member

    Joined:
    Aug 13, 2021
    Messages:
    33
    Likes Received:
    31
    Hi Elgato does work with TSW5 I have a Stream deck, stream deck plus and a pedal. All work great, I use my Raildriver where possible but ever since DTG screwed up the Raildriver mappings thank god I have my Elgato. I can’t provide any manual other than to say watch YouTube videos and just tinker, you’d be surprised what you can achieve. I’ve attached some images of what I’ve done with mine.
     

    Attached Files:

    • Like Like x 2
  13. VGK

    VGK Member

    Joined:
    Aug 13, 2021
    Messages:
    33
    Likes Received:
    31
    I have mapped every loco and separated them into diesel or electric. Most controls are common throughout however some have there own unique settings. I’ve had to use macros for some controls, you’ll have fun doing that!!! I use my SD+ for driving my pedal only for AWS and SD for selection and special control settings. Trust me what the adverts say it’s only limited by your own imagination. I have one button setting that opens Steam starts my Soundpad, opens Cobra one Raildriver interface and stream deck for easy access to make changes on the fly, and plays a nice intro in the process. You can easily make or download icons for use. Hope this inspires you to give it a go, it’s definitely worth it.
     
    • Like Like x 1
  14. darrylhamster

    darrylhamster New Member

    Joined:
    Apr 8, 2025
    Messages:
    5
    Likes Received:
    0
    Hi VGk thanks for the reply looks lovely and great what you have achieved so far i havce tinkered its the mapping of the buttons i had trouble with etc i thought i got 1 button working last night but doesnt seem to now, is it hot keys and hot key switch i need to map or is it macro i have tried both and not getting very far. I have mapped some of my buttons for obs and rekordbox dj prog no prob and they seem to work ok will try again might get lucky. Not seen many youtube videos on this subject remapping them for tsw have for say truck sim etc. Thanks for reply.
    Regards
    Darryl

    since writing this im sorta starting get buttons to work i found out you can,t name the buttons the same as the action say esc or e or w etc
     
    Last edited: Apr 10, 2025
  15. VGK

    VGK Member

    Joined:
    Aug 13, 2021
    Messages:
    33
    Likes Received:
    31
    Hi Darryl
    Have you installed Bar Raiders Super Macro addons?
    What action are you trying achieve, I could send an image of my setting if it helps
     
  16. darrylhamster

    darrylhamster New Member

    Joined:
    Apr 8, 2025
    Messages:
    5
    Likes Received:
    0
    Good Morning VGK i have installed bar raiders super macro addons didnt have any joy but have finally broke through with hot keys i the prob was it was binding the key say e for example but also was calling it e in the title so naturally the stream deck didnt have a clue i stummbed across thatby trial and error and tinkering as you say. Having trouble with the master keys at the moment which i will look at today most prob . I was dog with a bone last night when i figured this out got quite a bit done. Yes please for the marco just an example of how to input the code would help then after got these button sored i try sort out my logitech joystick for the train levers
    regards
    Darryl
     
  17. VGK

    VGK Member

    Joined:
    Aug 13, 2021
    Messages:
    33
    Likes Received:
    31
    Hey Darryl
    I tried attaching a backup of my streamdeck, but was too big to attach.
    Here are my Master key settings, make sure you copy all the secondary macro settings as too long, I can't take the credit for this one, it belongs to a member in one of the posts above.

    It's a shame that this topic is shared by many as I believe the Elgato products are a great addition to TSW, and an active forum would be great for sharing settings, macros, icons etc.
    upload_2025-4-12_11-43-52.png

    upload_2025-4-12_11-44-23.png
     
    • Like Like x 1
  18. darrylhamster

    darrylhamster New Member

    Joined:
    Apr 8, 2025
    Messages:
    5
    Likes Received:
    0
    Hi VGK
    Thanks for this it really help have a working master key button switch. i like the youtube video on this page that got all the directions buttons on it and the elgarto pedal is a nice touch tempting to get
    regards
    Darryl
     

Share This Page