Nebula
Loading...
Searching...
No Matches
Input::Key Class Reference

#include <key.h>

Detailed Description

Define standard key codes.

Note that these are NOT localized character codes, but are similar to Windows virtual keys.

Public Types

enum  Code {
  Back , Tab , Clear , Return ,
  Shift , Control , Menu , Pause ,
  Capital , Escape , Convert , NonConvert ,
  Accept , ModeChange , Space , Prior ,
  Next , End , Home , Left ,
  Right , Up , Down , Select ,
  Print , Execute , Snapshot , Insert ,
  Delete , Help , LeftWindows , RightWindows ,
  Apps , Sleep , NumPad0 , NumPad1 ,
  NumPad2 , NumPad3 , NumPad4 , NumPad5 ,
  NumPad6 , NumPad7 , NumPad8 , NumPad9 ,
  Multiply , Add , Subtract , Separator ,
  Decimal , Divide , F1 , F2 ,
  F3 , F4 , F5 , F6 ,
  F7 , F8 , F9 , F10 ,
  F11 , F12 , F13 , F14 ,
  F15 , F16 , F17 , F18 ,
  F19 , F20 , F21 , F22 ,
  F23 , F24 , NumLock , Scroll ,
  Semicolon , Slash , Tilde , LeftBracket ,
  RightBracket , BackSlash , Quote , Comma ,
  Underbar , Period , Equality , LeftShift ,
  RightShift , LeftControl , RightControl , LeftMenu ,
  RightMenu , BrowserBack , BrowserForward , BrowserRefresh ,
  BrowserStop , BrowserSearch , BrowserFavorites , BrowserHome ,
  VolumeMute , VolumeDown , VolumeUp , MediaNextTrack ,
  MediaPrevTrack , MediaStop , MediaPlayPause , LaunchMail ,
  LaunchMediaSelect , LaunchApp1 , LaunchApp2 , Key0 ,
  Key1 , Key2 , Key3 , Key4 ,
  Key5 , Key6 , Key7 , Key8 ,
  Key9 , A , B , C ,
  D , E , F , G ,
  H , I , J , K ,
  L , M , N , O ,
  P , Q , R , S ,
  T , U , V , W ,
  X , Y , Z , NumKeyCodes ,
  InvalidKey
}
 key codes More...
 
enum  Group {
  Letters , Numbers , NumPad , FunctionKeys ,
  CursorKeys , HomeBlock
}
 key group More...
 

Static Public Member Functions

static Util::String ToString (Code code)
 convert to string
 
static uint ToDirectInput (Code key)
 convert to cegui scan codes
 
static uint ToRocket (Code key)
 convert to rocket scan codes
 
static Code FromRocket (uint key)
 convert to rocket scan codes
 
static char ToChar (Code key)
 convert to Unicode character (ASCII 0-127 for now)
 
static Code FromString (const Util::String &str)
 convert from string
 
static bool IsValid (const Util::String &str)
 check if a key string is valid
 
static Util::Array< Key::CodeKeyCodesByGroup (Key::Group group)
 get key codes by group
 

Static Private Member Functions

static void SetupDict ()
 

Static Private Attributes

static Util::Dictionary< Util::String, Codedict
 

Member Enumeration Documentation

◆ Code

key codes

Enumerator
Back 
Tab 
Clear 
Return 
Shift 
Control 
Menu 
Pause 
Capital 
Escape 
Convert 
NonConvert 
Accept 
ModeChange 
Space 
Prior 
Next 
End 
Home 
Left 
Right 
Up 
Down 
Select 
Print 
Execute 
Snapshot 
Insert 
Delete 
Help 
LeftWindows 
RightWindows 
Apps 
Sleep 
NumPad0 
NumPad1 
NumPad2 
NumPad3 
NumPad4 
NumPad5 
NumPad6 
NumPad7 
NumPad8 
NumPad9 
Multiply 
Add 
Subtract 
Separator 
Decimal 
Divide 
F1 
F2 
F3 
F4 
F5 
F6 
F7 
F8 
F9 
F10 
F11 
F12 
F13 
F14 
F15 
F16 
F17 
F18 
F19 
F20 
F21 
F22 
F23 
F24 
NumLock 
Scroll 
Semicolon 
Slash 
Tilde 
LeftBracket 
RightBracket 
BackSlash 
Quote 
Comma 
Underbar 
Period 
Equality 
LeftShift 
RightShift 
LeftControl 
RightControl 
LeftMenu 
RightMenu 
BrowserBack 
BrowserForward 
BrowserRefresh 
BrowserStop 
BrowserSearch 
BrowserFavorites 
BrowserHome 
VolumeMute 
VolumeDown 
VolumeUp 
MediaNextTrack 
MediaPrevTrack 
MediaStop 
MediaPlayPause 
LaunchMail 
LaunchMediaSelect 
LaunchApp1 
LaunchApp2 
Key0 
Key1 
Key2 
Key3 
Key4 
Key5 
Key6 
Key7 
Key8 
Key9 
NumKeyCodes 
InvalidKey 

◆ Group

key group

Enumerator
Letters 
Numbers 
NumPad 
FunctionKeys 
CursorKeys 
HomeBlock 

Member Function Documentation

◆ FromRocket()

Key::Code Input::Key::FromRocket ( uint key)
static

convert to rocket scan codes

◆ FromString()

Key::Code Input::Key::FromString ( const Util::String & str)
static

convert from string

◆ IsValid()

bool Input::Key::IsValid ( const Util::String & str)
static

check if a key string is valid

◆ KeyCodesByGroup()

Util::Array< Key::Code > Input::Key::KeyCodesByGroup ( Key::Group group)
static

get key codes by group

◆ SetupDict()

void Input::Key::SetupDict ( )
staticprivate

◆ ToChar()

char Input::Key::ToChar ( Code key)
static

convert to Unicode character (ASCII 0-127 for now)

◆ ToDirectInput()

uint Input::Key::ToDirectInput ( Code key)
static

convert to cegui scan codes

◆ ToRocket()

uint Input::Key::ToRocket ( Code key)
static

convert to rocket scan codes

◆ ToString()

Util::String Input::Key::ToString ( Code code)
static

convert to string

Member Data Documentation

◆ dict

Util::Dictionary< Util::String, Key::Code > Input::Key::dict
staticprivate

The documentation for this class was generated from the following files: