Cmd-tab not working on mod layer on macOS, but works otherwise

I have a UHK60 with firmware 15.0.1, and I’m using it with macOS. On the mod layer, I have mod-D mapped to LCmd-Tab – but it does nothing when I do mod-D.

(Actually, I just tried setting that again, and now with the same cmd-tab mapping, mod-D just sends a regular tab!)

But if I actually do cmd-tab (left or right cmd), it works as expected to switch applications.

I have the same issue with mod-E, mapped to cmd-T: the mod layer key does nothing, but if I do cmd-T, it opens new tabs as expected.

Other similar keys work: mod-R is mapped to cmd-option-right arrow, and in Firefox that switches tabs as expected.

Any idea what’s going on?

Karabiner elements may be interfering?

I don’t have Karabiner elements installed. So that’s not it… :confused:

Alright, please try setting keystroke delay to 10ms in typing behavior.

If it doesn’t help, check what’s going on with keyboardchecker.com.

If everything still looks fine, you can set keystroke delay to 200ms via macros - put set keystrokeDelay 200 into a macro named $onInit and again see what’s going on in keyboardchecker.

Hrm, this is mysterious:

In the Agent, the modifier is set to LCmd.

But at the keyboardchecker site, when I use mod-D, it shows up as Option-Tab!

If I use the regular Cmd-Tab at that site, it shows up as expected. (Well, it just highlights Command – not the tab, because I think the OS intercepts it first.)

That’s at least a lead!

Would you please share your UserConfig and provide instructions to reproduce the above so that I can try to reproduce it on my side?

Oh dear.

I just noticed that my UHK was using my Linux keymap, not my macOS one. I just switched to that keymap…and all is well.

So, false alarm, I guess.

Now my question is: how can I get my keyboard to magically detect it’s connected to a Mac, or Linux machine? I’m guessing that’s not possible.

But, can I at least set the “QWERTY for Mac” keymap to the default (since that’s what the keyboard is plugged into, and I very rarely move it). I don’t see how to do that in the Agent.

1 Like

Default is set by the star.

As for os detection, it is not possible to do automatically on uhk side.

The recommended workaround is to create an “init” keymap that serves only as a keymap picker and set it as a default keymap. This way whenever you connect the keyboard, you have to deliberately choose either the mac keymap or the linux keymap - by tapping either say left space or right space. It looks a bit awkward, but in practice it is a minimal an automatic action that ensures that you always end up in the correct keymap.

A not recommended solution is to set up a hook on os side that will tell uhk to switch to the relevant keymap whenever the uhk gets connected - there are scripts for that, or for executing a custom macro command over usb. (Let me know if you want more details about the scripts.)

I feel dumb, but: how do I change the star? I tried clicking and so on and I can’t change it.

First, select the Keymap in the left panel, and then click the big star in the main central pane.