MCPcopy Create free account
hub / github.com/Skycoder42/QHotkey / nativeModifiers

Method nativeModifiers

QHotkey/qhotkey_mac.cpp:186–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186quint32 QHotkeyPrivateMac::nativeModifiers(Qt::KeyboardModifiers modifiers, bool &ok)
187{
188 quint32 nMods = 0;
189 if (modifiers & Qt::ShiftModifier)
190 nMods |= shiftKey;
191 if (modifiers & Qt::ControlModifier)
192 nMods |= cmdKey;
193 if (modifiers & Qt::AltModifier)
194 nMods |= optionKey;
195 if (modifiers & Qt::MetaModifier)
196 nMods |= controlKey;
197 if (modifiers & Qt::KeypadModifier)
198 nMods |= kEventKeyModifierNumLockMask;
199 ok = true;
200 return nMods;
201}
202
203bool QHotkeyPrivateMac::registerShortcut(QHotkey::NativeShortcut shortcut)
204{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected