CommunityToolkit / CommunityToolkit/Labs-Windows
🧪 [Experiment] Localized AccessKey
- Dominant language
- C#
- Stars
- 482
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
### Approved from Discussion
https://github.com/CommunityToolkit/Labs-Windows/discussions/811
### Problem Statement
By default, WinUI requires the user to type exactly the requested access key sequence to trigger an access key.
The mapping is done using the characters not the key codes.
Not all characters can be typed on all keyboard layouts.
For example, the latin character "V" is not available on the Greek keyboard layout. It is replaced by "Ω".
This means that a button defined with the following XAML fragment won't be reachable through its access key when using a Greek keyboard.
```xml
```
The user will have to switch the the English (or any other latin) keyboard layout to be able to type "V".
### Overview
This experiment adds the following component:
- **LocalizedAccessKey** a markup extension which will convert a sequence of `VirtualKey` to their corresponding characters based on the current keyboard layout.
### Using
You can try it out via the NuGet Packages here:
- UWP: https://dev.azure.com/dotnet/CommunityToolkit/_artifacts/feed/CommunityToolkit-Labs/NuGet/CommunityToolkit.Labs.Uwp.LocalizedAccessKey/overview/0.0.1
- WinUI 3: https://dev.azure.com/dotnet/CommunityToolkit/_artifacts/feed/CommunityToolkit-Labs/NuGet/CommunityToolkit.Labs.WinUI.LocalizedAccessKey/overview/0.0.1
Read more about [Preview Packages here](https://aka.ms/wct/wiki/previewpackages).
**Code**
```xml
```
**Result**
### Additional info
_No response_
### Implementation Requirements
- [x] Working Prototype
- [x] Feature Complete
- [x] Documentation
- [x] Samples
- [ ] Unit Tests
- [ ] Community Feedback / Usage Testimonies
### Tested Platforms
- [ ] UWP
- [x] WinAppSDK / WinUI 3
- [ ] Web Assembly (WASM)
- [ ] Android
- [ ] iOS
- [ ] MacOS
- [ ] Linux / GTK
### Technical Review
- [ ] Accessibility Audit
- [ ] API/Naming Review
- [ ] Code Quality/Style
- [ ] Dependency Review
- [ ] Design/Style Review
- [ ] Final Approval
### Community Help?
None
Contributor guide
Assessment
This issue has not been assessed yet.