Button panel for CasparCG Client Control

I was in need to a physical button to drive CasparCG Client 2.08.
This is what i came up with.

a simple program to send OSC commands to the CasparCG client.
it uses a Pi Xkey panel

it should work with any of the USB models.
all though i made it for the KX-60 and KX-80

I have also tested it on the KX-24 as well.
I know there is a glitch with the KX-24 where the lights do not map to the buttons correctly.
that will be fixed shortly.
this glitch has no impact on the function.


plug in an Xkey and start the exe in the folder.
it is a simple app basicly press a button on the Xkey
it will send the assigned OSC message to the ip address and port of the Client where the OSC message needs to be sent.

if you need to change that address (of the client) you will need to edit the setup.json file in the bin/Debug folder.
it should be the first two tags.

to edit a command
Click Edit
type in the command you want sent when the button is pressed.
This command will go in the box OSC Message
example: /control/1/play

the other boxes Ctrl, Shift and Ctrl + Shift
are commands that will be sent if you hold down the corresponding key on your keyboard when you pres your xkey

for myself i have set this up so that:
Xkey button plays video
Ctrl + Xkey button Stops Video.

Hit Save and exit

note: when you hit the Edit button the OSC TX turns orange, when orange there will be no OSC message sent.
this was to allow you to see what commands are saved to buttons with out triggering anything.

In CasparCG Client
you need to go to settings and make sure that Enable OSC input is checked

then add a video or template to your rundown and check the box that says
allow Remote Triggering

in the UID field you will need to set an ID (this can be anything)
in XkeyOSC you need set the OSC Message to match the UID
in the example: /control/1/play
you would use 1.


in this example the button 1 on the Xkey would play the Clients video with a 1 on the UID field.
and button 1+Ctrl would stop playback.

these are the commands i know the client will take.

The Windows 7 and Windows 10 Files are the same except for some style changes that
looked better on one.

Windows 7

Windows 10


Hey. This is awesome. I’m also developing a tool to allow Xkeys to send a command directly to the Casparcg server, without going through the client.
I’ll share it when it’s finished.
Are you allowed to share the source ?

1 Like

i can.
i did it in c# if you still want is i can send you a link.

Sounds amazing if you have?? Thanks!

Hi, I know this is quite an old thread, so I hope you get notified of my message.

Your app is (I think) exactly what I’m looking for. I have a old 20 key xkeys usb controller and I want to fire OSC commands when I press different buttons on the xkeys.

I downloaded your app and ran it with with xkeys plugged in first, but when I press a button on the xkeys nothing shows up in your app. I have it in edit mode to program but nothing. I know the xkeys is working as it has a couple of keys with hardware macros enabled - one of which is the letter s which shows up if I have the cursor in an open field in xkeyOSC.

Am I doing something wrong? Do I also need to run macroworks, or perhaps it just doesn’t work with my XKeys?

Thanks in advance.


Make sure, that your XKeys sends the keys the app expects. Sometimes the receiving app need to have the keyboard focus, so that the keys are sent to it. The keyboard focus is the app, that you can type stuff in, that is activated. Using something like Companion does not have that limitation, but does work with a Stream Deck controller instead of the XKeys.

Thanks, I managed to find a friend with an xkeys 60 which works fine but my xkeys Desktop MWII doesn’t show up in xkeysOSC when I press any buttons.

Does it send some keys if you open for instance notepad?

Yes, it sends whatever I’ve set as the hardware macros against those buttons, so for example, I have set two buttons to be S and Space, and if I open notepad and press the buttons, it prints S and a space, so I know it works from that side of things

I think if I understand you correctly. You are using both my software and the xkeys desktop soft ware at the same time?

In that case I don’t think it will work. I have never tried that use case. I dont remember exactly but you may need to exit out of the macros software befor you run xkeysOSC.
There may have been a setting to change the mode of the xkeys panel as well. From a macro mode to a keyboard mode. It has been a while tho and I do not remember exactly. I can look later today.

But in short if there is any other software running that uses the xkeys panel there may be a conflict.