A. Changes made in JHVirtualKeyboard xaml and JHVirtualKeyboard.xaml.cs
Addition to KeyAssignmentSets directory of JHVirtualKeyboard
1.SanskritKeyAssignment.cs
2.TamilKeyAssignment.cs will be added in next
You may see changes to button names to match e.key that comes in previewkeydown-changed button names are relating to Oem.
WhichKeyboardLayout enum names changed to reflect the language name in the language itself.
Help button to type indirectly through mouse added as flowdocument which can also be used for direct typing. This has become necessary as certain letters of the language are a combination of two letters and some of the letters are quite complicated.
Lastly, paneToolbar of your xaml will have added stackpanels named SanskritSpecials and TamilSpecials. The visibility of which is changed on selection of the keyboard in cbKeyboardLayoutSelectionChanged.
B.Changes made in Demo section of virtualkeyboard.
Only one handler added to the textbox in the form of PreviewKeyDown="PreviewKeydownHandler"
Sanskrit Keyboard keyassignment for JHVirtualKeyboard
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace JHVirtualKeyboard.KeyAssignmentSets
{
public class TamilKeyAssignmentSet : KeyAssignmentSet
{
public TamilKeyAssignmentSet()
: base()
{
}
#region KeyboardLayout
public override WhichKeyboardLayout KeyboardLayout
{
get { return WhichKeyboardLayout.தமிழ்; }
}
#endregion
#region FontFamilyName
public override string FontFamilyName
{
get
{
return "Latha";
}
}
#endregion
#region 0: VK_Oem3
public override KeyAssignment VK_Oem3
{
get
{
if (_VK_Oem3 == null)
{
_VK_Oem3 = new KeyAssignment(0x0021, 0x002A, "Exclamation Mark", "Asterisk", false, true);
}
return _VK_Oem3;
}
}
#endregion
#region 1: VK_1
public override KeyAssignment VK_1
{
get
{
if (_VK_1 == null)
{
_VK_1 = new KeyAssignment( 0x0BE7,0x0031,"Tamil ONE", "digit ONE",false, true);
}
return _VK_1;
}
}
#endregion
#region 2: VK_2
public override KeyAssignment VK_2
{
get
{
if (_VK_2 == null)
{
_VK_2 = new KeyAssignment(0x0BE8, 0x0032, "Tamil TWO", "digit TWO", false, true);
}
return _VK_2;
}
}
#endregion
#region 3: VK_3
public override KeyAssignment VK_3
{
get
{
if (_VK_3 == null)
{
_VK_3 = new KeyAssignment(0x0BE9, 0x0033, "Tamil THREE", "digit THREE", false, true);
}
return _VK_3;
}
}
#endregion
#region 4: VK_4
public override KeyAssignment VK_4
{
get
{
if (_VK_4 == null)
{
_VK_4 = new KeyAssignment(0x0BEA, 0x0034, "Tamil FOUR", "digit FOUR", false, true);
}
return _VK_4;
}
}
#endregion
#region 5: VK_5
public override KeyAssignment VK_5
{
get
{
if (_VK_5 == null)
{
_VK_5 = new KeyAssignment(0x0BEB,0x0035, "Tamil FIVE","digit FIVE" , false, true);
}
return _VK_5;
}
}
#endregion
#region 6: VK_6
public override KeyAssignment VK_6
{
get
{
if (_VK_6 == null)
{
_VK_6 = new KeyAssignment(0x0BEC, 0x0036, "Tamil SIX", "digit SIX", false, true);
}
return _VK_6;
}
}
#endregion
#region 7: VK_7
public override KeyAssignment VK_7
{
get
{
if (_VK_7 == null)
{
_VK_7 = new KeyAssignment(0x0BED, 0x0037, "Tamil SEVEN", "digit SEVEN", false, true);
}
return _VK_7;
}
}
#endregion
#region 8: VK_8
public override KeyAssignment VK_8
{
get
{
if (_VK_8 == null)
{
_VK_8 = new KeyAssignment(0x0BEE, 0x0038, "Tamil EIGHT", "digit EIGHT", false, true);
}
return _VK_8;
}
}
#endregion
#region 9: VK_9
public override KeyAssignment VK_9
{
get
{
if (_VK_9 == null)
{
_VK_9 = new KeyAssignment(0x0BEF, 0x0039, "Tamil NINE", "digit NINE", false, true);
}
return _VK_9;
}
}
#endregion
#region 10: VK_0
public override KeyAssignment VK_0
{
get
{
if (_VK_0 == null)
{
_VK_0 = new KeyAssignment( 0x0030, "digit ZERO", false);
}
return _VK_0;
}
}
#endregion
#region 11: VK_OemMinus
public override KeyAssignment VK_OemMinus
{
get
{
if (_VK_OemMinus == null)
{
_VK_OemMinus = new KeyAssignment(0x002D, 0x002E, "Hyphen,Minus", "Period", false, true);
}
return _VK_OemMinus;
}
}
#endregion
#region 12: VK_OemPlus
public override KeyAssignment VK_OemPlus
{
get
{
if (_VK_OemPlus == null)
{
_VK_OemPlus = new KeyAssignment(0x028, 0x0029, "Left Parenthesis", "Right Parenthesis", false, true);
}
return _VK_OemPlus;
}
}
#endregion
#region 13: VK_Q
public override KeyAssignment VK_Q
{
get
{
if (_VK_Q == null)
{
_VK_Q = new KeyAssignment(0x0B85, 0x0BCD,"Letter a","letter with upper dot",false,true );
}
return _VK_Q;
}
}
#endregion
#region 14: VK_W
public override KeyAssignment VK_W
{
get
{
if (_VK_W == null)
{
_VK_W = new KeyAssignment(0x0B86, 0x0BBE,"Letter A","letter with leg",false ,true );
}
return _VK_W;
}
}
#endregion
#region 15: VK_E
public override KeyAssignment VK_E
{
get
{
if (_VK_E == null)
{
_VK_E = new KeyAssignment(0x0B87, 0x0BBF,"Letter i","addition vowel",false ,true );
}
return _VK_E;
}
}
#endregion
#region 16: VK_R
public override KeyAssignment VK_R
{
get
{
if (_VK_R == null)
{
_VK_R = new KeyAssignment(0x0B88, 0x0BC0,"Letter E","Addition Vowel E",false,true );
}
return _VK_R;
}
}
#endregion
#region 17: VK_T
public override KeyAssignment VK_T
{
get
{
if (_VK_T == null)
{
_VK_T = new KeyAssignment(0x0B89, 0x0BC1,"Letter u","Addition Vowel",false,true );
}
return _VK_T;
}
}
#endregion
#region 18: VK_Y
public override KeyAssignment VK_Y
{
get
{
if (_VK_Y == null)
{
_VK_Y = new KeyAssignment(0x0B8A, 0x0BC2,"Letter U","Addition Vowel",false,true);
}
return _VK_Y;
}
}
#endregion
#region 19: VK_U
public override KeyAssignment VK_U
{
get
{
if (_VK_U == null)
{
_VK_U = new KeyAssignment(0x0B8E, 0x0BC6,"Letter e","Addition Vowel",false,true );
}
return _VK_U;
}
}
#endregion
#region 20: VK_I
public override KeyAssignment VK_I
{
get
{
if (_VK_I == null)
{
_VK_I = new KeyAssignment(0x0B8F, 0x0BC7,"Letter E","Addition Vowel",false,true );
}
return _VK_I;
}
}
#endregion
#region 21: VK_O
public override KeyAssignment VK_O
{
get
{
if (_VK_O == null)
{
_VK_O = new KeyAssignment(0x0B90, 0x0BC8, "Letter ai", "Addition Vowel", false, true);
}
return _VK_O;
}
}
#endregion
#region 22: VK_P
public override KeyAssignment VK_P
{
get
{
if (_VK_P == null)
{
_VK_P = new KeyAssignment(0x0B92, 0x0BCA, "Letter o", "Addition Vowel", false, true);
}
return _VK_P;
}
}
#endregion
#region 23: VK_OemOpenBrackets
public override KeyAssignment VK_OemOpenBrackets
{
get
{
if (_VK_OemOpenBrackets == null)
{
_VK_OemOpenBrackets = new KeyAssignment(0x0B93, 0x0BCB, "Letter O", "Addition Vowel", false, true);
}
return _VK_OemOpenBrackets;
}
}
#endregion
#region 24: VK_Oem6
public override KeyAssignment VK_Oem6
{
get
{
if (_VK_Oem6 == null)
{
_VK_Oem6 = new KeyAssignment(0x0B94, 0x0BCC, "Vowel au", "Aytham", false, true);
}
return _VK_Oem6;
}
}
#endregion
#region 25: VK_Oem5
public override KeyAssignment VK_Oem5
{
get
{
if (_VK_Oem5 == null)
{
_VK_Oem5 = new KeyAssignment(0x0B83, "Letter aytham", false);
}
return _VK_Oem5;
}
}
#endregion
#region 26: VK_A
public override KeyAssignment VK_A
{
get
{
if (_VK_A == null)
{
_VK_A = new KeyAssignment(0x0B95,"LETTER ka",false );
}
return _VK_A;
}
}
#endregion
#region 27: VK_S
public override KeyAssignment VK_S
{
get
{
if (_VK_S == null)
{
_VK_S = new KeyAssignment(0x0B99, "LETTER nga",false );
}
return _VK_S;
}
}
#endregion
#region 28: VK_D
public override KeyAssignment VK_D
{
get
{
if (_VK_D == null)
{
_VK_D = new KeyAssignment(0x0B9A, "LETTER ca", false);
}
return _VK_D;
}
}
#endregion
#region 29: VK_F
public override KeyAssignment VK_F
{
get
{
if (_VK_F == null)
{
_VK_F = new KeyAssignment(0x0B9E, "LETTER GYa", false);
}
return _VK_F;
}
}
#endregion
#region 30: VK_G
public override KeyAssignment VK_G
{
get
{
if (_VK_G == null)
{
_VK_G = new KeyAssignment(0x0B9F, "LETTER Ta", false);
}
return _VK_G;
}
}
#endregion
#region 31: VK_H
public override KeyAssignment VK_H
{
get
{
if (_VK_H == null)
{
_VK_H = new KeyAssignment(0x0BA3, "LETTER Na", false);
}
return _VK_H;
}
}
#endregion
#region 32: VK_J
public override KeyAssignment VK_J
{
get
{
if (_VK_J == null)
{
_VK_J = new KeyAssignment(0x0BA4, "LETTER tha", false);
}
return _VK_J;
}
}
#endregion
#region 33: VK_K
public override KeyAssignment VK_K
{
get
{
if (_VK_K == null)
{
_VK_K = new KeyAssignment(0x0BA8, "LETTER na", false);
}
return _VK_K;
}
}
#endregion
#region 34: VK_L
public override KeyAssignment VK_L
{
get
{
if (_VK_L == null)
{
_VK_L = new KeyAssignment(0x0BA9, "LETTER nha", false);
}
return _VK_L;
}
}
#endregion
#region 35: VK_Oem1
public override KeyAssignment VK_Oem1
{
get
{
if (_VK_Oem1 == null)
{
_VK_Oem1 = new KeyAssignment(0x0BAA, "LETTER pa", false);
}
return _VK_Oem1;
}
}
#endregion
#region 36: VK_OemQuotes
public override KeyAssignment VK_OemQuotes
{
get
{
if (_VK_OemQuotes == null)
{
_VK_OemQuotes = new KeyAssignment(0x0BAE, "LETTER pa", false);
}
return _VK_OemQuotes;
}
}
#endregion
#region 37: VK_Z
public override KeyAssignment VK_Z
{
get
{
if (_VK_Z == null)
{
_VK_Z = new KeyAssignment(0x0BAF, "LETTER ya", false);
}
return _VK_Z;
}
}
#endregion
#region 38: VK_X
public override KeyAssignment VK_X
{
get
{
if (_VK_X == null)
{
_VK_X = new KeyAssignment(0x0BB0, "LETTER ra", false);
}
return _VK_X;
}
}
#endregion
#region 39: VK_C
public override KeyAssignment VK_C
{
get
{
if (_VK_C == null)
{
_VK_C = new KeyAssignment(0x0BB1, "LETTER Ra", false);
}
return _VK_C;
}
}
#endregion
#region 40: VK_V
public override KeyAssignment VK_V
{
get
{
if (_VK_V == null)
{
_VK_V = new KeyAssignment(0x0BB2, "LETTER la", false);
}
return _VK_V;
}
}
#endregion
#region 41: VK_B
public override KeyAssignment VK_B
{
get
{
if (_VK_B == null)
{
_VK_B = new KeyAssignment(0x0BB3, "LETTER La", false);
}
return _VK_B;
}
}
#endregion
#region 42: VK_N
public override KeyAssignment VK_N
{
get
{
if (_VK_N == null)
{
_VK_N = new KeyAssignment(0x0BB4, "LETTER za", false);
}
return _VK_N;
}
}
#endregion
#region 43: VK_M
public override KeyAssignment VK_M
{
get
{
if (_VK_M == null)
{
_VK_M = new KeyAssignment(0x0BB5, "LETTER va", false);
}
return _VK_M;
}
}
#endregion
#region 44: VK_OemComma
public override KeyAssignment VK_OemComma
{
get
{
if (_VK_OemComma == null)
{
_VK_OemComma = new KeyAssignment(0x0B9C, "Letter ja", false);
}
return _VK_OemComma;
}
}
#endregion
#region 45: VK_OemPeriod
public override KeyAssignment VK_OemPeriod
{
get
{
if (_VK_OemPeriod == null)
{
_VK_OemPeriod = new KeyAssignment(0x002E, "Period", false);
}
return _VK_OemPeriod;
}
}
#endregion
}
}
|