F Keys with smart keyboard...how?

Subforum for discussion and help with ScummVM's iPhone port

Moderator: ScummVM Team

Post Reply
Spiraljacobs
Posts: 4
Joined: Mon Mar 21, 2022 9:14 pm

F Keys with smart keyboard...how?

Post by Spiraljacobs »

What are the shortcuts for F keys with the smart keyboard attached? Been playing Space Quest 2, and need to press F6, and...no idea how!
Thanks!
User avatar
criezy
ScummVM Developer
Posts: 955
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Re: F Keys with smart keyboard...how?

Post by criezy »

Do you mean that the Fn keys do not work when you try to use them? Or does the smart keyboard not have Fn keys at all?

When I introduced the virtual keyboard bar to add Fn keys, the bar was initially present also when using a physical keyboard (but the rest of the virtual keyboard was not). However users requested that it be removed as it was hiding a small portion of the screen at the bottom and was apparently not useful (and it is indeed not very useful when using a keyboard that has those keys as well, unless for some reason they are not working).

The picture below shows the bar I am speaking about at the top of the virtual keyboard.
Following those user requests the bar now no longer appears when using a physical keyboard.

There is no shortcuts for the Fn keys. So if those are not working or not present on a Smart Keyboard then your only option currently would be to unplug/disconnect the smart keyboard so that the virtual keyboard and its additional bar with the Fn keys appears and can be used.

And it would also be good to report the issue on https://bugs.scummvm.org, so that we can work on it and propose a solution. If the issue is that the keys are not working, then I might know what is wrong (we had a similar issue recently with the arrow keys not working when using iOS 15 or above - https://bugs.scummvm.org/ticket/12942). If the keys are not present at all on that keyboard, then maybe we could consider adding an option so that the keyboard bar can be used together with a physical keyboard.
input_accessory.png
input_accessory.png (320.16 KiB) Viewed 8540 times
Spiraljacobs
Posts: 4
Joined: Mon Mar 21, 2022 9:14 pm

Re: F Keys with smart keyboard...how?

Post by Spiraljacobs »

I have the Logitech combo touch keyboard which does not have function keys at all, and so, if the soft keyboard can’t be shown, I can’t actually progress in parts (Space Quest 2 F6 for example).
I think a good compromise would be either:
1) allow remapping of f keys to a key or key combination of users choice
2) a key mapping to allow a smaller soft keyboard with just the F keys to show.
Or, finally,
3) a key to show soft keyboard as it is even if hard keyboard is attached.

I’m not a iOS dev, but I’m a developer, have been for ages, and I own a Mac. Wonder if I can help.
Is the soft keyboard custom? Is it possible to have a soft keyboard with only F keys that could be shown via key press when hard keyboard is connected?
Spiraljacobs
Posts: 4
Joined: Mon Mar 21, 2022 9:14 pm

Re: F Keys with smart keyboard...how?

Post by Spiraljacobs »

I’ll submit on GitHub later on, and might pull it down/see if I can built it locally for a start.
User avatar
criezy
ScummVM Developer
Posts: 955
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Re: F Keys with smart keyboard...how?

Post by criezy »

Help would definitely be welcome. :)

Key mapping is available in some engines. But this needs to be implemented engine by engine, and this is not currently done for SCI games I think. Maybe that will happen in the future. That is also probably one of the engines where it might be difficult to implement.

I think at this point the easiest approach would be to add a gesture or key mapping to show or hide the input accessory bar. This is the custom bar we have added at the top of the soft keyboard (the one with the F keys and arrow keys you can see it in the image I posted previously).

Here is the commit that hides that bar when an external keyboard is connected: https://github.com/scummvm/scummvm/commit/cfd66173bad8
This should give you an idea of the part of the code that would need to be changed.

Something else I had in mind was to add an options widget for the iOS backend, and that way we could control the visibility of this bar with a checkbox. The ability to add custom options for backends was added in https://github.com/scummvm/scummvm/pull/2591 The second commit in that pull request shows how to do it using the Android backend as an example.
Spiraljacobs
Posts: 4
Joined: Mon Mar 21, 2022 9:14 pm

Re: F Keys with smart keyboard...how?

Post by Spiraljacobs »

Sorry I've been late on this, just busy.
Not forgot about it :)
Post Reply