Fixed issue with xaml files not being copied over. Updated readme.md and version
|
@ -17,7 +17,7 @@
|
|||
<Description>
|
||||
This package includes a set of UI controls optimized for eye gaze interaction.
|
||||
</Description>
|
||||
<Version>0.1.0</Version>
|
||||
<Version>0.2.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -29,16 +29,16 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="KeyboardLayouts\FilenameEntry.xaml">
|
||||
<Content Include="KeyboardLayouts\FilenameEntry.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="KeyboardLayouts\FullKeyboard.xaml">
|
||||
<Content Include="KeyboardLayouts\FullKeyboard.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="KeyboardLayouts\MinAAC.xaml">
|
||||
<Content Include="KeyboardLayouts\MinAAC.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="KeyboardLayouts\TwoStageKeyboard.xaml">
|
||||
<Content Include="KeyboardLayouts\TwoStageKeyboard.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
|
|
@ -148,7 +148,7 @@ namespace CommunityToolkit.Labs.Uwp.GazeControls
|
|||
|
||||
GazeKeyboard.Target = FilenameTextbox;
|
||||
|
||||
var uri = new Uri($"ms-appx:///CommunityToolkit.Labs.Uwp.GazeControls/KeyboardLayouts/FilenameEntry.xaml");
|
||||
var uri = new Uri($"ms-appx:///CommunityToolkit.Labs.Uwp.GazeControls/KeyboardLayouts/FilenameEntry.xml");
|
||||
var layoutFile = await StorageFile.GetFileFromApplicationUriAsync(uri);
|
||||
await GazeKeyboard.TryLoadLayoutAsync(layoutFile);
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ VisualStudioVersion = 16.0.31424.327
|
|||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommunityToolkit.Labs.Uwp.GazeControls", "CommunityToolkit.Labs.Uwp.GazeControls\CommunityToolkit.Labs.Uwp.GazeControls.csproj", "{352191F5-8704-45A1-ACB3-CA47C6898A99}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GazeInputTest", "GazeInputTest\GazeInputTest.csproj", "{6708804D-52D7-4F38-A20A-816EC74BC59A}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GazeControlsTest", "GazeControlsTest\GazeControlsTest.csproj", "{6708804D-52D7-4F38-A20A-816EC74BC59A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
|
До Ширина: | Высота: | Размер: 1.4 KiB После Ширина: | Высота: | Размер: 1.4 KiB |
До Ширина: | Высота: | Размер: 7.5 KiB После Ширина: | Высота: | Размер: 7.5 KiB |
До Ширина: | Высота: | Размер: 2.9 KiB После Ширина: | Высота: | Размер: 2.9 KiB |
До Ширина: | Высота: | Размер: 1.6 KiB После Ширина: | Высота: | Размер: 1.6 KiB |
До Ширина: | Высота: | Размер: 1.2 KiB После Ширина: | Высота: | Размер: 1.2 KiB |
До Ширина: | Высота: | Размер: 1.4 KiB После Ширина: | Высота: | Размер: 1.4 KiB |
До Ширина: | Высота: | Размер: 3.1 KiB После Ширина: | Высота: | Размер: 3.1 KiB |
|
@ -6,8 +6,8 @@
|
|||
<ProjectGuid>{6708804D-52D7-4F38-A20A-816EC74BC59A}</ProjectGuid>
|
||||
<OutputType>AppContainerExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>GazeInputTest</RootNamespace>
|
||||
<AssemblyName>GazeInputTest</AssemblyName>
|
||||
<RootNamespace>GazeControlsTest</RootNamespace>
|
||||
<AssemblyName>GazeControlsTest</AssemblyName>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
||||
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
|
|
@ -6,7 +6,7 @@
|
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:g="using:Microsoft.Toolkit.Uwp.Input.GazeInteraction"
|
||||
xmlns:k="using:CommunityToolkit.Labs.Uwp.GazeControls"
|
||||
xmlns:gc="using:CommunityToolkit.Labs.Uwp.GazeControls"
|
||||
g:GazeInput.Interaction="Enabled"
|
||||
mc:Ignorable="d">
|
||||
|
||||
|
@ -84,7 +84,7 @@
|
|||
<Button x:Name="Prediction1" Height="100" MinWidth="300" Style="{StaticResource Alpha}" />
|
||||
<Button x:Name="Prediction2" Height="100" MinWidth="300" Style="{StaticResource Alpha}" />
|
||||
</StackPanel>
|
||||
<k:GazeKeyboard Grid.Row="2" x:Name="GazeKeyboard"/>
|
||||
<gc:GazeKeyboard Grid.Row="2" x:Name="GazeKeyboard"/>
|
||||
</Grid>
|
||||
<Grid Grid.Column="2">
|
||||
<Grid.RowDefinitions>
|
|
@ -41,7 +41,7 @@ namespace GazeInputTest
|
|||
|
||||
private async void OnMainPageLoaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var uri = new Uri($"ms-appx:///CommunityToolkit.Labs.Uwp.GazeControls/KeyboardLayouts/MinAAC.xaml");
|
||||
var uri = new Uri($"ms-appx:///CommunityToolkit.Labs.Uwp.GazeControls/KeyboardLayouts/MinAAC.xml");
|
||||
var layoutFile = await StorageFile.GetFileFromApplicationUriAsync(uri);
|
||||
_layoutsFolder = await layoutFile.GetParentAsync();
|
||||
await GazeKeyboard.TryLoadLayoutAsync(layoutFile);
|
||||
|
@ -126,7 +126,7 @@ namespace GazeInputTest
|
|||
picker.Favorites = new List<StorageFolder>();
|
||||
picker.Favorites.Add(_layoutsFolder);
|
||||
picker.Favorites.Add(library.SaveFolder);
|
||||
picker.FileTypeFilter.Add(".xaml");
|
||||
picker.FileTypeFilter.Add(".xml");
|
||||
picker.CurrentFolder = library.SaveFolder;
|
||||
await picker.ShowAsync();
|
||||
var file = picker.SelectedItem;
|
49
README.md
|
@ -4,7 +4,7 @@ Eye gaze as a form of input is similar to mouse, pen and touch in the sense that
|
|||
|
||||
Eye gaze is less precise than pen, touch and mouse. The measurement errors are larger due to lighting and environmental conditions. There is a larger variance among user populations. There is a diversity in the quality and calibration accuracy among different trackers. When these factors are considered, it becomes apparent that a user interface designed for mouse, pen or touch cannot be directly used for effective eye gaze interaction. Just as user interfaces originally designed for mouse were modified to suit touch interaction, we need to modify the existing user interfaces to be compatible with eye gaze input.
|
||||
|
||||
The GazeControls library, built on the [GazeInteraction Library](https://github.com/MicrosoftDocs/WindowsCommunityToolkitDocs/blob/master/docs/gaze/GazeInteractionLibrary.md), includes a set of user controls that can be reused in different applications with eye gaze input. Instead of trying to design controls for all forms of input simultaneously these set of controls are designed primarily for eye gaze input.
|
||||
The GazeControls library, built on the [GazeInteraction Library](https://docs.microsoft.com/en-us/windows/communitytoolkit/gaze/gazeinteractionlibrary#prerequisites), includes a set of user controls that can be reused in different applications with eye gaze input. Instead of trying to design controls for all forms of input simultaneously these set of controls are designed primarily for eye gaze input.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
@ -12,6 +12,15 @@ Since the GazeControls library is built on top of the GazeInteraction library, t
|
|||
|
||||
There are additional prerequisites for each of the controls and they are listed below in the context of the documentation for the specific control.
|
||||
|
||||
## Nuget Feed
|
||||
To use the GazeControls library, please do the following:
|
||||
1. Add a new nuget feed either in `nuget.config` or Visual Studio by clicking on Tools...Options...Nuget Package Manager...Package Sources and adding a new entry with the following details:
|
||||
* Name: `CommunityToolkit-Labs`
|
||||
* Source: `https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-Labs/nuget/v3/index.json`
|
||||
2. Add a reference to `CommunityToolkit.Labs.Uwp.GazeControls` from the above nuget feed
|
||||
|
||||
Please refer to the documentation below on how to use specific controls.
|
||||
|
||||
## Supported controls
|
||||
|
||||
The library currently supports the following user controls.
|
||||
|
@ -67,18 +76,30 @@ To use any of the above layouts, please do the following:
|
|||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<gc:GazeKeyboard x:Name="GazeKeyboard" Grid.Row="1"
|
||||
LayoutUri="ms-appx:///Microsoft.Toolkit.Uwp.Input.GazeControls/KeyboardLayouts/MinAAC.xaml" />
|
||||
<gc:GazeKeyboard x:Name="GazeKeyboard" Grid.Row="1" />
|
||||
|
||||
</Grid>
|
||||
```
|
||||
|
||||
* Load a keyboard layout after the `Page` has loaded with code similar to the following:
|
||||
```
|
||||
private async void LoadKeyboardLayout()
|
||||
{
|
||||
var uri = new Uri($"ms-appx:///CommunityToolkit.Labs.Uwp.GazeControls/KeyboardLayouts/MinAAC.xml");
|
||||
var layoutFile = await StorageFile.GetFileFromApplicationUriAsync(uri);
|
||||
await GazeKeyboard.TryLoadLayoutAsync(layoutFile);
|
||||
GazeKeyboard.Target = TheTextBox;
|
||||
GazeKeyboard.PredictionTargets = new Button[] { Prediction0, Prediction1, Prediction2 };
|
||||
}
|
||||
```
|
||||
### Custom layouts - Simple
|
||||
|
||||
You can also define your own custom layouts, include it in your application and change the layouts on the fly by assigning the `LayoutUri` property of the keyboard control to the URI of your custom keyboard layout as shown above.
|
||||
|
||||
Custom layouts are specified directly using XAML and a few attached properties that dictate their behavior. The best way to create new layouts, is to use one of the built-in layouts as a starting point and copy and modify them to your own needs.
|
||||
|
||||
**NOTE: Keyboard layouts are specified in XAML but the file is saved with a .xml extension**
|
||||
|
||||
The behavior of the button when it is clicked is governed by a few rules:
|
||||
|
||||
* The top-level element must be a `Grid`. (In the simple case, having a name for the `Grid` is optional.)
|
||||
|
@ -91,7 +112,7 @@ The behavior of the button when it is clicked is governed by a few rules:
|
|||
<Button Style="{StaticResource Symbol}" Content="" k:GazeKeyboard.VK="8"/>
|
||||
```
|
||||
|
||||
* If a button has the `VKList` property, the control expects a set of virtual key codes as `Int32` values and injects that list of keys in sequence. E.g. in `MinAAC.xaml` you can see the `VKList` property assigned for clearing the textbox as follows.
|
||||
* If a button has the `VKList` property, the control expects a set of virtual key codes as `Int32` values and injects that list of keys in sequence. E.g. in `MinAAC.xml` you can see the `VKList` property assigned for clearing the textbox as follows.
|
||||
|
||||
```
|
||||
<Button Grid.Row="2" Grid.Column="9" Style="{StaticResource Symbol}" Content="">
|
||||
|
@ -122,7 +143,7 @@ The behavior of the button when it is clicked is governed by a few rules:
|
|||
When the number of keys in the layout is larger than what the application can display (and still have space left over for the actual application needs), it can choose to split up the layout into multiple pages. When this is done, the XAML layout for the custom layout should follow the rules below:
|
||||
|
||||
* The top level `Grid` should have a name specified with `x:Name` property.
|
||||
* There should be a `GazeKeyboard.PageList` in the layout. This node should include a list of strings that specify the names of other `Grid` notes, which define the separate pages in the layout. The example below is taken from `FullKeyboard.xaml`
|
||||
* There should be a `GazeKeyboard.PageList` in the layout. This node should include a list of strings that specify the names of other `Grid` notes, which define the separate pages in the layout. The example below is taken from `FullKeyboard.xml`
|
||||
|
||||
```
|
||||
<k:GazeKeyboard.PageList>
|
||||
|
@ -160,7 +181,6 @@ When the number of keys in the layout is larger than what the application can di
|
|||
| -- | -- | -- |
|
||||
| Target | TextBox | Gets or sets the target text box for injecting keys |
|
||||
| PredictionLanguage | string | Gets or sets the text prediction language |
|
||||
| LayoutUri | Uri | Gets or sets the URI of the layout file for the keyboard |
|
||||
| PredictionTargets | Button[] | Gets or sets the prediction targets buttons. When text prediction is available, the content of the buttons it set to the prediction text. |
|
||||
|
||||
## GazeFileOpenPicker and GazeFileSavePicker
|
||||
|
@ -280,21 +300,8 @@ The GazeScrollbar has two pairs of buttons for each direction of scrolling. E.g.
|
|||
| LineWidth | double | Gets or sets the distance to scroll horizontally when a line-left or line-right button is pressed |
|
||||
| LineHeight | double | Gets or sets the distance to scroll vertically when a line-up or line-down button is pressed |
|
||||
|
||||
## Sample Project
|
||||
|
||||
[GazeControlsPage](https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/rel/7.0.0/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/GazeControls/). You can [see this in action](uwpct://Gaze?sample=GazeControls) in the [Windows Community Toolkit Sample App](https://aka.ms/windowstoolkitapp).
|
||||
|
||||
## Requirements
|
||||
## 🧪 This project is under Community Toolkit Labs. What does that mean?
|
||||
|
||||
| Device family | Universal,10.0.17134.1 or higher |
|
||||
| -- | -- |
|
||||
| Namespace | Microsoft.Toolkit.Uwp.Input.GazeControls |
|
||||
| NuGet package | [NuGet package](https://www.nuget.org/packages/Microsoft.Toolkit.Uwp.Input.GazeControls/) |
|
||||
|
||||
## API
|
||||
|
||||
* [Gaze Controls Library source code](https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/rel/7.0.0/Microsoft.Toolkit.Uwp.Input.GazeControls)
|
||||
|
||||
## Related Topics
|
||||
|
||||
* [Windows 10 Gaze Input APIs](/uwp/api/windows.devices.input.preview)
|
||||
[Community Toolkit Labs](https://aka.ms/toolkit/wiki/labs) is a place for rapidly prototyping ideas and gathering community feedback. It is an incubation space where the developer community can come together to work on new ideas before thinking about final quality gates and ship cycles. Developers can focus on the scenarios and usage of their features before finalizing docs, samples, and tests required to ship a complete idea within the Toolkit.
|
||||
|
|