Tk Source Code

View Ticket
Login
Ticket UUID: bbd5398a7f52a9143ebee200c350f655d0856355
Title: event-8.1 fails with a French AZERTY keyboard layout
Type: Bug Version: trunk
Submitter: nab Created on: 2026-10-28 12:12:26
Subsystem: 01. Bindings Assigned To: jan.nijtmans
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2026-10-29 16:15:19
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2026-10-29 16:15:19
Description:

On Windows 11 with a French AZERTY layout, event-8.1 (added for 433261290b) fails on trunk b728a5f53d:

---- Result was:
c C c &
---- Result should have been (exact matching):
c C c 1

On AZERTY the digit row gives Latin-1 characters without Shift (&, U+00E9, ", ', (, ...). TkpGetKeySym() keeps them, since the Latin letter or digit of the virtual key is only used when the keysym is NoSymbol or above 0xFF. So Ctrl + the "1" key gives ampersand, and <Control-Key-1> does not fire for it.

User Comments: jan.nijtmans added on 2026-10-29 16:15:19:

Fixed in [44fcc3d7|trunk], core-9-0-branch and core-8-6-branch

Many thanks!


nab added on 2026-10-28 15:01:27:

Confirmed on Windows 11 with a French AZERTY layout: tests/event.test from 09211e1a24 passes (event-8.1 and event-8.1.1 included) with a trunk b728a5f53d build.


serhiy.storchaka added on 2026-10-28 14:10:39:

Fixed on branch event-test-keyboard-layouts: the digit key is tested separately, and the expected keysyms are computed from the layout.

Tested on Windows 11 with the US, French, Ukrainian, Lithuanian, Czech, German, Hungarian, Polish, Russian, Turkish, Arabic, Armenian, Georgian and Vietnamese layouts, and on X11 with combinations of us, ua, lt and fr. Not tested on macOS.