Skip to content

Question: how to specify KeyMod of Control for all platforms? #229

@psobolewskiPhD

Description

@psobolewskiPhD

KeyMod.CtrlCmd results in Ctrl on windows (and linux?) but Cmd on macOS
KeyMod.WinCtrl says it does Meta on Windows and Ctrl on macOS

Is there a way to specify a Control-Foo binding that uses Control on all platforms?
KeyMod.Ctrl does't exist, but there is KeyCode.Ctrl

Based on

KEYMOD_FROM_QT = {
Qt.KeyboardModifier.NoModifier: KeyMod.NONE,
QALT: KeyMod.Alt,
QCTRL: KeyMod.CtrlCmd,
QSHIFT: KeyMod.Shift,
QMETA: KeyMod.WinCtrl,
}
MAC_KEYMOD_FROM_QT = {**KEYMOD_FROM_QT, QCTRL: KeyMod.WinCtrl, QMETA: KeyMod.CtrlCmd}
KEYMOD_TO_QT = {
KeyMod.NONE: Qt.KeyboardModifier.NoModifier,
KeyMod.CtrlCmd: QCTRL,
KeyMod.Alt: QALT,
KeyMod.Shift: QSHIFT,
KeyMod.WinCtrl: QMETA,
}
MAC_KEYMOD_TO_QT = {**KEYMOD_TO_QT, KeyMod.WinCtrl: QCTRL, KeyMod.CtrlCmd: QMETA}

it looks like it wouldn't be easy to have two different KeyMod map to the same QCTRL...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions