Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ShiftLocked messing up external keyboard input after upgrade to MindFusion VKB (Read 2585 times)
Bryan Maule
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 11
Joined: Apr 11th, 2018
ShiftLocked messing up external keyboard input after upgrade to MindFusion VKB
Jul 6th, 2018 at 12:23pm
Print Post  
To make the keyboard ShiftLocked upon first load (so that the first character is uppercase and all subsequent characters are lowercase) I call these lines in _Loaded event:
Code
Select All
virtualKeyboard.SendKey(MindFusion.UI.Wpf.Key.Shift);
virtualKeyboard.ForceUpdateLayout(); 



When using the virtual keyboard via touch, this works great. VKB is all uppercase, I tap a letter and it's displayed correctly AND the virtual keyboard switches to all lowercase.

But when using an external keyboard, it never leaves the ShiftLocked state after the first character is entered on the keyboard. If I type the number keys on the keyboard, they come out like (!, @, #, $) as if I was holding shift down the entire time.

Any ideas?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: ShiftLocked messing up external keyboard input after upgrade to MindFusion VKB
Reply #1 - Jul 9th, 2018 at 1:52pm
Print Post  
>> after upgrade to MindFusion VKB

Do you mean that started to happen after upgrading from older version of the component to current one?
  
Back to top
 
IP Logged
 
Bryan Maule
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 11
Joined: Apr 11th, 2018
Re: ShiftLocked messing up external keyboard input after upgrade to MindFusion VKB
Reply #2 - Jul 9th, 2018 at 3:38pm
Print Post  
Yes.  I upgraded from a very old FPS.VirtualKeyboard control to the latest MindFusion control which I recently purchased.  The FPS version was 3.2.3.0.

That being said, I had to refactor a lot of code to integrate the MindFusion VKB,  so it's possible I broke something.  I just don't see how to make this work like it used to.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: ShiftLocked messing up external keyboard input after upgrade to MindFusion VKB
Reply #3 - Jul 11th, 2018 at 8:30am
Print Post  
We don't think the virtual keyboard ever tried to listen to the physical one in order to release Shift automatically. If your application shows the virtual keyboard  for a specific text control, you could release Shift like this when first key is pressed -

Code
Select All
bool firstKey = true;

private void TextBox_KeyDown(object sender, KeyEventArgs e)
{
	if (firstKey && VirtualKeyboard.ShiftLocked)
		vk.SendKey(MindFusion.UI.Wpf.Key.Shift);
	firstKey = false;
} 



Maybe you had similar event handlers in your application but removed / detached them while upgrading...

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