Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maximcus/WPFTabTip
Simple TabTip / Virtual Keyboard integration for WPF apps on Win 8.1 and Win 10
https://github.com/maximcus/WPFTabTip
osk tabtip virtual-keyboard wpf
Last synced: 13 days ago
JSON representation
Simple TabTip / Virtual Keyboard integration for WPF apps on Win 8.1 and Win 10
- Host: GitHub
- URL: https://github.com/maximcus/WPFTabTip
- Owner: maximcus
- License: mit
- Created: 2016-08-15T06:46:33.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-13T14:20:15.000Z (about 6 years ago)
- Last Synced: 2024-05-29T18:59:26.386Z (30 days ago)
- Topics: osk, tabtip, virtual-keyboard, wpf
- Language: C#
- Homepage:
- Size: 48.8 KB
- Stars: 99
- Watchers: 9
- Forks: 45
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Lists
- awesome-wpf - WPFTabTip - (FREE, OPEN SOURCE) Simple TabTip / Virtual Keyboard integration for WPF apps on Win 8.1 and Win 10. (Libraries / Individual Controls)
README
# WPFTabTip
Simple TabTip / Virtual Keyboard integration for WPF apps on Win 8.1 and Win 10## Simple to use
The easiest way to install the WPFTabTip is using the [Package Manager Console](https://docs.NuGet.org/consume/package-manager-console) in Visual Studio:
~~~powershell
PM> Install-Package WPFTabTip
~~~One line of code in your startup logic, and you good to go!
```c#
TabTipAutomation.BindTo();
```You can bind TabTip automation logic to any `UIElement`. Virtual Keyboard will open when any such element will get focus, and it will close when element will lose focus. Not only that, but `TabTipAutomation` will move `UIElement` (or `Window`) into view, so that TabTip will not block focused element.
## Hardware keyboard detection
By default TabTip automation will occur only if no hardware keyboard is detected.
You can change that behavior by setting `TabTipAutomation.IgnoreHardwareKeyboard` to any of the following values:
```c#
public enum HardwareKeyboardIgnoreOptions
{
///
/// Do not ignore any keyboard.
///
DoNotIgnore,///
/// Ignore keyboard, if there is only one, and it's description
/// can be found in ListOfKeyboardsToIgnore.
///
IgnoreIfSingleInstanceOnList,///
/// Ignore keyboard, if there is only one.
///
IgnoreIfSingleInstance,
///
/// Ignore all keyboards for which the description
/// can be found in ListOfKeyboardsToIgnore
///
IgnoreIfOnList,///
/// Ignore all keyboards
///
IgnoreAll
}
```If you want to ignore specific keyboard you should set `TabTipAutomation.IgnoreHardwareKeyboard` to either `IgnoreIfSingleInstanceOnList` or `IgnoreIfOnList`, and add keyboard description to `TabTipAutomation.ListOfKeyboardsToIgnore`.
To get description of keyboards connected to machine you can use following code:
```c#
new ManagementObjectSearcher(new SelectQuery("Win32_Keyboard")).Get()
.Cast()
.SelectMany(keyboard =>
keyboard.Properties
.Cast()
.Where(k => k.Name == "Description")
.Select(k => k.Value as string))
.ToList();
```## Change keyboard layout
To specify keyboard layout to be used with certain element you can set `InputScope` property in xaml to one of the following:
- Default
- Url
- EmailSmtpAddress
- Number