mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-08-02 02:41:11 -04:00
SDL2 leaves text input enabled for the whole session, so AppKit routes key events through NSTextInputContext even in normal gameplay. Holding a key with diacritics -- W, A, S, E -- opened the accent chooser over the game instead of repeating the key. Register ApplePressAndHoldEnabled=NO before SDL_Init brings up NSApplication. The registration domain is process-scoped, so the user's saved preferences are untouched; if a global setting explicitly enables press-and-hold, fall back to this application's own domain, which outranks NSGlobalDomain. Needs an Objective-C++ shim, wired into both wowee and wowee_editor since both compile window.cpp.