Skip to content

Conversation

MrStahlfelge
Copy link
Member

@MrStahlfelge MrStahlfelge commented Aug 19, 2020

Since iOS 13.5, iOS gives us real key events from hardware keyboards. I've added that to our robovm backend.
It is downwards compatible, older iOS versions since 9 have the used callback but don't call it (it was used on tvOS only) and therefore on older iOS versions nothing happens. But the game must be build with iOS SDK 13.5 or newer, that means robovm 2.3.10 is needed and therefore the dependency changed.

Since key event handling is used very different in libGDX (keys vs keyTyped, polling vs event handling, not to speak about Scene2d text fields, I was not able to test every type of key input. However, I tested with my game, with InputTest and SoftKeyboardTest on iOS 12, 13.2 and 13.4. As this is an addition, situation is in any case better with than without it. :-)

EDIT: Can be tested conveniently on Simulator.

Hint: iOS 14 will add the ability to access hardware keyboard connection state and handle mouse events/lock mouse cursor as well.

@noblemaster
Copy link
Member

That makes sense. Unless there are any objections +1 to have this merged.

Maybe best to update the CHANGES file also incl. that RoboVM 2.3.10+ is required.

@MrStahlfelge
Copy link
Member Author

Reason why I normally don't change CHANGES is that it typically causes conflicts to the PRs, especially because no one knows if or when a PR is to be merged.

In this case I additionaly don't know if it is acceptable to depend on a snapshot. I would like it more to depend on a stable 2.3.10 (which could be done soon because in my experiences the current snapshot version is a good release candidate), but that's something @Tom-Ski should decide and comment on.

@noblemaster noblemaster merged commit 2917985 into libgdx:master Aug 27, 2020
@noblemaster
Copy link
Member

It's merged! Please update the CHANGES file to and indicate that RoboVM 2.3.10+ is required. - Thanks! 👍

@MrStahlfelge MrStahlfelge deleted the ios-keyevents branch August 27, 2020 13:59
@MrStahlfelge
Copy link
Member Author

Thanks, done!

@PokeMMO
Copy link
Contributor

PokeMMO commented Aug 30, 2020

<property name="robovm-version" value="2.3.8"/>
was not updated, which is causing ant/maven based build to fail.

@MrStahlfelge
Copy link
Member Author

MrStahlfelge commented Aug 30, 2020

I am sorry, was not aware of a second definition. There are still some more.

@MrStahlfelge
Copy link
Member Author

The dependencies are updated, unfortunately using snapshots does not work in fetch.xml :(
It points only to release repo, but changing this to snapshot repo would not help because of the timestamps in the snapshots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants