BTT compatibility with XenceLabs Quick Keys - observations/questions

Hi there!

I recently purchased the XenceLabs Quick Keys, a cool little device that serves as a macropad and also has a dial for rotary actions.

You can program each button to perform a specific action — such as keyboard shortcuts.

The app itself isn't very sophisticated though, so I had the thought of setting up keyboard shortcuts via BTT that I could then trigger via a shortcut button on the Quick Keys pad.

However, this doesn't work — the actions are never executed by BTT. Interestingly I can tell that the correct sequence is firing, because when creating a new trigger in BTT you can press the button on the Quick Keys and it actually captures/fills in the shortcut correctly.

Screenshot 2022-11-28 at 11.25.15

I'm wondering if there's something in the way that BTT detects shortcuts where maybe it's missing the shortcuts triggered by the Quick Keys? I did try adding the higher CPU priority extension and that didn't seem to make a difference, unfortunately.

Thanks!

most likely their software is sending the keys at a too high level. It might still be recognized in the BTT UI, but not in the BTT background services.

Does their software allow to trigger command line or apple scripts? If so you could use these to control BTT

Ah, that does seem to work, although it's not super obvious. You use the "Open/Run Application" action in Quick Keys, and in the Finder window to choose an app you can change it to allow selecting any files instead of just *.app. Point that to a shell script, and that seems to work!

In that case you can trigger your BTT triggers via a terminal command like this:

/usr/bin/osascript -e "tell application \"BetterTouchTool\" to execute_assigned_actions_for_trigger \"6DBBA69D-4D80-4A12-9EAA-3CBC0160069E\""

(get the UUID by right-clicking a trigger in BTT)

Or if you want to trigger a named trigger.

/usr/bin/osascript -e "tell application \"BetterTouchTool\" to trigger_named_async_without_response \"The name of the trigger\""

Although it sounds a bit cumbersome.

if the software allow to open URLs you can also try to right-click a trigger in BTT and select the "copy link to activate trigger" item. However triggering via URL is not as powerful as via Apple Script because BTT will quickly activate when triggering via URL.
btt://execute_assigned_actions_for_trigger/?uuid=6DBBA69D-4D80-4A12-9EAA-3CBC0160069E

You can also create an Automator app and trigger btt script from there:

  1. Automator > Create Application > Run Shell Script
  2. In the script you input open "btt://trigger_named_async_without_response/?trigger_name=yourtriggerhere"
  3. Save the Automator file somewhere
  4. On your Xencelabs assign a button and you use the saved automaton file as an app.