MCPcopy Create free account
hub / github.com/deskflow/deskflow / getModifierStateAsOSXFlags

Method getModifierStateAsOSXFlags

src/lib/platform/OSXKeyState.cpp:370–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368}
369
370CGEventFlags OSXKeyState::getModifierStateAsOSXFlags() const
371{
372 CGEventFlags modifiers = 0;
373
374 if (m_shiftPressed) {
375 modifiers |= kCGEventFlagMaskShift;
376 }
377
378 if (m_controlPressed) {
379 modifiers |= kCGEventFlagMaskControl;
380 }
381
382 if (m_altPressed) {
383 modifiers |= kCGEventFlagMaskAlternate;
384 }
385
386 if (m_superPressed) {
387 modifiers |= kCGEventFlagMaskCommand;
388 }
389
390 if (m_capsPressed) {
391 modifiers |= kCGEventFlagMaskAlphaShift;
392 }
393
394 return modifiers;
395}
396
397KeyModifierMask OSXKeyState::pollActiveModifiers() const
398{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected