Created
March 9, 2021 19:53
-
-
Save knazarov/3c7f1482c9904c953a39c69699c74252 to your computer and use it in GitHub Desktop.
A qemu cocoa patch to enable right Ctrl (useful when remapping Caps Lock -> Ctrl)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ui/cocoa/view.m b/ui/cocoa/view.m | |
index a251a737322..1a2fc0e0970 100644 | |
--- a/ui/cocoa/view.m | |
+++ b/ui/cocoa/view.m | |
@@ -645,6 +645,13 @@ - (bool) handleEventLocked:(NSEvent *)event | |
} | |
return true; | |
+ case kVK_RightControl: | |
+ if (!!(modifiers & NSEventModifierFlagControl)) { | |
+ [self toggleModifier:Q_KEY_CODE_CTRL_R]; | |
+ } | |
+ return true; | |
+ | |
+ | |
case kVK_Option: | |
if (!!(modifiers & NSEventModifierFlagOption)) { | |
[self toggleModifier:Q_KEY_CODE_ALT]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment