Describe the bug
Pressing the hyperkey (In my case Caps-lock) in VSCode makes BTT unresponsive to any other keyboard shortcuts until a different (any) application is focused. Sometimes it might require a few presses, but it seems pretty reliably reproducible.
More details:
- I have disabled all extensions in VSCode, issue still reproduces
- I have hyperkey set to press "escape" on release, disabling this has no effect
- On an older version (maybe 1 month ago) it did this seemingly only if the green caps lock key turned on briefly, but I also noticed that the new version never has the LED on my capslock turn on (and seems to have an otherwise more reliable meta-key).
- I upgraded to the latest alpha version: 4.994 at time of posting
- The Meta-key continues to work within VSCode, it's other better touch tool shortcuts (I have many, such as shortcuts to launch other applications or window snapping none of which work when it gets in this state)
- Getting into the error state in VSCode, switching to Cursor getting into the error state again, and then switching back to VSCode I find myself no longer in the error state.
Device information:
- Type of Mac: Apple M3 Max
- macOS version: 15.1.1 (24B91)
- BetterTouchTool version: 4.994 (latest alpha)
Could you check whether 4.995 helps with this? (uploading now)
I tried to reproduce but was unable to, but I might have an idea what could cause it.
Just tried updating, it didn't work unfortunately (Restarted both VSCode + BTT)
Also I wanted to say how much I appreciate Better Touch Tool - quite literally my favorite app, I constantly evangelize it, and I still remember when you helped on these forums back in 2018!
Logs I pulled here:
Summary
default |
00:12:51.761766-0800 |
BetterTouchTool |
enable hyper |
default |
00:12:51.878284-0800 |
BetterTouchTool |
sending ctrl up |
default |
00:12:51.878711-0800 |
BetterTouchTool |
sending shift up |
default |
00:12:51.879349-0800 |
BetterTouchTool |
sending cmd up |
default |
00:12:51.891377-0800 |
BetterTouchTool |
already 119 |
default |
00:12:51.891531-0800 |
BetterTouchTool |
already 19 |
error |
00:12:59.156898-0800 |
BetterTouchTool |
cannot open file at line 49437 of [1b37c146ee] |
error |
00:12:59.156924-0800 |
BetterTouchTool |
os_unix.c:49437: (2) open(/private/var/db/DetachedSignatures) - No such file or directory |
I pressed the meta key, and then tried to perform a keybinding that should have launched another application.
Let me know if I can pull any other logs!
Edit: Pulling the logs again, with a clearer separation between the three key presses. First timestamp, working key combination to launch application, second timestamp pressing the metakey once, no logs associated with time period where I tried to press the keyboard shortcut to launch the same application.
Summary
default |
00:20:13.609641-0800 |
BetterTouchTool |
performing 177 |
default |
00:20:13.609833-0800 |
BetterTouchTool |
triggering action Show / Hide Specific Application - 74B06A81-193F-4AA5-A527-4F6741044CF9 |
default |
00:20:13.613684-0800 |
BetterTouchTool |
activate window with id 184 |
default |
00:20:13.614655-0800 |
BetterTouchTool |
SetFrontProcess: asn=0x0-0x7a07a options=1 |
default |
00:20:13.621711-0800 |
BetterTouchTool |
SetFrontProcess: asn=0x0-0x7a07a options=1 |
default |
00:20:13.626266-0800 |
BetterTouchTool |
did activate 1 |
default |
00:20:13.626422-0800 |
BetterTouchTool |
already replied 103 |
default |
00:20:23.598990-0800 |
BetterTouchTool |
enable hyper |
default |
00:20:23.655898-0800 |
BetterTouchTool |
sending ctrl up |
default |
00:20:23.656461-0800 |
BetterTouchTool |
sending shift up |
default |
00:20:23.657007-0800 |
BetterTouchTool |
sending cmd up |
default |
00:20:23.670274-0800 |
BetterTouchTool |
already 119 |
default |
00:20:23.670485-0800 |
BetterTouchTool |
already 19 |
default |
00:20:32.043343-0800 |
BetterTouchTool |
The Mac is running on battery power. |
Weird, are you using the hyper key for any special functions in VSCode? (I just tried with line comments).
Do you know whether this only happens in vscode or also in other apps?
Oh wow - I just noticed that it does occur in every app I have, including native non-electron based ones (finder, iterm2, chrome, iphone mirroring). VSCode has a few shortcuts tied to the hyper key, but I can activate the issue by just pressing the hyperkey down and doing nothing else.
Thinking of other things weird on my computer, I also overrode ~/Library/KeyBindings/DefaultKeyBinding.dict
. Removing that and reloading applications, including BTT (but not rebooting) doesn't seem to have made a difference.
Summary
{
"@^\UF701" = "noop:";
"@^\UF702" = "noop:";
"@^\UF703" = "noop:";
"@~^\UF701" = "noop:";
}
I can also try and shut down other applications and see if that helps, if you have any advice on things to help narrow it down I'm all ears!
One more thing, does it prevent all hyper key actions in BTT or is it only happening with the "Show / Hide Specific Application" action?
Can you try e.g. with the "show hud" action?
I just tried with the "show hud" action!
Once I get into the non-responsive state the show hud action does not work unless I make the HUD action such that it's triggered via the hyperkey (I can get into the state most reliably by tapping the caps lock key and doing nothing else, but it also seems to be in this state if I just use the hyper-key at all, like using it to show the HUD action).
The application I'm using otherwise seems to work fine, native shortcuts (like CMD-L in chrome) work fine (which notably don't work as intended if I hold down additional meta keys)
(The "Show / Hide Specific Application" is also not a hyper-key shortcut)
Thanks for the details, I think I found the issue and will upload a fix in ~30min
1 Like
4.9951 is now uploading, would be great if you could test once it is available!
1 Like
I'm on 4.9954 and that has fixed it! You're a hero Andreas!
Heads-up that I did start running into a different issue where after some time the capslock key would work as both the meta key and as the "normal" caps lock key. I'm not sure what triggered it.
I just remapped the caps lock key to escape in the system settings, which has been working great for me because the meta key still works as expected.
(To be clear - everything is working 100% after also changing the mapping in the system settings - just wanted you to be aware!)
Ok - I declared victory too soon. I can also start a new thread.
When I have the caps lock key act as a caps lock key and as a hyper key (that acts as escape), it can get into a state after which it consistently acts as a caps lock key (toggling the caps lock state) AND acts the hyper key + escape key.
If I instead set my system settings to treat the caps lock as an escape key, then it works most of the time, but sometimes doesn't properly trigger the escape key.
The workaround I have now (not sure if it'll run into major issues) is that I've remapped hyperkey + escape to click the "regular" escape key (in addition to the system settings being set to caps lock --> Escape). This seems to reliably have my caps lock key work as an escape key, but it does mean that anytime I trigger a hyper-key combination escape is always clicked first.
I think I found the issue, can you try with 4.9993? (uploading now will be available in 5-10min)
The issue exhibits itself a bit differently now, it no longer gets into a state where pressing the caps lock key toggles it everytime - but:
- Longer presses seem to always be able to turn it on (at least when it gets into a bad state). Shorter presses sometimes turn it on when in this state (whereas all press durations seemed to turn them on/off before).
- a press of any duration seems to turn it off once caps lock is on.
Let me know if there are any logs I can pull / etc - thanks for continuing to look at this!
what kind of keyboard layout are you using (I have been using it without issues, thus I assume it’s something related to specific keyboard layouts)
For what it's worth - whatever you did in 4.9993 it does seem to be much harder to reproduce now. I was actually only able to get it into that state once when testing above (once it's in the bad state, caps-lock behaves as described above, where it's pretty unreliable). Now after restarting BTT - I can't seem to get it into that state at all. I originally was able to get it into that state (on build 4.9996) by pressing the hyperkey quickly a bunch.
Standard US keyboard layout (US English - ANSI I believe), either using the built in mac keyboard or the US magic keyboard.
Not sure what else in terms of weird stuff I might have. This is on my work computer, which ha additional monitoring software (Kandji, Crowdstrike), and I have some other tools (Ice, Flycut, Notion, Cleanshot, Cursor, VSCode, Discord) which could be interfering.
I also have a personal M3 Macbook Air I can try and reproduce this on (Don't have access to it right now though - will have to get back to you in a few days)
I also put this in my defaultKeybindings (~/Library/KeyBindings/DefaultKeyBinding.dict
):
{
"@^\UF701" = "noop:";
"@^\UF702" = "noop:";
"@^\UF703" = "noop:";
"@~^\UF701" = "noop:";
}
Which prevents "beeps" from Cmd+control+arrow in VSCode. I did try removing this at some point in my testing above FWIW (IIRC).
Including my full BTT configuration as well in case there's anything suspicious there. Sean Main.bttpreset (239.3 KB)
Given that I can't get a reliable repro anymore, it's probably solid enough for day to day use - but if it crops up in a reliable manner again, I can post back here!
It got into the state again when I woke up my laptop.
Both keyboards (magic and internal). Restarting my BTT reliably gets it out of this state state. Re-sleeping the computer seems to reliably get it into this state though (tried 3 times).
have you already tried the 4.9996 build? I added a reset after sleep there
Yeah - 4.9996 is the build that I've been testing.
It doesn't seem to happen 100% of the time when I sleep the computer, but pressing the caps lock when it's sleeping will always turn on the light and seemingly get it into this state.
Probably expected - but if I leave caps-lock in the "on" state and then restart better touch tool it will be stuck with caps-lock on (until I sleep the computer after which the caps-lock key toggles on presses and acts as a hyper key)
I had the same issue. Version 4.9999 appears to have resolved it.
Many thanks!! Great product!!!