Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic en-GB Keyboard layout (Read 2282 times)
Harshvir
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 36
Joined: Aug 26th, 2020
en-GB Keyboard layout
Jun 7th, 2022 at 8:09am
Print Post  
Hi,
I am running into an issue with en-GB keyboard layout where Key position is getting changed when I load the XML into the control.
I have attached screen showing the Key whose placement is wrong.
I also have a question about if we can use different shape for Enter Key.

Thanks.
  

KeybaordLayoutVsRendered.jpg ( 373 KB | 85 Downloads )
KeybaordLayoutVsRendered.jpg
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: en-GB Keyboard layout
Reply #1 - Jun 7th, 2022 at 8:36am
Print Post  
Hi,

Try setting keyboard.AutoFill to false. It's enabled by default and replaces whole character block with standard layouts for current language (so keeps only surrounding special keys from custom layout).

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


I Love MindFusion!

Posts: 36
Joined: Aug 26th, 2020
Re: en-GB Keyboard layout
Reply #2 - Jun 7th, 2022 at 8:40am
Print Post  
Thanks that worked.
Is there a way to define custom shape for the key? I was not able to find any custom key samples on Forum or in documentation.
Please let me know if there is something that I might have missed.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: en-GB Keyboard layout
Reply #3 - Jun 7th, 2022 at 8:40am
Print Post  
Quote:
I also have a question about if we can use different shape for Enter Key.


You could set enter key's Image property to show a bitmap, or otherwise modify Xaml template to show Path object for non-rectangular shape.
  
Back to top
 
IP Logged
 
Harshvir
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 36
Joined: Aug 26th, 2020
Re: en-GB Keyboard layout
Reply #4 - Jun 7th, 2022 at 8:46am
Print Post  
Is there a sample available for that, if not then I look into that?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: en-GB Keyboard layout
Reply #5 - Jun 7th, 2022 at 9:32am
Print Post  
Samples\C#\Styles shows both bitmap images and custom templates for keys. So for Enter you'd need a custom DataTemplate for SpecialKey class, possibly triggering visibility of a Path element depending on VirtualKey value being 13. E.g. something similar for RegularKey character-depending template is shown here -
https://mindfusion.eu/Forum/YaBB.pl?num=1537795222/3#3

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


I Love MindFusion!

Posts: 36
Joined: Aug 26th, 2020
Re: en-GB Keyboard layout
Reply #6 - Jun 8th, 2022 at 7:13am
Print Post  
Hi Slavcho,
I looked through samples but I could not find any key which is using polygon shape.
The sample you referred to was having only rectangle shapes, and images.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: en-GB Keyboard layout
Reply #7 - Jun 8th, 2022 at 7:55am
Print Post  
Hi Harshvir,

The examples show how to replace key's template, so you can plug your own graphics there. If you don't want to use a bitmap for the polygon, you should be able to add WPF's standard <Path> or <Polygon> elements to the DataTemplate -
https://docs.microsoft.com/en-us/dotnet/desktop/wpf/graphics-multimedia/how-to-d...

You could probably also avoid dealing with data triggers by deriving your own EnterKey class from SpeciaKey, and declare template just for it.

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