Skip to content

馃И [Experiment] Localized AccessKey#812

Description

@vgromfeld

Approved from Discussion

#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.

<Button AccessKey="V" Content="Click me" />

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:

Code

<Button AccessKey="{toolkit:LocalizedAccessKey V}" Content="Click me" />

Result

Image

Additional info

No response

Implementation Requirements

  • Working Prototype
  • Feature Complete
  • Documentation
  • Samples
  • Unit Tests
  • Community Feedback / Usage Testimonies

Tested Platforms

  • UWP
  • 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    experiment 馃ИUsed to track issues that are experiments (or their linked discussions)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions