ckb-next  v0.2.8 at branch master
ckb-next driver for corsair devices
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Key Struct Reference

#include <src/ckb/keymap.h>

+ Collaboration diagram for Key:

Public Member Functions

const char * storageName () const
 
QString friendlyName (bool os=true) const
 
 operator bool () const
 
bool operator! () const
 

Data Fields

const char * _storageName
 
const char * _friendlyName
 
const char * name
 
short x
 
short y
 
short width
 
short height
 
bool hasLed
 
bool hasScan
 

Detailed Description

Definition at line 8 of file keymap.h.

Member Function Documentation

QString Key::friendlyName ( bool  os = true) const
inline

Definition at line 23 of file keymap.h.

References _friendlyName, and name.

Referenced by KbBind::friendlyName(), KeyWidget::mouseMoveEvent(), KeyWidget::paintEvent(), RebindWidget::setBind(), and KbBindWidget::updateSelDisplay().

23  {
24  if(os){
25 #ifdef Q_OS_MACX
26  if(!strcmp(name, "lwin")) return "Left Cmd";
27  if(!strcmp(name, "rwin")) return "Right Cmd";
28  if(!strcmp(name, "lalt")) return "Left Option";
29  if(!strcmp(name, "ralt")) return "Right Option";
30  if(!strcmp(name, "prtscn")) return "F13";
31  if(!strcmp(name, "scroll")) return "F14";
32  if(!strcmp(name, "pause")) return "F15";
33  if(!strcmp(name, "ins")) return "Help";
34  if(!strcmp(name, "numlock")) return "Clear";
35 #elif defined(Q_OS_LINUX)
36  if(!strcmp(name, "lwin")) return "Left Super";
37  if(!strcmp(name, "rwin")) return "Right Super";
38 #endif
39  }
40  return _friendlyName ? _friendlyName : QString(name).toUpper();
41  }
const char * name
Definition: keymap.h:14
const char * _friendlyName
Definition: keymap.h:13

+ Here is the caller graph for this function:

Key::operator bool ( ) const
inline

Definition at line 44 of file keymap.h.

References name.

44 { return name != 0; }
const char * name
Definition: keymap.h:14
bool Key::operator! ( ) const
inline

Definition at line 45 of file keymap.h.

45 { return !(bool)*this; }
const char* Key::storageName ( ) const
inline

Definition at line 11 of file keymap.h.

References _storageName, and name.

Referenced by KeyMap::toStorage().

11 { return _storageName ? _storageName : name; }
const char * _storageName
Definition: keymap.h:10
const char * name
Definition: keymap.h:14

+ Here is the caller graph for this function:

Field Documentation

const char* Key::_friendlyName

Definition at line 13 of file keymap.h.

Referenced by _patch(), and friendlyName().

const char* Key::_storageName

Definition at line 10 of file keymap.h.

Referenced by _patch(), and storageName().

bool Key::hasScan
short Key::height

The documentation for this struct was generated from the following file: