public override void BeginInit() { SetValue(FocusManager.IsFocusScopeProperty, true); //_activeKeyModifiers.Add(new OnScreenKeyStateModifier(OnScreenKeyModifierType.Special, false, false)); var mainSection = new OnScreenKeyboardSection(); var mainKeys = new ObservableCollection <OnScreenKey> { new OnScreenKeyNormal(0, 00, new[] { "`", "~" }, CaptionUpdateDelegateDelegateFunction.CapsLookAndSpecial), new OnScreenKeyNormal(0, 01, new[] { "1", "!", "1", "!" }, CaptionUpdateDelegateDelegateFunction.CapsLookAndSpecial), new OnScreenKeyNormal(0, 02, new[] { "2", "@", "2", "\"" }, CaptionUpdateDelegateDelegateFunction.CapsLookAndSpecial), new OnScreenKeyNormal(0, 03, new[] { "3", "#", "3", "№" }, CaptionUpdateDelegateDelegateFunction.CapsLookAndSpecial), new OnScreenKeyNormal(0, 04, new[] { "4", "$", "4", ";" }, CaptionUpdateDelegateDelegateFunction.CapsLookAndSpecial), new OnScreenKeyNormal(0, 05, new[] { "5", "%", "5", "%" }, CaptionUpdateDelegateDelegateFunction.CapsLookAndSpecial), new OnScreenKeyNormal(0, 06, new[] { "6", "^", "6", ":" }, CaptionUpdateDelegateDelegateFunction.CapsLookAndSpecial), new OnScreenKeyNormal(0, 07, new[] { "7", "&", "7", "?" }, CaptionUpdateDelegateDelegateFunction.CapsLookAndSpecial), new OnScreenKeyNormal(0, 08, new[] { "8", "*", "8", "*" }, CaptionUpdateDelegateDelegateFunction.CapsLookAndSpecial), new OnScreenKeyNormal(0, 09, new[] { "9", "(", "9", "(" }, CaptionUpdateDelegateDelegateFunction.CapsLookAndSpecial), new OnScreenKeyNormal(0, 10, new[] { "0", ")", "0", ")" }, CaptionUpdateDelegateDelegateFunction.CapsLookAndSpecial), new OnScreenKeyNormal(0, 11, new[] { "-", "_", "-", "_" }, CaptionUpdateDelegateDelegateFunction.CapsLookAndSpecial), new OnScreenKeyNormal(0, 12, new[] { "=", "+", "=", "+" }, CaptionUpdateDelegateDelegateFunction.CapsLookAndSpecial), new OnScreenKeySpecial(0, 13, "Bksp", ExecuteDelegateFunctions.BackspaceExecuteDelegate) { GridWidth = new GridLength(2, GridUnitType.Star) }, new OnScreenKeySpecial(1, 00, "Tab", ExecuteDelegateFunctions.MoveNextExecuteDelegate) { GridWidth = new GridLength(1.5, GridUnitType.Star) }, new OnScreenKeyNormal(1, 01, new[] { "q", "Q", "й", "Й" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 02, new[] { "w", "W", "ц", "Ц" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 03, new[] { "e", "E", "у", "У" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 04, new[] { "r", "R", "к", "К" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 05, new[] { "t", "T", "е", "Е" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 06, new[] { "y", "Y", "н", "Н" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 07, new[] { "u", "U", "г", "Г" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 08, new[] { "i", "I", "ш", "Ш" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 09, new[] { "o", "O", "щ", "Щ" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 10, new[] { "p", "P", "з", "З" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 11, new[] { "[", "{", "х", "Х" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 12, new[] { "]", "}", "ї", "Ї" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 13, new[] { "\\", "|", "г", "Г" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial) { GridWidth = new GridLength(1.3, GridUnitType.Star) }, new OnScreenKeyToggle(2, 00, new[] { "Caps" }, OnScreenKeyModifierType.CapsLock) { GridWidth = new GridLength(1.7, GridUnitType.Star) }, new OnScreenKeyNormal(2, 01, new[] { "a", "A", "ф", "Ф" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 02, new[] { "s", "S", "і", "І" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 03, new[] { "d", "D", "в", "В" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 04, new[] { "f", "F", "а", "А" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 05, new[] { "g", "G", "п", "П" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 06, new[] { "h", "H", "р", "Р" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 07, new[] { "j", "J", "о", "О" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 08, new[] { "k", "K", "л", "Л" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 09, new[] { "l", "L", "д", "Д" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 10, new[] { ";", ":", "ж", "Ж" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 11, new[] { "\"", "'", "є", "Є" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeySpecial(2, 12, "Enter", ExecuteDelegateFunctions.MoveNextExecuteDelegate, false) { GridWidth = new GridLength(1.8, GridUnitType.Star) }, new OnScreenKeyModifier(3, 00, new[] { "Shift" }, OnScreenKeyModifierType.Shift) { GridWidth = new GridLength(2.4, GridUnitType.Star) }, new OnScreenKeyNormal(3, 01, new[] { "z", "Z", "я", "Я" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 02, new[] { "x", "X", "ч", "Ч" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 03, new[] { "c", "C", "с", "С" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 04, new[] { "v", "V", "м", "М" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 05, new[] { "b", "B", "и", "И" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 06, new[] { "n", "N", "т", "Т" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 07, new[] { "m", "M", "ь", "Ь" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 08, new[] { ",", "<", "б", "Б" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 09, new[] { ".", ">", "ю", "Ю" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 10, new[] { "/", "?", ".", "," }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyModifier(3, 11, new[] { "Shift" }, OnScreenKeyModifierType.Shift) { GridWidth = new GridLength(2.4, GridUnitType.Star) }, new OnScreenKeySpecial(4, 00, "Clear", ExecuteDelegateFunctions.ClearExecuteDelegate), new OnScreenKeyToggle(4, 01, new [] { "En" }, OnScreenKeyModifierType.Special), new OnScreenKeySpecial(4, 02, string.Empty, " ") { GridWidth = new GridLength(5, GridUnitType.Star) }, new OnScreenKeySpecial(4, 03, "Save", nameof(SaveCommand), false) { ClickCommand = nameof(SaveCommand) }, new OnScreenKeySpecial(4, 04, "Cancel", nameof(CancelCommand), false) { ClickCommand = nameof(CancelCommand) }, }; mainSection.Keys = mainKeys; mainSection.SetValue(ColumnProperty, 0); _sections.Add(mainSection); ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(3, GridUnitType.Star) }); Children.Add(mainSection); _allOnScreenKeys.AddRange(mainSection.Keys); //var specialSection = new OnScreenKeyboardSection(); //var specialKeys = new ObservableCollection<OnScreenKey> // { // new OnScreenKeyNormal ( 0, 0, Key = new ChordKey("Select All", VirtualKeyCode.CONTROL, VirtualKeyCode.VK__A), GridWidth = new GridLength(2, GridUnitType.Star)}, // new OnScreenKeyNormal ( 0, 1, Key = new ChordKey("Undo", VirtualKeyCode.CONTROL, VirtualKeyCode.VK__Z) }, // new OnScreenKeyNormal ( 1, 0, Key = new ChordKey("Copy", VirtualKeyCode.CONTROL, VirtualKeyCode.VK__C) }, // new OnScreenKeyNormal ( 1, 1, Key = new ChordKey("Cut", VirtualKeyCode.CONTROL, VirtualKeyCode.VK__X) }, // new OnScreenKeyNormal ( 1, 2, Key = new ChordKey("Paste", VirtualKeyCode.CONTROL, VirtualKeyCode.VK__V) }, // new OnScreenKeyNormal ( 2, 0, Key = new VirtualKey(VirtualKeyCode.DELETE, "Del") }, // new OnScreenKeyNormal ( 2, 1, Key = new VirtualKey(VirtualKeyCode.HOME, "Home") }, // new OnScreenKeyNormal ( 2, 2, Key = new VirtualKey(VirtualKeyCode.END, "End") }, // new OnScreenKeyNormal ( 3, 0, Key = new VirtualKey(VirtualKeyCode.PRIOR, "PgUp") }, // new OnScreenKeyNormal ( 3, 1, Key = new VirtualKey(VirtualKeyCode.UP, "Up") }, // new OnScreenKeyNormal ( 3, 2, Key = new VirtualKey(VirtualKeyCode.NEXT, "PgDn") }, // new OnScreenKeyNormal ( 4, 0, Key = new VirtualKey(VirtualKeyCode.LEFT, "Left") }, // new OnScreenKeyNormal ( 4, 1, Key = new VirtualKey(VirtualKeyCode.DOWN, "Down") }, // new OnScreenKeyNormal ( 4, 2, Key = new VirtualKey(VirtualKeyCode.RIGHT, "Right") }, // }; //specialSection.Keys = specialKeys; //specialSection.SetValue(ColumnProperty, 1); //_sections.Add(specialSection); //ColumnDefinitions.Add(new ColumnDefinition()); //Children.Add(specialSection); //_allOnScreenKeys.AddRange(specialSection.Keys); Loaded += OnScreenKeyboard_Loaded; base.BeginInit(); _allOnScreenKeys.ForEach(i => i.Update(_activeKeyModifiers)); }
public override void BeginInit() { SetValue(FocusManager.IsFocusScopeProperty, true); var mainSection = new OnScreenKeyboardSection(); var mainKeys = new ObservableCollection <OnScreenKey> { new OnScreenKeyNormal(0, 01, new[] { "1" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 02, new[] { "2" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 03, new[] { "3" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 04, new[] { "4" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 05, new[] { "5" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 06, new[] { "6" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 07, new[] { "7" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 08, new[] { "8" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 09, new[] { "9" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 10, new[] { "0" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 11, new[] { "-" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 01, new[] { "A" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 02, new[] { "Z" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 03, new[] { "E" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 04, new[] { "R" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 05, new[] { "T" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 06, new[] { "Y" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 07, new[] { "U" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 08, new[] { "I" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 09, new[] { "O" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 10, new[] { "P" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 01, new[] { "Q" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 02, new[] { "S" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 03, new[] { "D" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 04, new[] { "F" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 05, new[] { "G" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 06, new[] { "H" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 07, new[] { "J" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 08, new[] { "K" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 09, new[] { "L" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 10, new[] { "M" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 01, new[] { "W" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 02, new[] { "X" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 03, new[] { "C" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 04, new[] { "V" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 05, new[] { "B" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 06, new[] { "N" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 08, new[] { "," }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 09, new[] { "/" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeySpecial(4, 01, "<-", ExecuteDelegateFunctions.BackspaceExecuteDelegate), new OnScreenKeySpecial(4, 02, "Effacer", ExecuteDelegateFunctions.ClearExecuteDelegate), new OnScreenKeySpecial(4, 03, "Enter", ExecuteDelegateFunctions.PressEnterExecuteDelegate), }; mainSection.Keys = mainKeys; mainSection.SetValue(ColumnProperty, 0); _sections.Add(mainSection); ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(3, GridUnitType.Star) }); Children.Add(mainSection); _allOnScreenKeys.AddRange(mainSection.Keys); //var specialSection = new OnScreenKeyboardSection(); //var specialKeys = new ObservableCollection<OnScreenKey> // { // new OnScreenKeyNormal ( 0, 0, Key = new ChordKey("Select All", VirtualKeyCode.CONTROL, VirtualKeyCode.VK__A), GridWidth = new GridLength(2, GridUnitType.Star)}, // new OnScreenKeyNormal ( 0, 1, Key = new ChordKey("Undo", VirtualKeyCode.CONTROL, VirtualKeyCode.VK__Z) }, // new OnScreenKeyNormal ( 1, 0, Key = new ChordKey("Copy", VirtualKeyCode.CONTROL, VirtualKeyCode.VK__C) }, // new OnScreenKeyNormal ( 1, 1, Key = new ChordKey("Cut", VirtualKeyCode.CONTROL, VirtualKeyCode.VK__X) }, // new OnScreenKeyNormal ( 1, 2, Key = new ChordKey("Paste", VirtualKeyCode.CONTROL, VirtualKeyCode.VK__V) }, // new OnScreenKeyNormal ( 2, 0, Key = new VirtualKey(VirtualKeyCode.DELETE, "Del") }, // new OnScreenKeyNormal ( 2, 1, Key = new VirtualKey(VirtualKeyCode.HOME, "Home") }, // new OnScreenKeyNormal ( 2, 2, Key = new VirtualKey(VirtualKeyCode.END, "End") }, // new OnScreenKeyNormal ( 3, 0, Key = new VirtualKey(VirtualKeyCode.PRIOR, "PgUp") }, // new OnScreenKeyNormal ( 3, 1, Key = new VirtualKey(VirtualKeyCode.UP, "Up") }, // new OnScreenKeyNormal ( 3, 2, Key = new VirtualKey(VirtualKeyCode.NEXT, "PgDn") }, // new OnScreenKeyNormal ( 4, 0, Key = new VirtualKey(VirtualKeyCode.LEFT, "Left") }, // new OnScreenKeyNormal ( 4, 1, Key = new VirtualKey(VirtualKeyCode.DOWN, "Down") }, // new OnScreenKeyNormal ( 4, 2, Key = new VirtualKey(VirtualKeyCode.RIGHT, "Right") }, // }; //specialSection.Keys = specialKeys; //specialSection.SetValue(ColumnProperty, 1); //_sections.Add(specialSection); //ColumnDefinitions.Add(new ColumnDefinition()); //Children.Add(specialSection); //_allOnScreenKeys.AddRange(specialSection.Keys); Loaded += OnScreenKeyboard_Loaded; base.BeginInit(); }
public override void BeginInit() { SetValue(FocusManager.IsFocusScopeProperty, true); var mainSection = new OnScreenKeyboardSection(); var mainKeys = new ObservableCollection <OnScreenKey> { new OnScreenKeyNormal(0, 00, new[] { "`", "~", "∞", "≈" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 01, new[] { "1", "!", "§", "¡" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 02, new[] { "2", "@", "☼" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 03, new[] { "3", "#", "†", "‡" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 04, new[] { "4", "$", "£", "¢" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 05, new[] { "5", "%", "§", "¶" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 06, new[] { "6", "^", "∈", "°" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 07, new[] { "7", "&", "∩", "⊄" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 08, new[] { "8", "*", "∪" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 09, new[] { "9", "(", "⊂", "⊆" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 10, new[] { "0", ")", "⊃", "⊇" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 11, new[] { "-", "_", "×", "Ø" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(0, 12, new[] { "=", "+", "≠", "±" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeySpecial(0, 13, "Bksp", ExecuteDelegateFunctions.BackspaceExecuteDelegate) { GridWidth = new GridLength(2, GridUnitType.Star) }, new OnScreenKeySpecial(1, 00, "Tab", ExecuteDelegateFunctions.MoveNextExecuteDelegate) { GridWidth = new GridLength(1.5, GridUnitType.Star) }, new OnScreenKeyNormal(1, 01, new[] { "q", "Q", "θ", "Θ" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 02, new[] { "w", "W", "ω", "Ω" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 03, new[] { "e", "E", "ε" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 04, new[] { "r", "R", "ρ" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 05, new[] { "t", "T" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 06, new[] { "y", "Y", "ψ", "Ψ" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 07, new[] { "u", "U" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 08, new[] { "i", "I" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 09, new[] { "o", "O" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 10, new[] { "p", "P", "π", "Π" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 11, new[] { "[", "{", "‹", "«" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 12, new[] { "]", "}", "›", "»" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(1, 13, new[] { "\\", "|" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial) { GridWidth = new GridLength(1.3, GridUnitType.Star) }, new OnScreenKeyToggle(2, 00, new[] { "Caps" }, OnScreenKeyModifierType.Shift) { GridWidth = new GridLength(1.7, GridUnitType.Star) }, new OnScreenKeyNormal(2, 01, new[] { "a", "A", "α" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 02, new[] { "s", "S", "σ", "Σ" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 03, new[] { "d", "D", "δ", "Δ" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 04, new[] { "f", "F" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 05, new[] { "g", "G", "γ", "Γ" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 06, new[] { "h", "H", "φ", "Φ" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 07, new[] { "j", "J" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 08, new[] { "k", "K" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 09, new[] { "l", "L", "λ", "Λ" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 10, new[] { ";", ":", "♠", "♣" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(2, 11, new[] { "\"", "'", "♥", "♦" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeySpecial(2, 12, "Enter", ExecuteDelegateFunctions.MoveNextExecuteDelegate) { GridWidth = new GridLength(1.8, GridUnitType.Star) }, new OnScreenKeyModifier(3, 00, new[] { "Shift" }, OnScreenKeyModifierType.Shift) { GridWidth = new GridLength(2.4, GridUnitType.Star) }, new OnScreenKeyNormal(3, 01, new[] { "z", "Z", "ζ" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 02, new[] { "x", "X", "ξ", "Ξ" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 03, new[] { "c", "C", "χ", "Χ" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 04, new[] { "v", "V" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 05, new[] { "b", "B", "β" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 06, new[] { "n", "N" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 07, new[] { "m", "M", "μ" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 08, new[] { ",", "<", "≤" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 09, new[] { ".", ">", "≥" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyNormal(3, 10, new[] { "/", "?" }, CaptionUpdateDelegateDelegateFunction.ShiftAndSpecial), new OnScreenKeyModifier(3, 11, new[] { "Shift" }, OnScreenKeyModifierType.Shift) { GridWidth = new GridLength(2.4, GridUnitType.Star) }, new OnScreenKeySpecial(4, 00, "Clear", ExecuteDelegateFunctions.ClearExecuteDelegate), new OnScreenKeyModifier(4, 01, new [] { "Special" }, OnScreenKeyModifierType.Special), new OnScreenKeySpecial(4, 02, string.Empty, " ") { GridWidth = new GridLength(5, GridUnitType.Star) }, new OnScreenKeySpecial(4, 03, "Save", nameof(SaveCommand)) { ClickCommand = nameof(SaveCommand) }, new OnScreenKeySpecial(4, 04, "Cancel", nameof(CancelCommand)) { ClickCommand = nameof(CancelCommand) }, }; mainSection.Keys = mainKeys; mainSection.SetValue(ColumnProperty, 0); _sections.Add(mainSection); ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(3, GridUnitType.Star) }); Children.Add(mainSection); _allOnScreenKeys.AddRange(mainSection.Keys); //var specialSection = new OnScreenKeyboardSection(); //var specialKeys = new ObservableCollection<OnScreenKey> // { // new OnScreenKeyNormal ( 0, 0, Key = new ChordKey("Select All", VirtualKeyCode.CONTROL, VirtualKeyCode.VK__A), GridWidth = new GridLength(2, GridUnitType.Star)}, // new OnScreenKeyNormal ( 0, 1, Key = new ChordKey("Undo", VirtualKeyCode.CONTROL, VirtualKeyCode.VK__Z) }, // new OnScreenKeyNormal ( 1, 0, Key = new ChordKey("Copy", VirtualKeyCode.CONTROL, VirtualKeyCode.VK__C) }, // new OnScreenKeyNormal ( 1, 1, Key = new ChordKey("Cut", VirtualKeyCode.CONTROL, VirtualKeyCode.VK__X) }, // new OnScreenKeyNormal ( 1, 2, Key = new ChordKey("Paste", VirtualKeyCode.CONTROL, VirtualKeyCode.VK__V) }, // new OnScreenKeyNormal ( 2, 0, Key = new VirtualKey(VirtualKeyCode.DELETE, "Del") }, // new OnScreenKeyNormal ( 2, 1, Key = new VirtualKey(VirtualKeyCode.HOME, "Home") }, // new OnScreenKeyNormal ( 2, 2, Key = new VirtualKey(VirtualKeyCode.END, "End") }, // new OnScreenKeyNormal ( 3, 0, Key = new VirtualKey(VirtualKeyCode.PRIOR, "PgUp") }, // new OnScreenKeyNormal ( 3, 1, Key = new VirtualKey(VirtualKeyCode.UP, "Up") }, // new OnScreenKeyNormal ( 3, 2, Key = new VirtualKey(VirtualKeyCode.NEXT, "PgDn") }, // new OnScreenKeyNormal ( 4, 0, Key = new VirtualKey(VirtualKeyCode.LEFT, "Left") }, // new OnScreenKeyNormal ( 4, 1, Key = new VirtualKey(VirtualKeyCode.DOWN, "Down") }, // new OnScreenKeyNormal ( 4, 2, Key = new VirtualKey(VirtualKeyCode.RIGHT, "Right") }, // }; //specialSection.Keys = specialKeys; //specialSection.SetValue(ColumnProperty, 1); //_sections.Add(specialSection); //ColumnDefinitions.Add(new ColumnDefinition()); //Children.Add(specialSection); //_allOnScreenKeys.AddRange(specialSection.Keys); Loaded += OnScreenKeyboard_Loaded; base.BeginInit(); }