Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Keyboard doesn't work with WPF WebBrowser control (Read 965 times)
Damien K
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 3
Joined: Jul 30th, 2019
Keyboard doesn't work with WPF WebBrowser control
Dec 29th, 2020 at 6:28pm
Print Post  
Attempting to use the Wpf Keyboard with the System.Windows.Controls.WebBrowser control doesn't work. 

I have the WPF Keyboard showing in a separate window with IsStandAlone=True and PreventActivation=True.

In another window in the same application we are displaying a WebBrowser to navigate to a login web page.  With the keyboard focus in the user name field, touching or clicking on the Keyboard does nothing.   

Using a physical keyboard with the same control and page works fine.

Is there a way around this issue?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 2450
Joined: Oct 19th, 2005
Re: Keyboard doesn't work with WPF WebBrowser control
Reply #1 - Dec 30th, 2020 at 7:07am
Print Post  
That works in our test here (click on login field then type) -
https://mindfusion.eu/_samples/BrowserTest.zip

Maybe check if there aren't problems like this with focus management in your application -
https://social.msdn.microsoft.com/Forums/vstudio/en-US/be7aa38a-65df-47a8-af4f-f...

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Damien K
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 3
Joined: Jul 30th, 2019
Re: Keyboard doesn't work with WPF WebBrowser control
Reply #2 - Dec 30th, 2020 at 5:03pm
Print Post  
Thanks for the reply.  In further testing, it appears that the problem is with the UnicodeKey type.  We have created some custom keyboard layouts the primarily use the UnicodeKey type and they are the keys that don't do anything.  RegularKey type work fine.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 2450
Joined: Oct 19th, 2005
Re: Keyboard doesn't work with WPF WebBrowser control
Reply #3 - Jan 4th, 2021 at 9:53am
Print Post  
Try new assemblies from same link -
https://mindfusion.eu/_samples/BrowserTest.zip

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Damien K
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 3
Joined: Jul 30th, 2019
Re: Keyboard doesn't work with WPF WebBrowser control
Reply #4 - Jan 5th, 2021 at 4:55pm
Print Post  
Thanks, Slavcho

I have verified that the sample works with the website we are using, the BrowserControl and Unicode Keys. 

I have also verified our custom keyboard layouts and data templates also work in the sample app. 

For some reason within our application the Unicode keys don't send at all.  Any ideas on what might cause that?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 2450
Joined: Oct 19th, 2005
Re: Keyboard doesn't work with WPF WebBrowser control
Reply #5 - Jan 5th, 2021 at 5:47pm
Print Post  
Have you verified your application loads the new assemblies? Other than that, UnicodeKey is implemented by sending WM_IME_CHAR message to the focused control, so verify there isn't some message filter intercepting it. Maybe also check for differences in windows hierarchy between the test app and yours that could affect focus handling (parent panels and such). If you send us a project reproducing that, our developer will investigate.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint