Skip to content

Commit

Permalink
Add macOS Keycode Fix
Browse files Browse the repository at this point in the history
Signed-off-by: Qian Qian "Cubik"‎ <[email protected]>
  • Loading branch information
Cubik65536 committed Nov 21, 2024
1 parent 4fd97c7 commit bc2dac5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ ungoogled-chromium/macos/fix-runTsc-log-info.patch
ungoogled-chromium/macos/no-unknown-warnings.patch
ungoogled-chromium/macos/mark-remap_alloc-used.patch
ungoogled-chromium/macos/re2-include-fix
ungoogled-chromium/macos/fix-keyboard-code-conversion.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- a/ui/events/keycodes/keyboard_code_conversion_mac.mm
+++ b/ui/events/keycodes/keyboard_code_conversion_mac.mm
@@ -48,6 +48,11 @@
return base::IsValidCodepoint(c) && !base::IsUnicodeControl(c);
}

+#if (__MAC_OS_X_VERSION_MAX_ALLOWED < 150000)
+constexpr int kVK_RightCommand = 0x36;
+constexpr int kVK_ContextualMenu = 0x6E;
+#endif
+
bool IsKeypadOrNumericKeyEvent(NSEvent* event) {
// Check that this is the type of event that has a keyCode.
switch (event.type) {

0 comments on commit bc2dac5

Please sign in to comment.