Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / EditBox on Steam Deck

Author
Message
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 27th Aug 2023 07:48 Edited at: 27th Aug 2023 23:14
Is there a way that the editBox can automatically bring up the keyboard on the Steam Deck?

If that's possible I can get my game, Warlordocracy, verified for Steam Deck. Thanks.
[url]laughingcoyote.net[/url]
qweQua
2
Years of Service
User Offline
Joined: 24th Oct 2022
Playing:
Posted: 27th Aug 2023 19:33 Edited at: 27th Aug 2023 20:00
ShowGamepadTextInput(integer, integer, string, integer, string)
from the agk-steam plugin by adambiser i found here: https://github.com/adambiser/agk-steam-plugin/tree/master

parameters:
input mode - 0 normal, 1 password
is multiline - 0 single line, 1 multi line
description - what is the user inputing?
max characters - maximum characters

example in this file
https://github.com/adambiser/agk-steam-plugin/blob/master/Examples/Big%20Picture%20Mode/steam.agc
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 27th Aug 2023 23:14 Edited at: 28th Aug 2023 00:00
Very nice! Do you what string the Steam Deck will return when I use getDeviceBaseName()? Thanks.

EDIT: Or another way to test if it's on the Steam Deck so it knows whether to use fullscreen input or the standard editBox command I was using already.

EDIT #2: Nevermind, I think I got it. I might post another question later. I am still curious about a list of possible device names, because I can't find it anywhere.
laughingcoyote.net
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 28th Aug 2023 00:21 Edited at: 28th Aug 2023 00:29
I keep getting "1" for m$ after confirming on the Steam Deck, no matter what I input. I'm using the following code. I tried it with and without runCallbacks().

laughingcoyote.net
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 28th Aug 2023 02:11 Edited at: 28th Aug 2023 02:15
you might try GetDeviceBaseName() and GetDeviceType() and see if there's something unique about steam deck. i expect Linux for the base name but no idea about device type.

GetKeyboardExists() may also come in hand followed by a homemade OSK if all else fails but i know of no way to trigger the built-in OSK much less steam deck's.

please do share your findings, tho. you're the 2nd that i know of here that has the deck.
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 28th Aug 2023 02:14 Edited at: 28th Aug 2023 02:15
Thanks. I was stupid and forgot I could just test the device string.

I'm still trying to get the Steam keyboard to return the input string, though. It only returns "1".
laughingcoyote.net
qweQua
2
Years of Service
User Offline
Joined: 24th Oct 2022
Playing:
Posted: 28th Aug 2023 11:08 Edited at: 28th Aug 2023 11:15
what about the rest of the function from the demo


i don't see Steam.HasGamepadTextInputDismissedResponse() in your code? It might be important?
Also did you try directly running the demo to see if it works?
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 29th Aug 2023 03:39 Edited at: 29th Aug 2023 03:48
Can't compile the example because there's lots of commands it doesn't understand, even after importing Steam (addStatus, etc). But I also tried my code with the HasGamepadTextInputDismissedResponse(), and it's returning a blank string every time, unfortunately. The keyboard shows up, but I can't get it to return anything. I'll keep trying to get it to work tomorrow.
laughingcoyote.net
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 29th Aug 2023 04:02 Edited at: 29th Aug 2023 04:40
This code brings up the keyboard and I can type anything, but it always returns a blank string.



EDIT: I gotta upload the build to Steam every time in order to playtest, so it takes forever to try anything. I'll try again tomorrow.

EDIT #2: Oh nevermind. I just have to have Steam and Big Picture Mode open in the background and I can test it.

EDIT #3: Just found the whole project in the example, so I'll try that now.
laughingcoyote.net
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 29th Aug 2023 04:48 Edited at: 29th Aug 2023 04:49
So I just ran the entire project on Github and it appears it's a bug. The example always returns a blank string as well, unfortunately. Also, the Steam.IsSteamInBigPictureMode() doesn't work, so I just bypassed it.

The keyboard appears, I can type in whatever, but it just returns a blank string.
laughingcoyote.net
adambiser
AGK Developer
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 29th Aug 2023 15:04 Edited at: 29th Aug 2023 15:40
IsSteamInBigPictureMode appears to work. You have to run the app from the Steam client for it to detect things correctly. Add the EXE to the Steam client as a non-Steam application and run from inside Steam in big picture mode.

Once you have that working, please try the gamepad text input code again and let me know whether it works or not.

EDIT:
It's still possible that it returns blank. I don't see where I use GetEnteredGamepadTextLength or GetEnteredGamepadTextInput to get the result.
And wow is "GetGamepadTextInputDismissedSubmittedText" a crappy name. lol
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 29th Aug 2023 19:48 Edited at: 29th Aug 2023 20:01
Running my game with the above-mentioned code, however, the keyboard works if Big Picture mode is open in the background and I run the game without Steam, but it still returns blank. When I load the game into Steam as a non-Steam app and run it in Big Picture, however, the keyboard doesn't appear at all. The game freezes and I have to ALT+F4 out of it.

EDIT: When I compile the example, unfortunately, the keyboard also will not show up at all. It's only showing up in my game if I don't actually launch it from Steam. I have to have Big Picture open in the background and launch it from the folder. The keyboard will at least appear then, but still returns nothing.
laughingcoyote.net
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 29th Aug 2023 20:12 Edited at: 29th Aug 2023 20:14
Here are screenshots of the Steam keyboard in my game. When I launch it from the desktop with Big Picture open, the keyboard appears (but returns blank). When I launch it from the Steam app as a non-Steam program, the keyboard will not appear, the game will freeze except for the custom PNG cursor, which starts flickering.

When I run the example from GitHub, the keyboard will not appear at all, regardless if I launch from Steam or Desktop.
laughingcoyote.net

Attachments

Login to view attachments
adambiser
AGK Developer
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 30th Aug 2023 03:24
The "add as a non-Steam game" comes from the documentation for that command.

I don't know why the keyboard doesn't appear, but I will look into that and about making the GetEnteredGamepadTextLength and GetEnteredGamepadTextInput additions soon.
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 30th Aug 2023 03:45 Edited at: 30th Aug 2023 20:17
Ya, for some reason it only works if I have Big Picture mode running in the background. If I launch from Steam after adding it as a non-Steam game (with Big Picture Mode on), it doesn't work. The keyboard does appear on the Deck, however, so that's a good sign. Thanks for checking into it.
laughingcoyote.net
adambiser
AGK Developer
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 1st Sep 2023 20:00
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 1st Sep 2023 21:58
Thanks for the heads up. I would've missed it.
laughingcoyote.net
adambiser
AGK Developer
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 9th Sep 2023 19:36
Conclusion about the SteamPlugin and Big Picture Mode / Overlay:

From https://partner.steamgames.com/doc/features/overlay
"As such you'll need to make sure to call SteamAPI_Init prior to initializing the OpenGL/D3D device, otherwise it won't be able to hook the device creation."

AGK creates the graphics device before loading plugins, which is when SteamAPI_Init is called. Overlay functions working at all is a surprise. Big Picture Mode, though, does not hook properly.
In might be possible to recompile the AppGameKit interpreter with #define AGK_STEAM which will call SteamAPI_Init first thing, but I've not tested this.
adambiser
AGK Developer
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 10th Sep 2023 23:57
As a followup, recompiling the interpreter to call SteamAPI_Init does not work. Possibly because AGK's InitGL actually does two wglCreateContext calls. The Steam API probably hooks the first call, which InitGL destroys.
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 11th Sep 2023 08:07
Thanks for trying that. I'm gonna implement a built-in keyboard so it will work on anything, hopefully. And I can do the same for the darkBASIC game, too.
laughingcoyote.net

Login to post a reply

Server time is: 2024-11-23 07:57:11
Your offset time is: 2024-11-23 07:57:11