Skip to content

Conversation

@l4zygreed
Copy link

Fixing the issue #852

Added AA_MacDontSwapCtrlAndMeta attribute before QApplication initialization.
To ctrl be parsed as <ctrl>
and cmd as <meta>

Replaced isprintable() check with isalnum() plus isascii() to fix key recognition with modifiers
and prevent their change to special symbols/letters with option key.
isalnum check alone allows special letters like åß∂ƒ
and isascii alone allows special empty symbols which brakes letters in ctrl/meta recognition.

Checked changes with both PyQt5 and PyQt6.

Not a python dev, but tried not to make a CtrlMeta swap change to be a garbage code.
Please tell if I need to refactor this.

Will be good if somebody check the changes on Linux/Macos.

Added AA_MacDontSwapCtrlAndMeta attribute before QApplication
initialization.
Replaced isprintable check with isalnum and isascii to fix key
recognition with modifiers and prevent their change to special
symbols/letters with option key.
@l4zygreed l4zygreed force-pushed the feat/macos_modifiers_fix branch from 69e01d7 to 53708a0 Compare January 9, 2025 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant