LuciadCPillar 2024.0.08
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
luciad::KeyCode Struct Referencefinal

Represents a key in the controller API. More...

#include <luciad/input/KeyCode.h>

Public Member Functions

constexpr KeyCode (size_t index)
 Creates a new KeyCode with the given index. More...
 
constexpr bool operator!= (const KeyCode &rhs) const
 
constexpr bool operator== (const KeyCode &rhs) const
 

Static Public Member Functions

static const KeyCodea ()
 A key code representing the 'A' key. More...
 
static const KeyCodeasterisk ()
 A key code representing the '*' key. More...
 
static const KeyCodeb ()
 A key code representing the 'B' key. More...
 
static const KeyCodebackspace ()
 A key code representing the backspace key. More...
 
static const KeyCodec ()
 A key code representing the 'C' key. More...
 
static const KeyCoded ()
 A key code representing the 'D' key. More...
 
static const KeyCodedown ()
 A key code representing the down key. More...
 
static const KeyCodee ()
 A key code representing the 'E' key. More...
 
static const KeyCodeeight ()
 A key code representing the '8' key. More...
 
static const KeyCodeend ()
 A key code representing the end key. More...
 
static const KeyCodeescape ()
 A key code representing the escape key. More...
 
static const KeyCodef ()
 A key code representing the 'F' key. More...
 
static const KeyCodefive ()
 A key code representing the '5' key. More...
 
static const KeyCodefour ()
 A key code representing the '4' key. More...
 
static const KeyCodeg ()
 A key code representing the 'G' key. More...
 
static const KeyCodeh ()
 A key code representing the 'H' key. More...
 
static const KeyCodehome ()
 A key code representing the home key. More...
 
static const KeyCodei ()
 A key code representing the 'I' key. More...
 
static const KeyCodej ()
 A key code representing the 'J' key. More...
 
static const KeyCodek ()
 A key code representing the 'K' key. More...
 
static const KeyCodel ()
 A key code representing the 'L' key. More...
 
static const KeyCodeleft ()
 A key code representing the left key. More...
 
static const KeyCodem ()
 A key code representing the 'M' key. More...
 
static const KeyCodeminus ()
 A key code representing the '-' key. More...
 
static const KeyCoden ()
 A key code representing the 'N' key. More...
 
static const KeyCodenine ()
 A key code representing the '9' key. More...
 
static const KeyCodeo ()
 A key code representing the 'O' key. More...
 
static const KeyCodeone ()
 A key code representing the '1' key. More...
 
static const KeyCodep ()
 A key code representing the 'P' key. More...
 
static const KeyCodepageDown ()
 A key code representing the page down key. More...
 
static const KeyCodepageUp ()
 A key code representing the pacge up key. More...
 
static const KeyCodeplus ()
 A key code representing the '+' key. More...
 
static const KeyCodeq ()
 A key code representing the 'Q' key. More...
 
static const KeyCoder ()
 A key code representing the 'R' key. More...
 
static const KeyCoderight ()
 A key code representing the right key. More...
 
static const KeyCodes ()
 A key code representing the 'S' key. More...
 
static const KeyCodeseven ()
 A key code representing the '7' key. More...
 
static const KeyCodesix ()
 A key code representing the '6' key. More...
 
static const KeyCodeslash ()
 A key code representing the '/' key. More...
 
static const KeyCodespace ()
 A key code representing the space key. More...
 
static const KeyCodet ()
 A key code representing the 'T' key. More...
 
static const KeyCodethree ()
 A key code representing the '3' key. More...
 
static const KeyCodetwo ()
 A key code representing the '2' key. More...
 
static const KeyCodeu ()
 A key code representing the 'U' key. More...
 
static const KeyCodeunknown ()
 A key code representing an unknown key. More...
 
static const KeyCodeup ()
 A key code representing the up key. More...
 
static const KeyCodev ()
 A key code representing the 'V' key. More...
 
static const KeyCodew ()
 A key code representing the 'W' key. More...
 
static const KeyCodex ()
 A key code representing the 'X' key. More...
 
static const KeyCodey ()
 A key code representing the 'Y' key. More...
 
static const KeyCodez ()
 A key code representing the 'Z' key. More...
 
static const KeyCodezero ()
 A key code representing the '0' key. More...
 

Public Attributes

size_t index
 The index of the key code. More...
 

Detailed Description

Represents a key in the controller API.

See also
luciad::KeyCode::KeyCode for the key mapping.
luciad::ModifierKeys for the available modifiers to use in conjunction with this class.
Since
2020.1

Constructor & Destructor Documentation

◆ KeyCode()

constexpr luciad::KeyCode::KeyCode ( size_t  index)
inlineexplicitconstexpr

Creates a new KeyCode with the given index.

The key button index maps on to keys as follows:

  • 0 => Unknown
  • 8 => Backspace
  • 27 => Escape
  • 32 => Space
  • 42 => Asterisk
  • 43 => Plus
  • 45 => Minus
  • 47 => Slash
  • 48 => 0
  • 49 => 1
  • ...
  • 57 => 9
  • 65 => A
  • 66 => B
  • ...
  • 90 => Z
  • 200 => Home
  • 201 => End
  • 202 => Left
  • 203 => Up
  • 204 => Right
  • 205 => Down
  • 206 => Page-Up
  • 207 => Page-Down

If needed other indexes can be used if out of those values. For example if you want to handle unicode characters. Please use index values greater than 1024 for custom key codes.

Parameters
indexthe mouse button index.

Member Function Documentation

◆ a()

static const KeyCode & luciad::KeyCode::a ( )
static

A key code representing the 'A' key.

◆ asterisk()

static const KeyCode & luciad::KeyCode::asterisk ( )
static

A key code representing the '*' key.

◆ b()

static const KeyCode & luciad::KeyCode::b ( )
static

A key code representing the 'B' key.

◆ backspace()

static const KeyCode & luciad::KeyCode::backspace ( )
static

A key code representing the backspace key.

◆ c()

static const KeyCode & luciad::KeyCode::c ( )
static

A key code representing the 'C' key.

◆ d()

static const KeyCode & luciad::KeyCode::d ( )
static

A key code representing the 'D' key.

◆ down()

static const KeyCode & luciad::KeyCode::down ( )
static

A key code representing the down key.

◆ e()

static const KeyCode & luciad::KeyCode::e ( )
static

A key code representing the 'E' key.

◆ eight()

static const KeyCode & luciad::KeyCode::eight ( )
static

A key code representing the '8' key.

◆ end()

static const KeyCode & luciad::KeyCode::end ( )
static

A key code representing the end key.

◆ escape()

static const KeyCode & luciad::KeyCode::escape ( )
static

A key code representing the escape key.

◆ f()

static const KeyCode & luciad::KeyCode::f ( )
static

A key code representing the 'F' key.

◆ five()

static const KeyCode & luciad::KeyCode::five ( )
static

A key code representing the '5' key.

◆ four()

static const KeyCode & luciad::KeyCode::four ( )
static

A key code representing the '4' key.

◆ g()

static const KeyCode & luciad::KeyCode::g ( )
static

A key code representing the 'G' key.

◆ h()

static const KeyCode & luciad::KeyCode::h ( )
static

A key code representing the 'H' key.

◆ home()

static const KeyCode & luciad::KeyCode::home ( )
static

A key code representing the home key.

◆ i()

static const KeyCode & luciad::KeyCode::i ( )
static

A key code representing the 'I' key.

◆ j()

static const KeyCode & luciad::KeyCode::j ( )
static

A key code representing the 'J' key.

◆ k()

static const KeyCode & luciad::KeyCode::k ( )
static

A key code representing the 'K' key.

◆ l()

static const KeyCode & luciad::KeyCode::l ( )
static

A key code representing the 'L' key.

◆ left()

static const KeyCode & luciad::KeyCode::left ( )
static

A key code representing the left key.

◆ m()

static const KeyCode & luciad::KeyCode::m ( )
static

A key code representing the 'M' key.

◆ minus()

static const KeyCode & luciad::KeyCode::minus ( )
static

A key code representing the '-' key.

◆ n()

static const KeyCode & luciad::KeyCode::n ( )
static

A key code representing the 'N' key.

◆ nine()

static const KeyCode & luciad::KeyCode::nine ( )
static

A key code representing the '9' key.

◆ o()

static const KeyCode & luciad::KeyCode::o ( )
static

A key code representing the 'O' key.

◆ one()

static const KeyCode & luciad::KeyCode::one ( )
static

A key code representing the '1' key.

◆ operator!=()

constexpr bool luciad::KeyCode::operator!= ( const KeyCode rhs) const
inlineconstexpr

◆ operator==()

constexpr bool luciad::KeyCode::operator== ( const KeyCode rhs) const
inlineconstexpr

◆ p()

static const KeyCode & luciad::KeyCode::p ( )
static

A key code representing the 'P' key.

◆ pageDown()

static const KeyCode & luciad::KeyCode::pageDown ( )
static

A key code representing the page down key.

◆ pageUp()

static const KeyCode & luciad::KeyCode::pageUp ( )
static

A key code representing the pacge up key.

◆ plus()

static const KeyCode & luciad::KeyCode::plus ( )
static

A key code representing the '+' key.

◆ q()

static const KeyCode & luciad::KeyCode::q ( )
static

A key code representing the 'Q' key.

◆ r()

static const KeyCode & luciad::KeyCode::r ( )
static

A key code representing the 'R' key.

◆ right()

static const KeyCode & luciad::KeyCode::right ( )
static

A key code representing the right key.

◆ s()

static const KeyCode & luciad::KeyCode::s ( )
static

A key code representing the 'S' key.

◆ seven()

static const KeyCode & luciad::KeyCode::seven ( )
static

A key code representing the '7' key.

◆ six()

static const KeyCode & luciad::KeyCode::six ( )
static

A key code representing the '6' key.

◆ slash()

static const KeyCode & luciad::KeyCode::slash ( )
static

A key code representing the '/' key.

◆ space()

static const KeyCode & luciad::KeyCode::space ( )
static

A key code representing the space key.

◆ t()

static const KeyCode & luciad::KeyCode::t ( )
static

A key code representing the 'T' key.

◆ three()

static const KeyCode & luciad::KeyCode::three ( )
static

A key code representing the '3' key.

◆ two()

static const KeyCode & luciad::KeyCode::two ( )
static

A key code representing the '2' key.

◆ u()

static const KeyCode & luciad::KeyCode::u ( )
static

A key code representing the 'U' key.

◆ unknown()

static const KeyCode & luciad::KeyCode::unknown ( )
static

A key code representing an unknown key.

◆ up()

static const KeyCode & luciad::KeyCode::up ( )
static

A key code representing the up key.

◆ v()

static const KeyCode & luciad::KeyCode::v ( )
static

A key code representing the 'V' key.

◆ w()

static const KeyCode & luciad::KeyCode::w ( )
static

A key code representing the 'W' key.

◆ x()

static const KeyCode & luciad::KeyCode::x ( )
static

A key code representing the 'X' key.

◆ y()

static const KeyCode & luciad::KeyCode::y ( )
static

A key code representing the 'Y' key.

◆ z()

static const KeyCode & luciad::KeyCode::z ( )
static

A key code representing the 'Z' key.

◆ zero()

static const KeyCode & luciad::KeyCode::zero ( )
static

A key code representing the '0' key.

Member Data Documentation

◆ index

size_t luciad::KeyCode::index

The index of the key code.