OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4ConsoleQtViewport.cpp File Reference
Include dependency graph for C4ConsoleQtViewport.cpp:

Go to the source code of this file.

Functions

uint32_t GetShiftWParam (QKeyEvent *event=nullptr)
 

Function Documentation

uint32_t GetShiftWParam ( QKeyEvent *  event = nullptr)

Definition at line 152 of file C4ConsoleQtViewport.cpp.

153 {
154  auto modifiers = event ? event->modifiers() : QGuiApplication::keyboardModifiers();
155  uint32_t result = 0;
156  if (modifiers & Qt::ShiftModifier) result |= MK_SHIFT;
157  if (modifiers & Qt::ControlModifier) result |= MK_CONTROL;
158  if (modifiers & Qt::AltModifier) result |= MK_ALT;
159  return result;
160 }