BTT fails to distinguish between two keyboards

Describe the bug

I am recording a keyboard shortcut triggered by the "delete" key on an Apple Magic Keyboard. I also own a Keychron K1 Bluetooth keyboard and I do not want to trigger this shortcut when using the Keychron. I have used the "Works on keyboards with same type as used for recording" option to accomplish this. Until a few days ago, this worked fine.

However, today the shortcut is being triggered by both keyboards. I have tried deleting and recreating the shortcut, but it is still triggered by both keyboards. I am using BTT from SetApp and it was version 4.062, so I quite and restarted it, but I continue to have the same problem in 4.068.

Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.):

Apple Magic Keyboard (small, white, with TouchID)
Keychron K1 Bluetooth Keyboard

Device information:

  • Type of Mac: Mac Mini 2023 / M2
  • macOS version: 13.2.1
  • BetterTouchTool version: 4.068 (from SetApp)

Justin case this his helpful...

Keychron K1:

  Product ID:	0x024f
  Vendor ID:	0x05ac (Apple Inc.)
  Version:	1.04
  Speed:	Up to 12 Mb/s
  Manufacturer:	Keychron
  Location ID:	0x02300000 / 50
  Current Available (mA):	500
  Current Required (mA):	100
  Extra Operating Current (mA):	0
Magic Keyboard with Touch ID:

  Product ID:	0x029a
  Vendor ID:	0x05ac (Apple Inc.)
  Version:	4.00
  Serial Number:	F0T110614HBPWWY0Y
  Speed:	Up to 12 Mb/s
  Manufacturer:	Apple Inc.
  Location ID:	0x03220000 / 10
  Current Available (mA):	500
  Current Required (mA):	500
  Extra Operating Current (mA):	1000
  Sleep current (mA):	1500


When this was working I also found that when the Apple Magic keyboard was operating as a wireless keyboard it was seen as a different "type" than when it was operating as a USB keyboard. This was pretty inconvenient, since it forced me to record every shortcut twice (once for wired, once for wireless). Is this really how it is supposed to work?

Now, of course, they are all triggering. In fact, if I enable both the wired and wireless keyboards, then BTT presents a pop up asking me to choose which one to trigger.

possibly something on your system has enabled secure input, while this is active BTT's keyboard differentiation will fail.

BTT shows a warning about this when clicking its menubar icon

I do not think secure input has been enabled globally on my system and I see no such warning in the BTT menu. I thought secure input was only during things like password input. I am experiencing this lack of keyboard discrimination all the time.

As I said, BTT was doing this just fine in all the contexts I expect until just a few days ago.

Is there any kind of debugging log I can gather for you or I to understand the problem. It is quite a shame that BTT cannot tell apart these two keyboards any more.

FYI, after the update to Ventura 13.2.1 this problem went away. This was clearly not due to secure input, but I have no idea why it did happen or what now fixed it. In any case, I'm glad to have my shortcuts back!

I am still disappointed that BTT seems to have no tools for helping to diagnose issues. For example, there is no way to see which keyboard type BTT has chosen to remember with a shortcut. Am I missing this? It especially frustrating since BTT sees the Apple Magic Keyboard as two separate keyboards and shortcuts recorded while it is not plugged in (i.e. wireless) stop working if I plug the keyboard in.

Is there anyplace I can go to see a textual representation of what the shortcuts are? Are these stored as JSON anywhere that I could review them?

I have decided to use the notes field to manually remind myself by writing "Wireless Apple Keyboard" or "USB Apple Keyboard".

I hope someday the interface could indicate in some way which keyboard was memorized so that I would not have to take manual (error prone) note of this.

Unfortunately BTT doesn't know about the keyboard name, you can however see the internal ID BTT uses to identify the keyboard by selecting & copying a shortcut you have configured to your clipboard (via cmd+c) and pasting it in some text editor. The resulting JSON will have a key called BTTKeyboardShortcutKeyboardType

OK, this has now happened a second time. This time the wireless Apple Magic keyboard has a BTTKeyboardShortcutKeyboardType of 1169 and the same keyboard as a wired keyboard has the BTTKeyboardShortcutKeyboardType of 3597.

However, if I add a new shortcut now, to any keyboard and ask BTT to trigger only for keyboards of the same type, the BTTKeyboardShortcutKeyboardType for all of my keyboards on the new shortcuts is 0 (zero).

So it appears that BTT loses the ability to distinguish keyboards or even access whatever identifier it is using as the "type".

I have quite and restarted BTT and it still cannot distinguish keyboards.

Why does BTT lose the ability to see keyboard types and how to I get it to regain this ability?