From b1bb91a2800dd85a46b8fddbdf28d59ff78b5abe Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 30 Sep 2025 18:59:41 +0200 Subject: [PATCH] Fix typo in a comment and reformat recently added code Correct copy-and-pasto. See #25844. --- src/osx/iphone/window.mm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/osx/iphone/window.mm b/src/osx/iphone/window.mm index 4dff615109..2b19fdf2b8 100644 --- a/src/osx/iphone/window.mm +++ b/src/osx/iphone/window.mm @@ -30,7 +30,7 @@ // ---------------------------------------------------------------------------- // These functions are called from the code but are also useful in the debugger -// (especially wxDumpNSView(), as selectors can be printed out directly anyhow), +// (especially wxDumpUIView(), as selectors can be printed out directly anyhow), // so make them just static instead of putting them in an anonymous namespace // to make it easier to call them. @@ -904,11 +904,16 @@ long wxOSXTranslateKey( UIPress* press, int eventType ) retval = '0'; break; default: - if ( keyCode >= UIKeyboardHIDUsageKeyboardA && keyCode <= UIKeyboardHIDUsageKeyboardZ ) { + if ( keyCode >= UIKeyboardHIDUsageKeyboardA && keyCode <= UIKeyboardHIDUsageKeyboardZ ) + { retval = 'a' + (keyCode - UIKeyboardHIDUsageKeyboardA ); - } else if ( keyCode >= UIKeyboardHIDUsageKeyboard1 && keyCode <= UIKeyboardHIDUsageKeyboard9 ) { + } + else if ( keyCode >= UIKeyboardHIDUsageKeyboard1 && keyCode <= UIKeyboardHIDUsageKeyboard9 ) + { retval = '1' + (keyCode - UIKeyboardHIDUsageKeyboard1 ); - } else if ( keyCode >= UIKeyboardHIDUsageKeyboardF1 && keyCode <= UIKeyboardHIDUsageKeyboardF12 ) { + } + else if ( keyCode >= UIKeyboardHIDUsageKeyboardF1 && keyCode <= UIKeyboardHIDUsageKeyboardF12 ) + { retval = WXK_F1 + (keyCode - UIKeyboardHIDUsageKeyboardF1 ); } break; @@ -1050,7 +1055,8 @@ void wxWidgetIPhoneImpl::keyEvent( NSSet *presses, UIEvent* event, WXWidget slf, m_wxPeer->OSXHandleKeyEvent(wxevent); } - if ( !handled ) { + if ( !handled ) + { wxOSX_PressesHandlerPtr superimpl = (wxOSX_PressesHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd]; superimpl(slf, (SEL)_cmd, presses, event); }