Elaztek Developer Hub
Blamite Game Engine - blam!  00406.12.10.23.1457.blamite
The core library for the Blamite Game Engine.
keyboard.cpp File Reference
#include "keyboard.h"
#include <vector>
#include <Strings/components/classes/events/game_engine_events/CharacterInput/CharacterInputEvent.h>
#include <Strings/components/classes/events/game_engine_events/KeyPress/KeyPressEvent.h>
#include <Strings/components/classes/events/events.h>
+ Include dependency graph for keyboard.cpp:

Functions

bool is_special_key (WPARAM virtual_key)
 Checks if the provided virtual key is found within the list of special keys. More...
 
bool is_regular_key (char character)
 Determines whether or not the provided key is found in the list of normal characters. More...
 

Variables

std::vector< int > special_keys
 List of all special keys, or non-alphanumeric keys to be handled from the WM_KEYDOWN message. More...
 
std::vector< char > normal_chars
 List of all standard characters to be handled from the WM_CHAR message. More...
 
std::vector< SDL_Keycodeactive_keys = {}
 
bool lock_keystate = false
 

Function Documentation

◆ is_regular_key()

bool is_regular_key ( char  character)

Determines whether or not the provided key is found in the list of normal characters.

Parameters
virtual_key- The character recieved by the WM_CHAR message.
Returns
Whether or not the character is found in the normal characters list.
+ Here is the caller graph for this function:

◆ is_special_key()

bool is_special_key ( WPARAM  virtual_key)

Checks if the provided virtual key is found within the list of special keys.

Parameters
virtual_key- The virtual key code.
Returns
Whether or not the special keys list contains the specified virtual key.

Variable Documentation

◆ active_keys

std::vector<SDL_Keycode> active_keys = {}

◆ lock_keystate

bool lock_keystate = false

◆ normal_chars

std::vector<char> normal_chars
Initial value:
=
{
'A', 'a', 'B', 'b', 'C', 'c', 'D', 'd', 'E', 'e', 'F', 'f', 'G', 'g', 'H', 'h', 'I', 'i', 'J',
'j', 'K', 'k', 'L', 'l', 'M', 'm', 'N', 'n', 'O', 'o', 'P', 'p', 'Q', 'q', 'R', 'r', 'S', 's',
'T', 't', 'U', 'u', 'V', 'v', 'W', 'w', 'X', 'x', 'Y', 'y', 'Z', 'z', '1', '2', '3', '4', '5',
'6', '7', '8', '9', '0', '!', '@', '#', '$', '%', '^', '&', '(', ')', '[', ']', ';', ':', '"',
'\'', '<', '>', ',', '.', '/', '?', '\\', '|', '`', '~', ' ', '-', '=', '_', '+'
}

List of all standard characters to be handled from the WM_CHAR message.

◆ special_keys

std::vector<int> special_keys
Initial value:

List of all special keys, or non-alphanumeric keys to be handled from the WM_KEYDOWN message.

SDLK_BACKSPACE
@ SDLK_BACKSPACE
Definition: SdlEmulationLayer.h:387
SDLK_HOME
@ SDLK_HOME
Definition: SdlEmulationLayer.h:477
SDLK_F10
@ SDLK_F10
Definition: SdlEmulationLayer.h:469
SDLK_F12
@ SDLK_F12
Definition: SdlEmulationLayer.h:471
SDLK_F1
@ SDLK_F1
Definition: SdlEmulationLayer.h:460
SDLK_UP
@ SDLK_UP
Definition: SdlEmulationLayer.h:485
SDLK_F8
@ SDLK_F8
Definition: SdlEmulationLayer.h:467
SDLK_F4
@ SDLK_F4
Definition: SdlEmulationLayer.h:463
SDLK_RETURN
@ SDLK_RETURN
Definition: SdlEmulationLayer.h:385
SDLK_RIGHT
@ SDLK_RIGHT
Definition: SdlEmulationLayer.h:482
SDLK_F2
@ SDLK_F2
Definition: SdlEmulationLayer.h:461
SDLK_F7
@ SDLK_F7
Definition: SdlEmulationLayer.h:466
SDLK_LEFT
@ SDLK_LEFT
Definition: SdlEmulationLayer.h:483
SDLK_DOWN
@ SDLK_DOWN
Definition: SdlEmulationLayer.h:484
SDLK_F9
@ SDLK_F9
Definition: SdlEmulationLayer.h:468
SDLK_TAB
@ SDLK_TAB
Definition: SdlEmulationLayer.h:388
SDLK_F6
@ SDLK_F6
Definition: SdlEmulationLayer.h:465
SDLK_F11
@ SDLK_F11
Definition: SdlEmulationLayer.h:470
SDLK_F5
@ SDLK_F5
Definition: SdlEmulationLayer.h:464
SDLK_F3
@ SDLK_F3
Definition: SdlEmulationLayer.h:462