IanM
Topic Author
Posts: 7
Joined: 14 Feb 2020, 07:10

Problem with Textbox responding to Gamepad input

14 Feb 2020, 07:22

Hi

I'm having a problem trying to get a Textbox to respond when the "A" button is pressed on my Gamepad/Controller.
Pressing the Enter key (which has the same callback) works as expected.

My XAML code is as follows
<TextBox x:Name="firstNameTextbox" HorizontalAlignment="Left" Height="41" TextWrapping="Wrap" Text="{Binding PlayerFirstName}" VerticalAlignment="Top" Width="652.485" BorderBrush="White" FontSize="20" FontFamily="/Workspace;component/Fonts/#Cooper Hewitt" Canvas.Top="79" Canvas.Left="89.167">
	<i:Interaction.Triggers>
		<noesis:GamepadTrigger FiredOn="ButtonDown" Button="Accept">
			<i:InvokeCommandAction Command="{Binding CloseNamePopupCommand}" />
		</noesis:GamepadTrigger>
	</i:Interaction.Triggers>
	<TextBox.InputBindings>
		<KeyBinding Key="Esc" Command="{Binding BackCommand}"/>
		<KeyBinding Key="Enter" Command="{Binding CloseNamePopupCommand}"/>
	</TextBox.InputBindings>
</TextBox>
Something worth mentioning is that it does respond to the "A" button when the Root Grid element is in focus but not when the textbox is in focus after changing the text.

Tags:
 
User avatar
sfernandez
Site Admin
Posts: 1911
Joined: 22 Dec 2011, 19:20

Re: Problem with Textbox responding to Gamepad input

20 Feb 2020, 10:39

Hi,

I found a couple of bugs related to this, first the TextBox was incorrectly setting the KeyDown event as handled when Gamepad_Accept was pressed while writing. And GamepadTrigger was comparing against the incorrect key to determine if trigger actions should be invoked.

I'll fix it for the next release.

Sorry for the inconveniences.
 
IanM
Topic Author
Posts: 7
Joined: 14 Feb 2020, 07:10

Re: Problem with Textbox responding to Gamepad input

09 Mar 2020, 23:43

Thanks. Much appreciated.

Do you have any idea when the next release will be?
 
User avatar
jsantos
Site Admin
Posts: 2899
Joined: 20 Jan 2012, 17:18
Contact:

Re: Problem with Textbox responding to Gamepad input

10 Mar 2020, 10:44

We already solved this issue in the 3.0 branch but as you have access to the source code we could also apply this to 2.0 (for now we don't plan to release an official new 2.0). Could you open a ticket about this? Thanks!

Who is online

Users browsing this forum: No registered users and 2 guests