-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with shortcut using character-above-tab-key on Monterey #143
Comments
That's a tricky one. I'll see if I can reproduce it. |
@Kentzo any update? 🙇♂️ |
I'm one of the international layout users @lwouis mentions above - anything we can do to help with testing this solution? |
Alternative workaround (not sure of code quality): +++ Pods/ShortcutRecorder/Library/SRKeyCodeTransformer.m
@@ -165,5 +165,16 @@
if (aKeyCode == SRKeyCodeNone)
return @"";
+
+ NSDictionary<NSNumber *, NSArray<NSNumber *> *> *layoutExclusiveKeyCodes = @{
+ @(kKeyboardISO): @[@(SRKeyCodeISOSection)],
+ @(kKeyboardJIS): @[@(SRKeyCodeJISYen), @(SRKeyCodeJISUnderscore), @(SRKeyCodeJISKeypadComma), @(SRKeyCodeJISEisu), @(SRKeyCodeJISKana)],
+ };
+ PhysicalKeyboardLayoutType currentLayoutType = KBGetLayoutType(LMGetKbdType());
+
+ for (NSNumber *layoutType in layoutExclusiveKeyCodes) {
+ if ([layoutType intValue] != currentLayoutType && [layoutExclusiveKeyCodes[layoutType] containsObject:@(aKeyCode)])
+ return @"";
+ }
anImplicitModifierFlags &= SRCocoaModifierFlagsMask;
anExplicitModifierFlags &= SRCocoaModifierFlagsMask; |
I'll look into this next week. |
I tried both fixes above (both are from @decodism) and it seems to fix the issue. My test use-case was to switch my The shortcut then worked in AltTab. Without the diff above, it didn't trigger at all, and after restarting AltTab, the shortcut UI would show the weird long underscore (see screenshot in the OP). So, I'm interested in integrating this fix, but I'm not sure which of the 2 approaches is better, and if they don't introduce regressions elsewhere. I'm not able to understand the inner workings of |
The root cause of the bug seems to lie in how: Here is the diff (left is with the fix in the OP; right is current state): Looking at the affected keys, I tried to use |
Hi!
Lots of AltTab users with non-English keyboards are reporting that shortcuts using the key above
tab
are not working since they upgraded to Monterey.You can see the in-depth conversations on the ticket here: lwouis/alt-tab-macos#1190
Here are some examples:
Etc, it goes on, many cases with various behaviors. It seems something changed with Monterey that broke ShortcutRecorder.
Someone claimed to have found a patch to SR which fixes the issue:
I advised them to show you this, and ask for your expert opinion. I think they never did it. Here's their explanation of the fix:
Could you please tell me if this fix seems to make sense? I would like to use that in AltTab if it fixes the issue for people, but since I don't have non-English keyboards around, I won't be able to QA myself and confirms it works. That's why I would like to get your opinion before doing anything.
Thank you!
The text was updated successfully, but these errors were encountered: