Configuration macOS 12.5, GTK 3.24.33 (build with jhbuild from gtkosx).
I get a key pressed event from a window and I display the key value (gdk_event_get_keyval), modifiers (gdk_event_get_state) and label (gtk_accelerator_get_label).
Here is the Key A with various modifiers:
Get_Default_Mod_Mask: 16#1C00001D#
Key - Modifier - Label
97 - 16#0# - A
65505 - 16#0# - Shift L
65 - 16#1# - ⇧A
65507 - 16#0# - Control L
97 - 16#4# - ⌃A
65513 - 16#0# - Alt L
230 - 16#8# - ⌥Æ
65511 - 16#0# - Meta L
97 - 16#10000010# - Mod2⌘A
For the Cmd key, MOD2 and META are together set (10000010) thus the label function is puzzled and returns both: Mod2⌘A.
Is it a macOS issue in firing both MOD2 and META?
Is it a GTK issue in gtk_accelerator_get_label?
By the way, with option / alt modifier, the label function returns the macOS character corresponding to A (⌥Æ) and not ⌥A?
If this post is off topic, please indicate where may I post.
Thanks, Pascal.