ladybird/UI/AppKit
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
..
Application UI/AppKit: Auto-focus location bar when opening new tabs on macOS 2025-11-26 10:47:37 +01:00
Interface UI/AppKit: Store the original key-down event for WebContent processing 2025-11-27 13:51:45 +00:00
Utilities LibWeb+LibWebView+WebContent+UI: Port the document title to UTF-16 2025-08-02 10:10:14 -07:00
CMakeLists.txt LibWebView+UI: Add structures to hold context menu and action data 2025-09-11 14:23:45 -04:00
main.mm Everywhere: Rename serenity_main to ladybird_main 2025-07-08 09:17:16 -04:00
module.modulemap Everywhere: Move the Ladybird folder to UI 2024-11-10 12:50:45 +01:00