Issue with Ctrl + A Selection in French (AZERTY) Layout in Handsontable 14.0.0

Tags: #<Tag:0x00007efc61c2f7b8>

Issue Description

When using Handsontable with the French (AZERTY) keyboard layout on the Windows operating system, the Ctrl + A keyboard shortcut to select all cells is not functioning as expected. Instead, pressing Ctrl + Q selects all cells.

Steps to Reproduce

  1. Open a page with Handsontable.
  2. Set the keyboard layout to French (AZERTY).
  3. Navigate to the Handsontable instance.
  4. Press Ctrl + A to select all cells.

Expected Behavior

All cells in the Handsontable instance should be selected when pressing Ctrl + A in the French (AZERTY) keyboard layout

Actual Behavior

Pressing Ctrl + A behaves as the default behavior of selecting all text on the entire page, rather than the expected behavior of selecting all cells. Instead, pressing Ctrl + Q is selecting all cells.

Additional Information

  • Handsontable Version: 14.0.0
  • Browser: Chrome 120.0.6099.217 / Firefox 121.0.1
  • Operating System: Windows 10 Professionnel

Technical Explanation

The issue arises from the normalizeEventKey (https://github.com/handsontable/handsontable/blob/develop/handsontable/src/shortcuts/utils.js#L83) method being based on the code property. In the AZERTY layout, the code for the ‘A’ key is ‘KeyQ’. Consequently, when the normalizeEventKey method transforms this code , it results in ‘Q’. As a result, pressing Ctrl + Q selects all cells instead of Ctrl + A . Adjusting the normalizeEventKey function to consider the specificities of the AZERTY layout would resolve this issue.

Thank you for sharing the report @anouar.bouakkez

We did not test any shortcuts on AZERTY or QWERTZ keyboards.

I will report it internally and contact you as soon as I get any feedback.

Hi @anouar.bouakkez

We just released Handsontable14.5 which fixes the bug: https://github.com/handsontable/handsontable/pull/11027