From e7651d52bec1ad29cfd03abbfdf6b795acb6572e Mon Sep 17 00:00:00 2001 From: Chaoji Li Date: Mon, 19 Oct 2020 12:08:35 +0800 Subject: [PATCH] Use Command-` as escape For some keyboards, there is no escape key at all. --- dospad.xcodeproj/project.pbxproj | 6 +++--- dospad/Shared/KeyboardSpy.m | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dospad.xcodeproj/project.pbxproj b/dospad.xcodeproj/project.pbxproj index 723677a4..7c231f31 100755 --- a/dospad.xcodeproj/project.pbxproj +++ b/dospad.xcodeproj/project.pbxproj @@ -3807,7 +3807,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "Resources/iDOS-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MARKETING_VERSION = 2.0.1; + MARKETING_VERSION = 2.1; OTHER_LDFLAGS = ( "-framework", Foundation, @@ -3839,7 +3839,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "Resources/iDOS-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MARKETING_VERSION = 2.0.1; + MARKETING_VERSION = 2.1; OTHER_LDFLAGS = ( "-framework", Foundation, @@ -3987,7 +3987,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "Resources/iDOS-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MARKETING_VERSION = 2.0.1; + MARKETING_VERSION = 2.1; OTHER_LDFLAGS = ( "-framework", Foundation, diff --git a/dospad/Shared/KeyboardSpy.m b/dospad/Shared/KeyboardSpy.m index f415a0b8..b6e9056c 100644 --- a/dospad/Shared/KeyboardSpy.m +++ b/dospad/Shared/KeyboardSpy.m @@ -94,6 +94,7 @@ - (id)initWithFrame:(CGRect)frame @"F12": @(SDL_SCANCODE_F12), @"ALT": @(SDL_SCANCODE_LALT), @"CTRL": @(SDL_SCANCODE_LCTRL), + @"ESC": @(SDL_SCANCODE_ESCAPE), }]; // For text selection in dos programs @@ -141,6 +142,7 @@ - (id)initWithFrame:(CGRect)frame // and we won't get those key commands. // Therefore we provide an alternative way to generate function // keys. + [self registerCommandPrefix:@"`" title:@"ESC"]; [self registerCommandPrefix:@"1" title:@"F1"]; [self registerCommandPrefix:@"2" title:@"F2"]; [self registerCommandPrefix:@"3" title:@"F3"]; @@ -151,6 +153,8 @@ - (id)initWithFrame:(CGRect)frame [self registerCommandPrefix:@"8" title:@"F8"]; [self registerCommandPrefix:@"9" title:@"F9"]; [self registerCommandPrefix:@"0" title:@"F10"]; + [self registerCommandPrefix:@"-" title:@"F11"]; + [self registerCommandPrefix:@"=" title:@"F12"]; [self registerCommandPrefix:@"c" title:@"CTRL"]; [self registerCommandPrefix:@"x" title:@"ALT"]; return self;