Blamite Game Engine - Blam (Core)
keycontrol.cpp File Reference

Functions

bool isSpecialKey (WPARAM virtual_key)
 Checks if the provided virtual key is found within the list of special keys. More...
 
bool isRegularKey (WPARAM virtual_key)
 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...
 

Function Documentation

◆ isRegularKey()

bool isRegularKey ( WPARAM  virtual_key)

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.

◆ isSpecialKey()

bool isSpecialKey ( 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

◆ 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:
=
{
VK_BACK, VK_LEFT, VK_RIGHT, VK_RETURN, VK_UP, VK_DOWN, VK_TAB, VK_F1, VK_F2, VK_F3, VK_F4,
VK_F5, VK_F6, VK_F7, VK_F8, VK_F9, VK_F10, VK_F11, VK_F12, VK_HOME
}

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