Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Addo

macrumors member
Original poster
Jan 11, 2006
65
0
Hi

At work, I use a video switcher and there is a companion app that I use to control it. Within the app there are quite a few commands that have keyboard shortcuts, it's these shortcuts that I am trying to replicate on an Elgato Stream Deck ( sort of a programmable keyboard )

The problem is that many of these shortcuts require simultaneous keystrokes i.e to recall Preset 1 requires "m" AND "1" to be pressed at the same time. The Stream Deck can only learn a single keystroke ( although it does recognise modifier keys if pressed).

I figured that as the Stream Deck can be set to trigger scripts I thought I'd attempt to use AppleScript to fire off these keystrokes - thats where I need help. If I use the following:


Code:
tell application "System Events"
    
    key code {46, 19}
    
end tell

I was hoping it would fire "m" and "1" simultaneously, but it it fires the keys sequentially and as such isn't recognised by the app.

Any pointers in how to accomplish this? I'm very much a noob when it comes to scripting....
 
Regular AppleScript can't perform simultaneous key presses like that - the keystroke and key code commands will only press a single key (with optional modifier keys) at a time.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.