hiding the soft keyboard

64 views
Skip to first unread message

Eidosk

unread,
Sep 19, 2015, 6:35:31 AM9/19/15
to HaxeFlixel
Hello,
I am creating a typing game for android and I am trying to hide the soft keyboard at the end of the game.

I was able to show it with:
FlxG.stage.requestSoftKeyboard();

How can I hide it?

thanks in advance for your help!

Gama11

unread,
Sep 19, 2015, 6:41:53 AM9/19/15
to HaxeFlixel
This is more of an OpenFL question, so you might have more luck in the OpenFL forums.

MegaLeon

unread,
Sep 21, 2015, 8:23:51 AM9/21/15
to HaxeFlixel
Have you tried calling FlxG.stage.focus = null? Not an expert myself but that's what I found after some short googling.

Siôn Ll

unread,
Sep 23, 2015, 2:02:59 PM9/23/15
to HaxeFlixel

I recently spent ages trying to figure out the same problem.

FlxG.stage.focus = null
didn't work for me, it paused the application on the Android device and I couldn't resume, what did work for me was:

if(event.keyCode == Keyboard.ENTER) {
FlxG.stage.focus = FlxG.stage;

Eidosk

unread,
Oct 29, 2015, 6:08:46 PM10/29/15
to HaxeFlixel
Hi guys,
I found a solution that works for me on Android, I haven't tested iOS:

FlxG.stage.__dismissSoftKeyboard();

Hope that helps!
Reply all
Reply to author
Forward
0 new messages