From bc2dac5a7cf8962cb56d619c55e58c8c6c8591da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Qian=20Qian=20=22Cubik=22=E2=80=8E?= Date: Thu, 21 Nov 2024 08:06:29 -0500 Subject: [PATCH] Add macOS Keycode Fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Qian Qian "Cubik"‎ --- patches/series | 1 + .../macos/fix-keyboard-code-conversion.patch | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 patches/ungoogled-chromium/macos/fix-keyboard-code-conversion.patch diff --git a/patches/series b/patches/series index 09f0fd6..d3aff88 100644 --- a/patches/series +++ b/patches/series @@ -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 diff --git a/patches/ungoogled-chromium/macos/fix-keyboard-code-conversion.patch b/patches/ungoogled-chromium/macos/fix-keyboard-code-conversion.patch new file mode 100644 index 0000000..f8cec6e --- /dev/null +++ b/patches/ungoogled-chromium/macos/fix-keyboard-code-conversion.patch @@ -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) {