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
- Open a page with Handsontable.
- Set the keyboard layout to French (AZERTY).
- Navigate to the Handsontable instance.
- 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.