LuciadCPillar 2026.1.01
Loading...
Searching...
No Matches
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.
constexpr bool operator!= (const KeyCode &rhs) const
constexpr bool operator== (const KeyCode &rhs) const

Static Public Member Functions

static const KeyCode & a ()
 A key code representing the 'A' key.
static const KeyCode & asterisk ()
 A key code representing the '*' key.
static const KeyCode & b ()
 A key code representing the 'B' key.
static const KeyCode & backspace ()
 A key code representing the backspace key.
static const KeyCode & c ()
 A key code representing the 'C' key.
static const KeyCode & d ()
 A key code representing the 'D' key.
static const KeyCode & del ()
 A key code representing the delete key.
static const KeyCode & down ()
 A key code representing the down key.
static const KeyCode & e ()
 A key code representing the 'E' key.
static const KeyCode & eight ()
 A key code representing the '8' key.
static const KeyCode & end ()
 A key code representing the end key.
static const KeyCode & enter ()
 A key code representing the enter key.
static const KeyCode & escape ()
 A key code representing the escape key.
static const KeyCode & f ()
 A key code representing the 'F' key.
static const KeyCode & f1 ()
 A key code representing the F1 key.
static const KeyCode & f10 ()
 A key code representing the F10 key.
static const KeyCode & f11 ()
 A key code representing the F11 key.
static const KeyCode & f12 ()
 A key code representing the F12 key.
static const KeyCode & f2 ()
 A key code representing the F2 key.
static const KeyCode & f3 ()
 A key code representing the F3 key.
static const KeyCode & f4 ()
 A key code representing the F4 key.
static const KeyCode & f5 ()
 A key code representing the F5 key.
static const KeyCode & f6 ()
 A key code representing the F6 key.
static const KeyCode & f7 ()
 A key code representing the F7 key.
static const KeyCode & f8 ()
 A key code representing the F8 key.
static const KeyCode & f9 ()
 A key code representing the F9 key.
static const KeyCode & five ()
 A key code representing the '5' key.
static const KeyCode & four ()
 A key code representing the '4' key.
static const KeyCode & g ()
 A key code representing the 'G' key.
static const KeyCode & h ()
 A key code representing the 'H' key.
static const KeyCode & home ()
 A key code representing the home key.
static const KeyCode & i ()
 A key code representing the 'I' key.
static const KeyCode & insert ()
 A key code representing the insert key.
static const KeyCode & j ()
 A key code representing the 'J' key.
static const KeyCode & k ()
 A key code representing the 'K' key.
static const KeyCode & l ()
 A key code representing the 'L' key.
static const KeyCode & left ()
 A key code representing the left key.
static const KeyCode & m ()
 A key code representing the 'M' key.
static const KeyCode & minus ()
 A key code representing the '-' key.
static const KeyCode & n ()
 A key code representing the 'N' key.
static const KeyCode & nine ()
 A key code representing the '9' key.
static const KeyCode & o ()
 A key code representing the 'O' key.
static const KeyCode & one ()
 A key code representing the '1' key.
static const KeyCode & p ()
 A key code representing the 'P' key.
static const KeyCode & pageDown ()
 A key code representing the page down key.
static const KeyCode & pageUp ()
 A key code representing the pacge up key.
static const KeyCode & plus ()
 A key code representing the '+' key.
static const KeyCode & q ()
 A key code representing the 'Q' key.
static const KeyCode & r ()
 A key code representing the 'R' key.
static const KeyCode & right ()
 A key code representing the right key.
static const KeyCode & s ()
 A key code representing the 'S' key.
static const KeyCode & seven ()
 A key code representing the '7' key.
static const KeyCode & six ()
 A key code representing the '6' key.
static const KeyCode & slash ()
 A key code representing the '/' key.
static const KeyCode & space ()
 A key code representing the space key.
static const KeyCode & t ()
 A key code representing the 'T' key.
static const KeyCode & tab ()
 A key code representing the tab key.
static const KeyCode & three ()
 A key code representing the '3' key.
static const KeyCode & two ()
 A key code representing the '2' key.
static const KeyCode & u ()
 A key code representing the 'U' key.
static const KeyCode & unknown ()
 A key code representing an unknown key.
static const KeyCode & up ()
 A key code representing the up key.
static const KeyCode & v ()
 A key code representing the 'V' key.
static const KeyCode & w ()
 A key code representing the 'W' key.
static const KeyCode & x ()
 A key code representing the 'X' key.
static const KeyCode & y ()
 A key code representing the 'Y' key.
static const KeyCode & z ()
 A key code representing the 'Z' key.
static const KeyCode & zero ()
 A key code representing the '0' key.

Public Attributes

size_t index
 The index of the key code.

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()

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()

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

A key code representing the 'A' key.

◆ asterisk()

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

A key code representing the '*' key.

◆ b()

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

A key code representing the 'B' key.

◆ backspace()

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

A key code representing the backspace key.

◆ c()

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

A key code representing the 'C' key.

◆ d()

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

A key code representing the 'D' key.

◆ del()

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

A key code representing the delete key.

Since
2025.0

◆ down()

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

A key code representing the down key.

◆ e()

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

A key code representing the 'E' key.

◆ eight()

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

A key code representing the '8' key.

◆ end()

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

A key code representing the end key.

◆ enter()

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

A key code representing the enter key.

Since
2025.0

◆ escape()

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

A key code representing the escape key.

◆ f()

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

A key code representing the 'F' key.

◆ f1()

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

A key code representing the F1 key.

Since
2025.0

◆ f10()

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

A key code representing the F10 key.

Since
2025.0

◆ f11()

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

A key code representing the F11 key.

Since
2025.0

◆ f12()

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

A key code representing the F12 key.

Since
2025.0

◆ f2()

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

A key code representing the F2 key.

Since
2025.0

◆ f3()

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

A key code representing the F3 key.

Since
2025.0

◆ f4()

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

A key code representing the F4 key.

Since
2025.0

◆ f5()

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

A key code representing the F5 key.

Since
2025.0

◆ f6()

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

A key code representing the F6 key.

Since
2025.0

◆ f7()

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

A key code representing the F7 key.

Since
2025.0

◆ f8()

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

A key code representing the F8 key.

Since
2025.0

◆ f9()

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

A key code representing the F9 key.

Since
2025.0

◆ five()

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

A key code representing the '5' key.

◆ four()

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

A key code representing the '4' key.

◆ g()

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

A key code representing the 'G' key.

◆ h()

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

A key code representing the 'H' key.

◆ home()

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

A key code representing the home key.

◆ i()

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

A key code representing the 'I' key.

◆ insert()

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

A key code representing the insert key.

Since
2025.0

◆ j()

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

A key code representing the 'J' key.

◆ k()

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

A key code representing the 'K' key.

◆ l()

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

A key code representing the 'L' key.

◆ left()

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

A key code representing the left key.

◆ m()

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

A key code representing the 'M' key.

◆ minus()

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

A key code representing the '-' key.

◆ n()

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

A key code representing the 'N' key.

◆ nine()

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

A key code representing the '9' key.

◆ o()

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

A key code representing the 'O' key.

◆ one()

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

A key code representing the '1' key.

◆ operator!=()

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

◆ operator==()

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

◆ p()

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

A key code representing the 'P' key.

◆ pageDown()

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

A key code representing the page down key.

◆ pageUp()

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

A key code representing the pacge up key.

◆ plus()

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

A key code representing the '+' key.

◆ q()

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

A key code representing the 'Q' key.

◆ r()

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

A key code representing the 'R' key.

◆ right()

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

A key code representing the right key.

◆ s()

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

A key code representing the 'S' key.

◆ seven()

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

A key code representing the '7' key.

◆ six()

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

A key code representing the '6' key.

◆ slash()

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

A key code representing the '/' key.

◆ space()

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

A key code representing the space key.

◆ t()

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

A key code representing the 'T' key.

◆ tab()

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

A key code representing the tab key.

Since
2025.0

◆ three()

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

A key code representing the '3' key.

◆ two()

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

A key code representing the '2' key.

◆ u()

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

A key code representing the 'U' key.

◆ unknown()

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

A key code representing an unknown key.

◆ up()

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

A key code representing the up key.

◆ v()

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

A key code representing the 'V' key.

◆ w()

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

A key code representing the 'W' key.

◆ x()

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

A key code representing the 'X' key.

◆ y()

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

A key code representing the 'Y' key.

◆ z()

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

A key code representing the 'Z' key.

◆ zero()

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.