Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Donald-Scott/VisualKeyboard
WPF on screen keyboard
https://github.com/Donald-Scott/VisualKeyboard
Last synced: 5 days ago
JSON representation
WPF on screen keyboard
- Host: GitHub
- URL: https://github.com/Donald-Scott/VisualKeyboard
- Owner: Donald-Scott
- License: apache-2.0
- Created: 2019-06-19T13:29:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-03T15:27:31.000Z (over 5 years ago)
- Last Synced: 2024-10-12T18:24:33.109Z (about 1 month ago)
- Language: C#
- Homepage:
- Size: 85.9 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://dev.azure.com/donscott123/Visual%20Keyboard/_apis/build/status/Donald-Scott.VisualKeyboard?branchName=master)](https://dev.azure.com/donscott123/Visual%20Keyboard/_build/latest?definitionId=1&branchName=master)
WPF on screen keyboard
Inspired by [WPF Touch Screen Keyboard](https://github.com/imasm/wpfkb).The visual keyboard control is a WPF control derived from Grid. Attached properties allow child elements of the keyboard to behave as keys of the keyboard.
The WPF Touch Screen Keyboard was the inspiration for this control. I felt the Touch Screen Keyboard's behavior was too tightly coupled to it's display logic. This prompted me to create the Visual Keyboard control.
There are five different defined key behaviors:
- Virtual Keys - This key behavior generates input based on a specified virtual key code.
- Instantaneous Modifier Keys – This key behavior modifies the input for the next key code that is entered. Examples of Instantaneous Modifier Keys are the Shift, Ctrl and Alt.
- Toggling Modifier Keys – This key behavior is similar to the Instantaneous Modifier Keys but the modifier remains in effect until it is turned off by pressing the key a second time.
- Chord Keys – This key behavior combines one or more modifier keys with a virtual key. A “Copy” command can be executed via a single key press by defining a chord key with a modifier of Ctrl plus a virtual key of “C”.
- Text Keys – This key behavior allows multiple text characters to be input via a single key.### Usage
##### Include the Visual Keyboard namespace
```XML
xmlns:kbd="clr-namespace:VisualKeyboard.Control;assembly=VisualKeyboard.Control"
```
##### Add Keyboard control and add child elements to act as keys
```XML
```
![alt text](https://github.com/Donald-Scott/VisualKeyboard/blob/master/VisualKeyboard.Examples/Images/qwe_kbd.png "Sample keyboard")Since the behaviour of the keyboad keys are defined using attached properties any UIElement that can be added to a Grid can be used as a keyboard key. If you want to add additional buttons that execute a command other than keyboard input, no problem, just set the KeyBehaviour attached property to "none" or omit this attached property all together and the button will not ack as a keyboard key.