The 'Works on keyboards with same type' Trigger Condition doesn't seem to restrict it to the keyboard I originally used

Continuing the discussion from Use Logitech Trackball with Better Touch?:

This may be me not understanding the feature, and what amounts to a 'same type' keyboard; but when I first saw this feature, I was hoping I would be able to use it in a similar way to how I now end up using Karabiner; to configure shortcuts that would only execute when issued on my Razer Orbweaver keyboard, not when typed on my normal keyboard.

If this isn't actually a bug, and just me misunderstanding how 'Works on keyboards with same type' is meant to work; then consider this a feature request for being able to set a keyboard shortcut to only work when triggered from a certain device (it would be fine for my needs/use cases if this was only exposed through the advanced trigger conditions.

Mh that should definitely work, I use it all the time to remap e.g. Logitech buttons.
One restriction: it will not work if another app has taken exclusive lock /control over the keyboard (e.g. Karabiner Elements)

This is because then BTT needs to fall back to the higher level system API's, which don't allow to get the keyboard type.

1 Like

Interesting.. I can't guarantee that I actually tested it properly before I used Karabiner; but I definitely noticed it not working when I tested just now (with Karabiner). I'll see if I can disable Karabiner and check again.

Is there any way to programatically check if something like Karabiner has an exclusive lock for the keyboard, and if so, show a warning/similar in BetterTouchTool?

It would also be really cool if the BetterTouchTool UI could show us some detail about what keyboard was used with that feature, so that we're able to know that it was set up correctly (ideally it would be a device name/type or similar)

Yep showing that should be possible. I'll look into that!

1 Like

Awesome! Thanks! :black_heart:

I'll look into disabling Karabiner and let you know how I go with testing/confirming.

Note: After disabling you might need to re-record the shortcut in BTT.

1 Like

Yup, just tested by:

  • Quitting Karabiner-Elements (which restores the original key functions)
  • Re-recording the shortcut, pressing 1 on my Razer Orbweaver
  • Ensuring that the 'Works on keyboards with same type as used for recording' trigger condition was selected
  • Pressing 1 on my Razer Orbweaver: Triggered successfully :white_check_mark:
  • Pressing 1 on my Magic Keyboard: Didn't trigger (as expected) :white_check_mark:

So seems it is working correctly, and it was a combination of user error (me not understanding how the feature was meant to be used) + Karabiner conflicting with it :tada:

Improving the UI/UX around those things I mentioned above would make it way more obvious/accessible to people I feel :slight_smile:

@Andreas_Hegenberg Any chance of getting similar functionality added to BetterTouchTool so it can restrict mouse clicks to the device they were recorded on (similar to how we can do it for keyboard shortcuts)?

Yes, I'm currently working on a big upgrade to mouse support, hopefully being able to completely replace e.g. the Logitech software. Limiting to a specific mouse will be part of that.

However it's part of a massive feature as I'm porting libratbag/libratbag: A DBus daemon to configure input devices, mainly high-end and gaming mice (github.com) (a comprehensive Linux mouse driver library) to BTT. So it will still take a bit. The next alpha version will already be able to do something like this, but it will be a bit complicated to use.

1 Like

Oh true! That sounds awesome as! Hadn't come across libratbag before, but it looks like a super useful tool (particularly when combined with a GUI such as GitHub - libratbag/piper: GTK application to configure gaming devices; or soon, BetterTouchTool! :slight_smile: )

Excited to see that work when it lands!

Yep libratbag is the library on Linux for handling most gaming mice. Porting it to macOS / BTT is taking some time, but so far everything I have ported works great.

1 Like

Exciting!

Once you get through the main porting aspect, would be awesome to see what's involved in adding better support for Razer devices (be that upstream in libratbag, or just for BetterTouchTool):

Do you have plans to release your ported version open source, or will it be exclusive within BetterTouchTool?

I'm not sure yet, but in any case it will be very easy to integrate any additions that come to the original libratbag.

You might also be interested in a new feature that I'll release next week. It will allow you to write simple Java Script functions that parse the input from any HID device. Example Siri Remote:

These functions can be shared with other users, basically making BTT generic for all HID devices. (And they can provide triggers & actions to BTT)

1 Like

Oh cool! That sounds super interesting and useful! Will definitely keep my eye out for that release!

@Andreas_Hegenberg Just wanted to chime back in here to say that I got a chance to briefly play with the generic device trigger support and I can already see just how amazing and powerful this is going to be!

A super quick/simple PoC of using it to enable all the extra buttons on my Razer Ouroboros gaming mouse:

But it also sparked even bigger/bolder ideas, of using it together with my Native Instruments Traktor F1:

I'm excited to play with it more!!

That's amazing! I'm collecting these posts for some sort of gallery.

The feature seems to get much more popular than I would have anticipated :slight_smile: I'll work on improving the UI in the next few days.

1 Like

It's one of those "don't realise just how useful and powerful it's going to be till I start playing with it" type features. Definitely keen to see how the UI/UX of it improves over time!