Posted: 27th Aug 2023 7:48
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.
Posted: 27th Aug 2023 19:33
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
Posted: 27th Aug 2023 23:14
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.
Posted: 28th Aug 2023 0:21
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().

+ Code Snippet
s = steam.showGamepadTextInput(0,0,dialog$,max,txt$)
if s>0
   steam.runCallbacks()
   m$ = steam.getGamepadTextInputDismissedSubmittedText()
endif
Posted: 28th Aug 2023 2:11
you might try 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.
Posted: 28th Aug 2023 2:14
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".
Posted: 28th Aug 2023 11:08
what about the rest of the function from the demo
+ Code Snippet
	if Steam.HasGamepadTextInputDismissedResponse()
		if Steam.GetGamepadTextInputDismissedSubmitted()
			textinput[lastButtonPressed - 1] = Steam.GetGamepadTextInputDismissedSubmittedText()
			AddStatus("User entered: " + Steam.GetGamepadTextInputDismissedSubmittedText())
		else
			AddStatus("User cancelled text input.")
		endif
	endif


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?
Posted: 29th Aug 2023 3:39
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.
Posted: 29th Aug 2023 4:02
This code brings up the keyboard and I can type anything, but it always returns a blank string.

+ Code Snippet
s = steam.showGamepadTextInput(0,0,dialog$,max,txt$)
steam.runCallbacks()
if s>0
	if steam.hasGamepadTextInputDismissedResponse()
		if steam.getGamepadTextInputDismissedSubmitted()
			m$ = steam.getGamepadTextInputDismissedSubmittedText()
			exitfunction m$
		endif
	endif
else
	edit = createEditBox()
	` ...
endif


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.
Posted: 29th Aug 2023 4:48
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.
Posted: 29th Aug 2023 15:04
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
Posted: 29th Aug 2023 19:48
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.
Posted: 29th Aug 2023 20:12
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.
Posted: 30th Aug 2023 3: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.
Posted: 30th Aug 2023 3:45
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.
Posted: 1st Sep 2023 20:00
@Laughing Coyote Software: Sent you a PM asking for more information. Thanks.
Posted: 1st Sep 2023 21:58
Thanks for the heads up. I would've missed it.
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.
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.
Posted: 11th Sep 2023 8: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.