OpenClonk
C4KeyboardInput.cpp File Reference
#include "C4Include.h"
#include "gui/C4KeyboardInput.h"
#include "gui/C4MouseControl.h"
#include "c4group/C4Components.h"
#include "platform/C4Window.h"
#include <unordered_map>
Include dependency graph for C4KeyboardInput.cpp:

Go to the source code of this file.

Classes

struct  C4KeyShiftMapEntry
 
struct  C4KeyCodeMapEntry
 

Functions

bool KEY_IsModifier (C4KeyCode k)
 
bool C4KeyboardCallbackInterfaceHasOriginalKey (C4KeyboardCallbackInterface *pIntfc, const C4CustomKey *pCheckKey)
 
C4KeyboardInputC4KeyboardInput_Init ()
 

Variables

const C4KeyShiftMapEntry KeyShiftMap []
 
const C4KeyCodeMapEntry KeyCodeMap []
 

Class Documentation

◆ C4KeyShiftMapEntry

struct C4KeyShiftMapEntry

Definition at line 38 of file C4KeyboardInput.cpp.

Class Members
C4KeyShiftState eShift
const char * szName

◆ C4KeyCodeMapEntry

struct C4KeyCodeMapEntry

Definition at line 70 of file C4KeyboardInput.cpp.

Class Members
const char * szName
const char * szShortName
C4KeyCode wCode

Function Documentation

◆ C4KeyboardCallbackInterfaceHasOriginalKey()

bool C4KeyboardCallbackInterfaceHasOriginalKey ( C4KeyboardCallbackInterface pIntfc,
const C4CustomKey pCheckKey 
)

Definition at line 693 of file C4KeyboardInput.cpp.

References C4KeyboardCallbackInterface::IsOriginalKey().

Referenced by C4CustomKey::KillCallbacks().

694 {
695  return pIntfc->IsOriginalKey(pCheckKey);
696 }
bool IsOriginalKey(const class C4CustomKey *pCheckKey) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ C4KeyboardInput_Init()

C4KeyboardInput& C4KeyboardInput_Init ( )

Definition at line 1005 of file C4KeyboardInput.cpp.

Referenced by C4KeyBinding::C4KeyBinding(), and C4KeyboardInput::SetLastKeyExtraData().

1006 {
1007  static C4KeyboardInput keyinp;
1008  return keyinp;
1009 }
Here is the caller graph for this function:

◆ KEY_IsModifier()

bool KEY_IsModifier ( C4KeyCode  k)

Definition at line 611 of file C4KeyboardInput.cpp.

Referenced by Key_GetMouseEvent().

611  {
612  return k == K_CONTROL_L || k == K_SHIFT_L || k == K_ALT_L ||
613  k == K_CONTROL_R || k == K_SHIFT_R || k == K_ALT_R;
614 }
Here is the caller graph for this function:

Variable Documentation

◆ KeyCodeMap

const C4KeyCodeMapEntry KeyCodeMap[]

Definition at line 80 of file C4KeyboardInput.cpp.

◆ KeyShiftMap

const C4KeyShiftMapEntry KeyShiftMap[]
Initial value:

Definition at line 44 of file C4KeyboardInput.cpp.

Referenced by C4KeyCodeEx::KeyShift2String(), and C4KeyCodeEx::String2KeyShift().