From d8cb826b1951e08d04fb3a790daf0e4a62db114c Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 7 Jul 2019 11:06:28 +0100 Subject: IOS7: Add back mapping of LF character to the Return key This is necessary for properly identifying the Return key pressed from the software or a hardware keyboard, and this was erronously removed in commit e5709ed. --- backends/platform/ios7/ios7_osys_events.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'backends/platform') diff --git a/backends/platform/ios7/ios7_osys_events.cpp b/backends/platform/ios7/ios7_osys_events.cpp index a7e007ea42..0387503739 100644 --- a/backends/platform/ios7/ios7_osys_events.cpp +++ b/backends/platform/ios7/ios7_osys_events.cpp @@ -389,6 +389,12 @@ void OSystem_iOS7::handleEvent_keyPressed(Common::Event &event, int keyPressed) int ascii = keyPressed; //printf("key: %i\n", keyPressed); + // Map LF character to Return key/CR character + if (keyPressed == 10) { + keyPressed = Common::KEYCODE_RETURN; + ascii = Common::ASCII_RETURN; + } + event.type = Common::EVENT_KEYDOWN; _queuedInputEvent.type = Common::EVENT_KEYUP; -- cgit v1.2.3