ladybird/UI/AppKit/Interface
Timothy Flynn bf75f52ce0 UI/AppKit: Store the original key-down event for WebContent processing
When a shortcut is an alternative key, macOS first fires a key event for
the primary key. Then if it is not handled, it fires an event for the
alternative key. For example, we see these two events in a row when we
press cmd and =/+:

    NSEvent: type=KeyDown flags=0x100108 chars="=" keyCode=25
    NSEvent: type=KeyDown flags=0x100108 chars="+" keyCode=24

For dead key processing, we don't handle these events right away. By the
time we get to doCommandBySelector, when we call [NSApp currentEvent],
we see the following events:

    NSEvent: type=KeyDown flags=0x100108 chars="=" keyCode=24
    NSEvent: type=AppDefined flags=0

The AppDefined event is internally posted by our event loop. So it seems
we cannot rely on currentEvent being the key-down event we are looking
for.

Instead, we can store the key-down event that we last saw.
2025-11-27 13:51:45 +00:00
..
Autocomplete.h UI/AppKit: Implement an autocomplete view for the location bar 2025-04-02 08:52:45 -04:00
Autocomplete.mm UI/AppKit: Prevent autocomplete popover from stealing focus 2025-11-24 11:49:24 +01:00
Event.h Everywhere: Move the Ladybird folder to UI 2024-11-10 12:50:45 +01:00
Event.mm LibURL: Port create_with_file_scheme to Optional 2025-04-19 07:18:43 -04:00
InfoBar.h Everywhere: Fix even more typos 2025-08-27 08:48:01 +02:00
InfoBar.mm Everywhere: Fix even more typos 2025-08-27 08:48:01 +02:00
LadybirdWebView.h UI/AppKit: Support dead keys on MacOS 2025-10-29 12:38:59 -04:00
LadybirdWebView.mm UI/AppKit: Store the original key-down event for WebContent processing 2025-11-27 13:51:45 +00:00
LadybirdWebViewBridge.cpp LibWeb+UI+WebContent: Pipe pinch events from AppKit UI to WebContent 2025-10-10 15:37:45 +02:00
LadybirdWebViewBridge.h LibWeb+UI+WebContent: Pipe pinch events from AppKit UI to WebContent 2025-10-10 15:37:45 +02:00
LadybirdWebViewWindow.h Everywhere: Move the Ladybird folder to UI 2024-11-10 12:50:45 +01:00
LadybirdWebViewWindow.mm Everywhere: Move the Ladybird folder to UI 2024-11-10 12:50:45 +01:00
Menu.h LibWebView+UI/AppKit: Display icons in the macOS UI on Tahoe 2025-09-17 11:29:01 +01:00
Menu.mm LibWebView+UI: Generate action to enable/disable DevTools 2025-09-18 07:27:24 -04:00
Palette.h Everywhere: Move the Ladybird folder to UI 2024-11-10 12:50:45 +01:00
Palette.mm LibWebView+Services+UI: Move process helpers to LibWebView 2024-11-11 07:35:43 -05:00
SearchPanel.h Everywhere: Move the Ladybird folder to UI 2024-11-10 12:50:45 +01:00
SearchPanel.mm Everywhere: Move the Ladybird folder to UI 2024-11-10 12:50:45 +01:00
Tab.h UI/AppKit: Remove the built-in Inspector widget 2025-03-15 19:09:40 +01:00
Tab.mm LibWebView+UI: Add an Application method to open a URL in a new tab 2025-09-18 07:27:24 -04:00
TabController.h LibWebView+UI: Add an Application method to open a URL in a new tab 2025-09-18 07:27:24 -04:00
TabController.mm UI/AppKit: Auto-focus location bar when opening new tabs on macOS 2025-11-26 10:47:37 +01:00