New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve iOS inputs #1706
Improve iOS inputs #1706
Conversation
This adds buttons for some keys that are not present on the iOS keyboard, such as the function and arrow keys, as well as a GMM key.
Those keys are not present on the virtual keyboard accessory view. This should fix bug #10314: LSL7: Unable to open Xqwsts's locker on iOS.
Also use the pinch gesture to show/hide the keyboard. Previously it was using the three fingers swipe up and dowm, which is now mapped to arrow keys.
Nice! I like the fact that you’ve removed the hardcoded special button assignments. Pinch works fine for the main menu. However, why would you want to map three finger swipes to arrow keys? Won’t two finger swipes work for these? |
This allows to have more buttons than what can be displayed on the screen, and now to have all the same buttons on iPhone and on iPad.
I have now added a scrollview so that we can have all the buttons on iPhone as well. And I have also added a button for the Tab key as somebody mentioned on the forum that it is needed to display the inventory in KQ1.
Those are already used for other actions:
|
OK. It's time to see if buildbot likes this. |
Any way to turn off the input accessory view if a physical Bluetooth or official Apple keyboard cover is attached? I am finding the input accessory view blocks a few rows of the bottom of the game output when my iPad is in landscape mode. |
Good question. Since I don't have any hardware keyboard for iPad I didn't think of that. So currently there is no way to do it. We will need to add some code to detect if an external keyboard is in use. I will take a look (hopefully that is something I should be able to test with the iOS simulator). |
Not sure if you have any old generic Bluetooth keyboard - if so, you’ll be able to pair it with the iPad. Really appreciate you taking a look at this. Pre-input accessory view everything was actually working great with a bluetooth keyboard... but I went with the type cover because Scummvm’s iOS software keyboard functionality wasn’t cutting it for AGI/SCI. Might not have had to do that had your commit been in a few months sooner! <grin>, but the type cover really does provide a great iPad experience with ScummVM.
…________________________________
From: Thierry Crozat <notifications@github.com>
Sent: Friday, July 5, 2019 3:25:09 PM
To: scummvm/scummvm
Cc: Purduecoz; Comment
Subject: Re: [scummvm/scummvm] Improve iOS inputs (#1706)
Good question. Since I don't have any hardware keyboard for iPad I didn't think of that. So currently there is no way to do it. We will need to add some code to detect if an external keyboard is in use. I will take a look (hopefully that is something I should be able to test with the iOS simulator).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fscummvm%2Fscummvm%2Fpull%2F1706%3Femail_source%3Dnotifications%26email_token%3DADSKJK5RSC55KNK7XFGRBG3P56U2LA5CNFSM4H2Z4MP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZKIHQY%23issuecomment-508855235&data=02%7C01%7C%7C6e7b5ed5e741404afdde08d70186e19a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636979551125511686&sdata=oIfwBvUOruVxzxII9OzTrAX61PfKDh7pPCXlLPXMLhc%3D&reserved=0>, or mute the thread<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADSKJK7TF7XDPLKQNE6LMP3P56U2LANCNFSM4H2Z4MPQ&data=02%7C01%7C%7C6e7b5ed5e741404afdde08d70186e19a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636979551125521697&sdata=bF823yT25bO8vHHz78kjfxV%2FXLet41rz3hsZoGWSJ6k%3D&reserved=0>.
|
I forgot I had a bluetooth keyboard for my computer :-P |
Thank you! It's almost perfect... except the return button on the physical keyboard doesn't do anything, at least in the AGI and SCI interpreters. The parser line just sits there blinking at me. I'm thinking this may be a side effect of commit e5709ed? |
Right. I should have been a bit more careful when I removed all those mappings. Mapping |
Works brilliantly. Thank you for your contributions to the project! |
I am submitting this as a Pull Request to see if others have feedback before I merge this. I am in particular looking for feedback from iPhone users since I only have an iPad, and was only able to test iPhone using the simulator. I am planning to leave it open for one week and then merge.
The first commit adds an input accessory view to the keyboard, which allows to add one row of buttons.
Due to widths limitation, less buttons are added on iPhone than iPad.A scrollview is used so that we can have more buttons than fits the screen.iPhoneReturn keyF1 to F10 keysHere is a screenshot for iPad:
The second commit removes the mapping of some keys to the return and F1 to F10 keys since those are now available in the keyboard. In particular this removes the mapping of the
dash
character toF1
and fixes bug #10314: LSL7: Unable to open Xqwsts’ locker on iOS.The third commit change the gesture to show and hide the keyboard from a three finger swipe up/down to a pinch in/out. This allows to map the three finger swipes gesture to arrow keys instead. This fixes bug #5914: swipe to simulate arrow keys doesn't work. One finger swipes are not available as this conflicts with moving the cursor in touchpad mode.