FabGL
ESP32 VGA Controller and Graphics Library
keyboard.h File Reference

This file contains fabgl::KeyboardClass definition and the Keyboard instance. More...

#include "freertos/FreeRTOS.h"
#include "fabglconf.h"
#include "ps2device.h"
Include dependency graph for keyboard.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fabgl::AltVirtualKeyDef
 Associates a virtualkey and various shift states (ctrl, alt, etc..) to another virtualkey. More...
 
class  fabgl::KeyboardClass
 The PS2 Keyboard controller class. More...
 
struct  fabgl::KeyboardLayout
 All in one structure to fully represent a keyboard layout. More...
 
struct  fabgl::VirtualKeyDef
 Associates scancode to virtualkey. More...
 

Enumerations

enum  fabgl::VirtualKey {
  fabgl::VK_NONE, fabgl::VK_SPACE, fabgl::VK_0, fabgl::VK_1,
  fabgl::VK_2, fabgl::VK_3, fabgl::VK_4, fabgl::VK_5,
  fabgl::VK_6, fabgl::VK_7, fabgl::VK_8, fabgl::VK_9,
  fabgl::VK_KP_0, fabgl::VK_KP_1, fabgl::VK_KP_2, fabgl::VK_KP_3,
  fabgl::VK_KP_4, fabgl::VK_KP_5, fabgl::VK_KP_6, fabgl::VK_KP_7,
  fabgl::VK_KP_8, fabgl::VK_KP_9, fabgl::VK_a, fabgl::VK_b,
  fabgl::VK_c, fabgl::VK_d, fabgl::VK_e, fabgl::VK_f,
  fabgl::VK_g, fabgl::VK_h, fabgl::VK_i, fabgl::VK_j,
  fabgl::VK_k, fabgl::VK_l, fabgl::VK_m, fabgl::VK_n,
  fabgl::VK_o, fabgl::VK_p, fabgl::VK_q, fabgl::VK_r,
  fabgl::VK_s, fabgl::VK_t, fabgl::VK_u, fabgl::VK_v,
  fabgl::VK_w, fabgl::VK_x, fabgl::VK_y, fabgl::VK_z,
  fabgl::VK_A, fabgl::VK_B, fabgl::VK_C, fabgl::VK_D,
  fabgl::VK_E, fabgl::VK_F, fabgl::VK_G, fabgl::VK_H,
  fabgl::VK_I, fabgl::VK_J, fabgl::VK_K, fabgl::VK_L,
  fabgl::VK_M, fabgl::VK_N, fabgl::VK_O, fabgl::VK_P,
  fabgl::VK_Q, fabgl::VK_R, fabgl::VK_S, fabgl::VK_T,
  fabgl::VK_U, fabgl::VK_V, fabgl::VK_W, fabgl::VK_X,
  fabgl::VK_Y, fabgl::VK_Z, fabgl::VK_GRAVEACCENT, fabgl::VK_ACUTEACCENT,
  fabgl::VK_QUOTE, fabgl::VK_QUOTEDBL, fabgl::VK_EQUALS, fabgl::VK_MINUS,
  fabgl::VK_KP_MINUS, fabgl::VK_PLUS, fabgl::VK_KP_PLUS, fabgl::VK_KP_MULTIPLY,
  fabgl::VK_ASTERISK, fabgl::VK_BACKSLASH, fabgl::VK_KP_DIVIDE, fabgl::VK_SLASH,
  fabgl::VK_KP_PERIOD, fabgl::VK_PERIOD, fabgl::VK_COLON, fabgl::VK_COMMA,
  fabgl::VK_SEMICOLON, fabgl::VK_AMPERSAND, fabgl::VK_VERTICALBAR, fabgl::VK_HASH,
  fabgl::VK_AT, fabgl::VK_CARET, fabgl::VK_DOLLAR, fabgl::VK_POUND,
  fabgl::VK_EURO, fabgl::VK_PERCENT, fabgl::VK_EXCLAIM, fabgl::VK_QUESTION,
  fabgl::VK_LEFTBRACE, fabgl::VK_RIGHTBRACE, fabgl::VK_LEFTBRACKET, fabgl::VK_RIGHTBRACKET,
  fabgl::VK_LEFTPAREN, fabgl::VK_RIGHTPAREN, fabgl::VK_LESS, fabgl::VK_GREATER,
  fabgl::VK_UNDERSCORE, fabgl::VK_DEGREE, fabgl::VK_SECTION, fabgl::VK_TILDE,
  fabgl::VK_NEGATION, fabgl::VK_LSHIFT, fabgl::VK_RSHIFT, fabgl::VK_LALT,
  fabgl::VK_RALT, fabgl::VK_LCTRL, fabgl::VK_RCTRL, fabgl::VK_LGUI,
  fabgl::VK_RGUI, fabgl::VK_ESCAPE, fabgl::VK_PRINTSCREEN1, fabgl::VK_PRINTSCREEN2,
  fabgl::VK_SYSREQ, fabgl::VK_INSERT, fabgl::VK_KP_INSERT, fabgl::VK_DELETE,
  fabgl::VK_KP_DELETE, fabgl::VK_BACKSPACE, fabgl::VK_HOME, fabgl::VK_KP_HOME,
  fabgl::VK_END, fabgl::VK_KP_END, fabgl::VK_PAUSE, fabgl::VK_BREAK,
  fabgl::VK_SCROLLLOCK, fabgl::VK_NUMLOCK, fabgl::VK_CAPSLOCK, fabgl::VK_TAB,
  fabgl::VK_RETURN, fabgl::VK_KP_ENTER, fabgl::VK_APPLICATION, fabgl::VK_PAGEUP,
  fabgl::VK_KP_PAGEUP, fabgl::VK_PAGEDOWN, fabgl::VK_KP_PAGEDOWN, fabgl::VK_UP,
  fabgl::VK_KP_UP, fabgl::VK_DOWN, fabgl::VK_KP_DOWN, fabgl::VK_LEFT,
  fabgl::VK_KP_LEFT, fabgl::VK_RIGHT, fabgl::VK_KP_RIGHT, fabgl::VK_KP_CENTER,
  fabgl::VK_F1, fabgl::VK_F2, fabgl::VK_F3, fabgl::VK_F4,
  fabgl::VK_F5, fabgl::VK_F6, fabgl::VK_F7, fabgl::VK_F8,
  fabgl::VK_F9, fabgl::VK_F10, fabgl::VK_F11, fabgl::VK_F12,
  fabgl::VK_GRAVE_a, fabgl::VK_GRAVE_e, fabgl::VK_ACUTE_e, fabgl::VK_GRAVE_i,
  fabgl::VK_GRAVE_o, fabgl::VK_GRAVE_u, fabgl::VK_CEDILLA_c, fabgl::VK_ESZETT,
  fabgl::VK_UMLAUT_u, fabgl::VK_UMLAUT_o, fabgl::VK_UMLAUT_a
}
 Represents each possible real or derived (SHIFT + real) key. More...
 

Detailed Description

This file contains fabgl::KeyboardClass definition and the Keyboard instance.

Enumeration Type Documentation

◆ VirtualKey

Represents each possible real or derived (SHIFT + real) key.

Enumerator
VK_NONE 

No character (marks the first virtual key)

VK_SPACE 

Space

VK_0 

Number 0

VK_1 

Number 1

VK_2 

Number 2

VK_3 

Number 3

VK_4 

Number 4

VK_5 

Number 5

VK_6 

Number 6

VK_7 

Number 7

VK_8 

Number 8

VK_9 

Number 9

VK_KP_0 

Keypad number 0

VK_KP_1 

Keypad number 1

VK_KP_2 

Keypad number 2

VK_KP_3 

Keypad number 3

VK_KP_4 

Keypad number 4

VK_KP_5 

Keypad number 5

VK_KP_6 

Keypad number 6

VK_KP_7 

Keypad number 7

VK_KP_8 

Keypad number 8

VK_KP_9 

Keypad number 9

VK_a 

Lower case letter 'a'

VK_b 

Lower case letter 'b'

VK_c 

Lower case letter 'c'

VK_d 

Lower case letter 'd'

VK_e 

Lower case letter 'e'

VK_f 

Lower case letter 'f'

VK_g 

Lower case letter 'g'

VK_h 

Lower case letter 'h'

VK_i 

Lower case letter 'i'

VK_j 

Lower case letter 'j'

VK_k 

Lower case letter 'k'

VK_l 

Lower case letter 'l'

VK_m 

Lower case letter 'm'

VK_n 

Lower case letter 'n'

VK_o 

Lower case letter 'o'

VK_p 

Lower case letter 'p'

VK_q 

Lower case letter 'q'

VK_r 

Lower case letter 'r'

VK_s 

Lower case letter 's'

VK_t 

Lower case letter 't'

VK_u 

Lower case letter 'u'

VK_v 

Lower case letter 'v'

VK_w 

Lower case letter 'w'

VK_x 

Lower case letter 'x'

VK_y 

Lower case letter 'y'

VK_z 

Lower case letter 'z'

VK_A 

Upper case letter 'A'

VK_B 

Upper case letter 'B'

VK_C 

Upper case letter 'C'

VK_D 

Upper case letter 'D'

VK_E 

Upper case letter 'E'

VK_F 

Upper case letter 'F'

VK_G 

Upper case letter 'G'

VK_H 

Upper case letter 'H'

VK_I 

Upper case letter 'I'

VK_J 

Upper case letter 'J'

VK_K 

Upper case letter 'K'

VK_L 

Upper case letter 'L'

VK_M 

Upper case letter 'M'

VK_N 

Upper case letter 'N'

VK_O 

Upper case letter 'O'

VK_P 

Upper case letter 'P'

VK_Q 

Upper case letter 'Q'

VK_R 

Upper case letter 'R'

VK_S 

Upper case letter 'S'

VK_T 

Upper case letter 'T'

VK_U 

Upper case letter 'U'

VK_V 

Upper case letter 'V'

VK_W 

Upper case letter 'W'

VK_X 

Upper case letter 'X'

VK_Y 

Upper case letter 'Y'

VK_Z 

Upper case letter 'Z'

VK_GRAVEACCENT 

Grave accent: `

VK_ACUTEACCENT 

Acute accent: ´

VK_QUOTE 

Quote: '

VK_QUOTEDBL 

Double quote: "

VK_EQUALS 

Equals: =

VK_MINUS 

Minus: -

VK_KP_MINUS 

Keypad minus: -

VK_PLUS 

Plus: +

VK_KP_PLUS 

Keypad plus: +

VK_KP_MULTIPLY 

Keypad multiply: *

VK_ASTERISK 

Asterisk: *

VK_BACKSLASH 

Backslash: \

VK_KP_DIVIDE 

Keypad divide: /

VK_SLASH 

Slash: /

VK_KP_PERIOD 

Keypad period: .

VK_PERIOD 

Period: .

VK_COLON 

Colon: :

VK_COMMA 

Comma: ,

VK_SEMICOLON 

Semicolon: ;

VK_AMPERSAND 

Ampersand: &

VK_VERTICALBAR 

Vertical bar: |

VK_HASH 

Hash: #

VK_AT 

At: @

VK_CARET 

Caret: ^

VK_DOLLAR 

Dollar: $

VK_POUND 

Pound: £

VK_EURO 

Euro: €

VK_PERCENT 

Percent: %

VK_EXCLAIM 

Exclamation mark: !

VK_QUESTION 

Question mark: ?

VK_LEFTBRACE 

Left brace: {

VK_RIGHTBRACE 

Right brace: }

VK_LEFTBRACKET 

Left bracket: [

VK_RIGHTBRACKET 

Right bracket: ]

VK_LEFTPAREN 

Left parenthesis: (

VK_RIGHTPAREN 

Right parenthesis: )

VK_LESS 

Less: <

VK_GREATER 

Greater: >

VK_UNDERSCORE 

Underscore: _

VK_DEGREE 

Degree: °

VK_SECTION 

Section: §

VK_TILDE 

Tilde: ~

VK_NEGATION 

Negation: ¬

VK_LSHIFT 

Left SHIFT

VK_RSHIFT 

Right SHIFT

VK_LALT 

Left ALT

VK_RALT 

Right ALT

VK_LCTRL 

Left CTRL

VK_RCTRL 

Right CTRL

VK_LGUI 

Left GUI

VK_RGUI 

Right GUI

VK_ESCAPE 

ESC

VK_PRINTSCREEN1 

PRINTSCREEN is translated as separated VK_PRINTSCREEN1 and VK_PRINTSCREEN2. VK_PRINTSCREEN2 is also generated by CTRL or SHIFT + PRINTSCREEN. So pressing PRINTSCREEN both VK_PRINTSCREEN1 and VK_PRINTSCREEN2 are generated, while pressing CTRL+PRINTSCREEN or SHIFT+PRINTSCREEN only VK_PRINTSCREEN2 is generated.

VK_PRINTSCREEN2 

PRINTSCREEN. See VK_PRINTSCREEN1

VK_SYSREQ 

SYSREQ

VK_INSERT 

INS

VK_KP_INSERT 

Keypad INS

VK_DELETE 

DEL

VK_KP_DELETE 

Keypad DEL

VK_BACKSPACE 

Backspace

VK_HOME 

HOME

VK_KP_HOME 

Keypad HOME

VK_END 

END

VK_KP_END 

Keypad END

VK_PAUSE 

PAUSE

VK_BREAK 

CTRL + PAUSE

VK_SCROLLLOCK 

SCROLLLOCK

VK_NUMLOCK 

NUMLOCK

VK_CAPSLOCK 

CAPSLOCK

VK_TAB 

TAB

VK_RETURN 

RETURN

VK_KP_ENTER 

Keypad ENTER

VK_APPLICATION 

APPLICATION / MENU key

VK_PAGEUP 

PAGEUP

VK_KP_PAGEUP 

Keypad PAGEUP

VK_PAGEDOWN 

PAGEDOWN

VK_KP_PAGEDOWN 

Keypad PAGEDOWN

VK_UP 

Cursor UP

VK_KP_UP 

Keypad cursor UP

VK_DOWN 

Cursor DOWN

VK_KP_DOWN 

Keypad cursor DOWN

VK_LEFT 

Cursor LEFT

VK_KP_LEFT 

Keypad cursor LEFT

VK_RIGHT 

Cursor RIGHT

VK_KP_RIGHT 

Keypad cursor RIGHT

VK_KP_CENTER 

Keypad CENTER key

VK_F1 

F1 function key

VK_F2 

F2 function key

VK_F3 

F3 function key

VK_F4 

F4 function key

VK_F5 

F5 function key

VK_F6 

F6 function key

VK_F7 

F7 function key

VK_F8 

F8 function key

VK_F9 

F9 function key

VK_F10 

F10 function key

VK_F11 

F11 function key

VK_F12 

F12 function key

VK_GRAVE_a 

Grave 'a': à

VK_GRAVE_e 

Grave 'e': è

VK_ACUTE_e 

Acute 'e': é

VK_GRAVE_i 

Grave 'i': ì

VK_GRAVE_o 

Grave 'o': ò

VK_GRAVE_u 

Grave 'u': ù

VK_CEDILLA_c 

Cedilla 'c': ç

VK_ESZETT 

Eszett: ß

VK_UMLAUT_u 

Umlaut 'u': ü

VK_UMLAUT_o 

Umlaut 'o': ö

VK_UMLAUT_a 

Umlaut 'a': ä