Jopnal Engine  alpha 0.4
Simple Component Based 2D/3D Game Engine
Classes | Public Types | Static Public Member Functions | List of all members
jop::Keyboard Class Reference

#include <Keyboard.hpp>

Classes

struct  Modifier
 

Public Types

enum  Key {
  Unknown, Space, Apostrophe, Comma,
  Minus, Period, Slash, Zero,
  One, Two, Three, Four,
  Five, Six, Seven, Eight,
  Nine, Semicolon, Equal, 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, LBracket, Backslash, RBracket,
  GraveAccent, World1, World2, Escape,
  Enter, Tab, Backspace, Insert,
  Delete, Right, Left, Down,
  Up, PgUp, PgDown, Home,
  End, CapsLock, ScrollLock, NumLock,
  PrintScreen, Pause, F1, F2,
  F3, F4, F5, F6,
  F7, F8, F9, F10,
  F11, F12, KeypadZero, KeypadOne,
  KeypadTwo, KeypadThree, KeypadFour, KeypadFive,
  KeypadSix, KeypadSeven, KeypadEight, KeypadNine,
  KeypadDecimal, KeypadDivide, KeypadMultiply, KeypadSubtract,
  KeypadAdd, KeypadEnter, KeypadEqual, LShift,
  LControl, LAlt, LSuper, RShift,
  RControl, RAlt, RSuper, Menu
}
 

Static Public Member Functions

static std::string getKeyName (const int scanCode)
 Get the key name in the current locale. More...
 
static bool isKeyDown (const Key key)
 Check if a key is currently down. More...
 
static void showVirtualKeyboard (const bool show)
 Shows or hides the virtual keyboard. More...
 

Detailed Description

Definition at line 35 of file Keyboard.hpp.

Member Enumeration Documentation

Keyboard keys

Enumerator
Unknown 
Space 
Apostrophe 
Comma 
Minus 
Period 
Slash 
Zero 
One 
Two 
Three 
Four 
Five 
Six 
Seven 
Eight 
Nine 
Semicolon 
Equal 
LBracket 
Backslash 
RBracket 
GraveAccent 
World1 
World2 
Escape 

Back on Android.

Enter 
Tab 
Backspace 
Insert 
Delete 
Right 
Left 
Down 
Up 
PgUp 
PgDown 
Home 
End 
CapsLock 
ScrollLock 
NumLock 
PrintScreen 
Pause 
F1 
F2 
F3 
F4 
F5 
F6 
F7 
F8 
F9 
F10 
F11 
F12 
KeypadZero 
KeypadOne 
KeypadTwo 
KeypadThree 
KeypadFour 
KeypadFive 
KeypadSix 
KeypadSeven 
KeypadEight 
KeypadNine 
KeypadDecimal 
KeypadDivide 
KeypadMultiply 
KeypadSubtract 
KeypadAdd 
KeypadEnter 
KeypadEqual 
LShift 
LControl 
LAlt 
LSuper 
RShift 
RControl 
RAlt 
RSuper 
Menu 

Definition at line 41 of file Keyboard.hpp.

Member Function Documentation

static std::string jop::Keyboard::getKeyName ( const int  scanCode)
static

Get the key name in the current locale.

Parameters
scanCodeThe scan code
Returns
String with the name
static bool jop::Keyboard::isKeyDown ( const Key  key)
static

Check if a key is currently down.

Parameters
keyThe keyboard key
Returns
True if the key is down
static void jop::Keyboard::showVirtualKeyboard ( const bool  show)
static

Shows or hides the virtual keyboard.

This only works on Android.

Parameters
showTrue to show, false to hide

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