Page 1 of 1

[SOLVED] Key presses capture - Result not the same on Final version

Posted: Mon Nov 02, 2015 11:27 pm
by binaryfish
Hi

I need to capture key presses at the root level without a input element such as TextBox. So, I have a TextBox with Opacity = 0 and I set it to focus whether the user taps the screen (if anyone have a better solution please let me know).

Anyway, everything works fine when I run the app in Intermediate version. I tap the screen and press the keyboard the keypresses are captured. If I switch to final version the keypresses are not captured.

Here is the xaml code:

Code: Select all

<Canvas x:Name="CnvGrid" Background="Green" PointerPressed="CnvGrid_PointerPressed" >
   <TextBox x:Name="TbxGrid" TextChanged="TbxGrid_TextChanged" Width="1" Height="1" IsHitTestVisible="False" Opacity="0" />
</Canvas>


Thanks

Gavin

Re: Key presses capture - Result not the same on Final version

Posted: Fri Nov 06, 2015 10:04 am
by JS-Support @Userware
Thanks Gavin. We are going to look into it and keep you updated as soon as possible.

Regards,
JS-Support

Re: Key presses capture - Result not the same on Final version

Posted: Wed Jan 27, 2016 9:40 pm
by binaryfish
JS-Support wrote:Thanks Gavin. We are going to look into it and keep you updated as soon as possible.


Any progress as I installed the latest Beta 7 and I still cannot capture keypress on the browser?

Gavin

Re: Key presses capture - Result not the same on Final version

Posted: Mon Feb 01, 2016 9:54 am
by JS-Support @Userware
Hi Gavin,

Sorry it didn't make it for the Beta 7 release.

We have scheduled this bug fix for 1st half of 2016. I will let you know as soon as we deal with it.

Thanks a lot,
Regards,
JS-Support

Re: Key presses capture - Result not the same on Final version

Posted: Sat Apr 30, 2016 1:06 am
by binaryfish
Hi

Downloaded and installed Beta 8, problem is still present.

Regards

Gavin

Re: Key presses capture - Result not the same on Final version

Posted: Thu May 12, 2016 10:15 am
by JS-Support @Userware
Hi,

Thanks.

Does the issue happen only with Internet Explorer or also with other browsers such as Chrome or FireFox?

Regards,
JS-Support

Re: Key presses capture - Result not the same on Final version

Posted: Sun May 15, 2016 10:04 pm
by binaryfish
Hi

It happens on Microsoft Edge, Chrome, and Firefox.

Regards

Gavin

Re: Key presses capture - Result not the same on Final version

Posted: Tue May 17, 2016 6:27 am
by JS-Support @Userware
Thanks.

Re: Key presses capture - Result not the same on Final version

Posted: Sun Jul 24, 2016 10:18 pm
by binaryfish
Hi

In Beta 9.0 key presses still do not work!

Re: Key presses capture - Result not the same on Final version

Posted: Tue Oct 25, 2016 10:06 pm
by binaryfish
Hi

Downloaded Beta 10.2 and I still cannot capture key presses from the browser (when I click on RUN IN BROWSER button). Only works in the simulator.

Gavin

Re: Key presses capture - Result not the same on Final version

Posted: Fri Nov 04, 2016 8:13 am
by JS-Support @Userware
Dear Gavin,

This has been fixed in Beta 10.3.

Please note that IE raises the TextChanged event only when the TextBox loses focus. To achieve the desired result, please register to the "KeyDown" event instead.

Here is an example that works fine in Beta 10.3:

XAML:

Code: Select all

<Grid>
    <Canvas x:Name="CnvGrid" Width="100" Height="100" Background="Green"  PointerPressed="CnvGrid_PointerPressed" >
        <TextBox x:Name="TbxGrid" KeyDown="TbxGrid_KeyDown" Width="1" Height="1" IsHitTestVisible="False" Opacity="0" />
    </Canvas>
</Grid>

C#:

Code: Select all

private void CnvGrid_PointerPressed(object sender, PointerRoutedEventArgs e)
{
    TbxGrid.Focus();
}

void TbxGrid_KeyDown(object sender, KeyRoutedEventArgs e)
{
    MessageBox.Show("KeyDown");
}


Thanks.
Regards,
JS-Support