Gamp v0.0.7-36-g24b1eb6
Gamp: Graphics, Audio, Multimedia and Processing
Loading...
Searching...
No Matches
KeyEvent.hpp File Reference
#include <memory>
#include <string>
#include <jau/bitfield.hpp>
#include <jau/cpp_lang_util.hpp>
#include <jau/enum_util.hpp>
#include <jau/int_math_ct.hpp>
#include <jau/fraction_type.hpp>
#include <jau/string_util.hpp>
#include <gamp/wt/event/Event.hpp>
Include dependency graph for KeyEvent.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gamp::wt::event::KeyboardTracker
 
class  gamp::wt::event::KeyEvent
  More...
 
class  gamp::wt::event::KeyListener
 Listener for multiple KeyEvent. More...
 

Namespaces

namespace  gamp
 Gamp: Graphics, Audio, Multimedia and Processing Framework (Native C++, WebAssembly, ...)
 
namespace  gamp::wt
 
namespace  gamp::wt::event
 

Typedefs

typedef std::shared_ptr< KeyListenergamp::wt::event::KeyListenerRef
 

Enumerations

enum class  gamp::wt::event::VKeyCode : uint16_t {
  gamp::wt::event::VKeyCode::VK_UNDEFINED = 0 , gamp::wt::event::VKeyCode::none = VK_UNDEFINED , gamp::wt::event::VKeyCode::VK_FREE01 = 0x01u , gamp::wt::event::VKeyCode::VK_HOME = 0x02u ,
  gamp::wt::event::VKeyCode::VK_END = 0x03u , gamp::wt::event::VKeyCode::VK_FINAL = 0x04u , gamp::wt::event::VKeyCode::VK_PRINTSCREEN = 0x05u , gamp::wt::event::VKeyCode::VK_FREE06 = 0x06u ,
  gamp::wt::event::VKeyCode::VK_FREE07 = 0x07u , gamp::wt::event::VKeyCode::VK_BACK_SPACE = 0x08u , gamp::wt::event::VKeyCode::VK_TAB = 0x09u , gamp::wt::event::VKeyCode::VK_LINEFEED = 0x0Au ,
  gamp::wt::event::VKeyCode::VK_PAGE_DOWN = 0x0Bu , gamp::wt::event::VKeyCode::VK_CLEAR = 0x0Cu , gamp::wt::event::VKeyCode::VK_ENTER = 0x0Du , gamp::wt::event::VKeyCode::VK_FREE0E = 0x0Eu ,
  gamp::wt::event::VKeyCode::VK_SHIFT = 0x0Fu , gamp::wt::event::VKeyCode::VK_PAGE_UP = 0x10u , gamp::wt::event::VKeyCode::VK_CONTROL = 0x11u , gamp::wt::event::VKeyCode::VK_ALT = 0x12u ,
  gamp::wt::event::VKeyCode::VK_FREE13 = 0x13u , gamp::wt::event::VKeyCode::VK_CAPS_LOCK = 0x14u , gamp::wt::event::VKeyCode::VK_FREE15 = 0x15u , gamp::wt::event::VKeyCode::VK_PAUSE = 0x16u ,
  gamp::wt::event::VKeyCode::VK_SCROLL_LOCK = 0x17u , gamp::wt::event::VKeyCode::VK_CANCEL = 0x18u , gamp::wt::event::VKeyCode::VK_FREE19 = 0x19u , gamp::wt::event::VKeyCode::VK_INSERT = 0x1Au ,
  gamp::wt::event::VKeyCode::VK_ESCAPE = 0x1Bu , gamp::wt::event::VKeyCode::VK_CONVERT = 0x1Cu , gamp::wt::event::VKeyCode::VK_NONCONVERT = 0x1Du , gamp::wt::event::VKeyCode::VK_ACCEPT = 0x1Eu ,
  gamp::wt::event::VKeyCode::VK_MODECHANGE = 0x1Fu , gamp::wt::event::VKeyCode::VK_SPACE = 0x20u , gamp::wt::event::VKeyCode::VK_EXCLAMATION_MARK = 0x21u , gamp::wt::event::VKeyCode::VK_QUOTEDBL = 0x22u ,
  gamp::wt::event::VKeyCode::VK_NUMBER_SIGN = 0x23u , gamp::wt::event::VKeyCode::VK_DOLLAR = 0x24u , gamp::wt::event::VKeyCode::VK_PERCENT = 0x25u , gamp::wt::event::VKeyCode::VK_AMPERSAND = 0x26u ,
  gamp::wt::event::VKeyCode::VK_QUOTE = 0x27u , gamp::wt::event::VKeyCode::VK_LEFT_PARENTHESIS = 0x28u , gamp::wt::event::VKeyCode::VK_RIGHT_PARENTHESIS = 0x29u , gamp::wt::event::VKeyCode::VK_ASTERISK = 0x2Au ,
  gamp::wt::event::VKeyCode::VK_PLUS = 0x2Bu , gamp::wt::event::VKeyCode::VK_COMMA = 0x2Cu , gamp::wt::event::VKeyCode::VK_MINUS = 0x2Du , gamp::wt::event::VKeyCode::VK_PERIOD = 0x2Eu ,
  gamp::wt::event::VKeyCode::VK_SLASH = 0x2Fu , gamp::wt::event::VKeyCode::VK_0 = 0x30u , gamp::wt::event::VKeyCode::VK_1 = 0x31u , gamp::wt::event::VKeyCode::VK_2 = 0x32u ,
  gamp::wt::event::VKeyCode::VK_3 = 0x33u , gamp::wt::event::VKeyCode::VK_4 = 0x34u , gamp::wt::event::VKeyCode::VK_5 = 0x35u , gamp::wt::event::VKeyCode::VK_6 = 0x36u ,
  gamp::wt::event::VKeyCode::VK_7 = 0x37u , gamp::wt::event::VKeyCode::VK_8 = 0x38u , gamp::wt::event::VKeyCode::VK_9 = 0x39u , gamp::wt::event::VKeyCode::VK_COLON = 0x3Au ,
  gamp::wt::event::VKeyCode::VK_SEMICOLON = 0x3Bu , gamp::wt::event::VKeyCode::VK_LESS = 0x3Cu , gamp::wt::event::VKeyCode::VK_EQUALS = 0x3Du , gamp::wt::event::VKeyCode::VK_GREATER = 0x3Eu ,
  gamp::wt::event::VKeyCode::VK_QUESTIONMARK = 0x3Fu , gamp::wt::event::VKeyCode::VK_AT = 0x40u , gamp::wt::event::VKeyCode::VK_A = 0x41u , gamp::wt::event::VKeyCode::VK_B = 0x42u ,
  gamp::wt::event::VKeyCode::VK_C = 0x43u , gamp::wt::event::VKeyCode::VK_D = 0x44u , gamp::wt::event::VKeyCode::VK_E = 0x45u , gamp::wt::event::VKeyCode::VK_F = 0x46u ,
  gamp::wt::event::VKeyCode::VK_G = 0x47u , gamp::wt::event::VKeyCode::VK_H = 0x48u , gamp::wt::event::VKeyCode::VK_I = 0x49u , gamp::wt::event::VKeyCode::VK_J = 0x4Au ,
  gamp::wt::event::VKeyCode::VK_K = 0x4Bu , gamp::wt::event::VKeyCode::VK_L = 0x4Cu , gamp::wt::event::VKeyCode::VK_M = 0x4Du , gamp::wt::event::VKeyCode::VK_N = 0x4Eu ,
  gamp::wt::event::VKeyCode::VK_O = 0x4Fu , gamp::wt::event::VKeyCode::VK_P = 0x50u , gamp::wt::event::VKeyCode::VK_Q = 0x51u , gamp::wt::event::VKeyCode::VK_R = 0x52u ,
  gamp::wt::event::VKeyCode::VK_S = 0x53u , gamp::wt::event::VKeyCode::VK_T = 0x54u , gamp::wt::event::VKeyCode::VK_U = 0x55u , gamp::wt::event::VKeyCode::VK_V = 0x56u ,
  gamp::wt::event::VKeyCode::VK_W = 0x57u , gamp::wt::event::VKeyCode::VK_X = 0x58u , gamp::wt::event::VKeyCode::VK_Y = 0x59u , gamp::wt::event::VKeyCode::VK_Z = 0x5Au ,
  gamp::wt::event::VKeyCode::VK_OPEN_BRACKET = 0x5Bu , gamp::wt::event::VKeyCode::VK_BACK_SLASH = 0x5Cu , gamp::wt::event::VKeyCode::VK_CLOSE_BRACKET = 0x5Du , gamp::wt::event::VKeyCode::VK_CIRCUMFLEX = 0x5Eu ,
  gamp::wt::event::VKeyCode::VK_UNDERSCORE = 0x5Fu , gamp::wt::event::VKeyCode::VK_BACK_QUOTE = 0x60u , gamp::wt::event::VKeyCode::VK_F1 = ( 0x60U + 1U ) , gamp::wt::event::VKeyCode::VK_F2 = ( 0x60U + 2U ) ,
  gamp::wt::event::VKeyCode::VK_F3 = ( 0x60U + 3U ) , gamp::wt::event::VKeyCode::VK_F4 = ( 0x60U + 4U ) , gamp::wt::event::VKeyCode::VK_F5 = ( 0x60U + 5U ) , gamp::wt::event::VKeyCode::VK_F6 = ( 0x60U + 6U ) ,
  gamp::wt::event::VKeyCode::VK_F7 = ( 0x60U + 7U ) , gamp::wt::event::VKeyCode::VK_F8 = ( 0x60U + 8U ) , gamp::wt::event::VKeyCode::VK_F9 = ( 0x60U + 9U ) , gamp::wt::event::VKeyCode::VK_F10 = ( 0x60U +10U ) ,
  gamp::wt::event::VKeyCode::VK_F11 = ( 0x60U +11U ) , gamp::wt::event::VKeyCode::VK_F12 = ( 0x60U +12U ) , gamp::wt::event::VKeyCode::VK_F13 = ( 0x60U +13U ) , gamp::wt::event::VKeyCode::VK_F14 = ( 0x60U +14U ) ,
  gamp::wt::event::VKeyCode::VK_F15 = ( 0x60U +15U ) , gamp::wt::event::VKeyCode::VK_F16 = ( 0x60U +16U ) , gamp::wt::event::VKeyCode::VK_F17 = ( 0x60U +17U ) , gamp::wt::event::VKeyCode::VK_F18 = ( 0x60U +18U ) ,
  gamp::wt::event::VKeyCode::VK_F19 = ( 0x60U +19U ) , gamp::wt::event::VKeyCode::VK_F20 = ( 0x60U +20U ) , gamp::wt::event::VKeyCode::VK_F21 = ( 0x60U +21U ) , gamp::wt::event::VKeyCode::VK_F22 = ( 0x60U +22U ) ,
  gamp::wt::event::VKeyCode::VK_F23 = ( 0x60U +23U ) , gamp::wt::event::VKeyCode::VK_F24 = ( 0x60U +24U ) , gamp::wt::event::VKeyCode::VK_LEFT_BRACE = 0x7Bu , gamp::wt::event::VKeyCode::VK_PIPE = 0x7Cu ,
  gamp::wt::event::VKeyCode::VK_RIGHT_BRACE = 0x7Du , gamp::wt::event::VKeyCode::VK_TILDE = 0x7Eu , gamp::wt::event::VKeyCode::VK_SEPARATOR = 0x7Fu , gamp::wt::event::VKeyCode::VK_NUMPAD0 = 0x80u ,
  gamp::wt::event::VKeyCode::VK_NUMPAD1 = 0x81u , gamp::wt::event::VKeyCode::VK_NUMPAD2 = 0x82u , gamp::wt::event::VKeyCode::VK_NUMPAD3 = 0x83u , gamp::wt::event::VKeyCode::VK_NUMPAD4 = 0x84u ,
  gamp::wt::event::VKeyCode::VK_NUMPAD5 = 0x85u , gamp::wt::event::VKeyCode::VK_NUMPAD6 = 0x86u , gamp::wt::event::VKeyCode::VK_NUMPAD7 = 0x87u , gamp::wt::event::VKeyCode::VK_NUMPAD8 = 0x88u ,
  gamp::wt::event::VKeyCode::VK_NUMPAD9 = 0x89u , gamp::wt::event::VKeyCode::VK_DECIMAL = 0x8Au , gamp::wt::event::VKeyCode::VK_ADD = 0x8Bu , gamp::wt::event::VKeyCode::VK_SUBTRACT = 0x8Cu ,
  gamp::wt::event::VKeyCode::VK_MULTIPLY = 0x8Du , gamp::wt::event::VKeyCode::VK_DIVIDE = 0x8Eu , gamp::wt::event::VKeyCode::VK_DELETE = 0x93u , gamp::wt::event::VKeyCode::VK_NUM_LOCK = 0x94u ,
  gamp::wt::event::VKeyCode::VK_LEFT = 0x95u , gamp::wt::event::VKeyCode::VK_UP = 0x96u , gamp::wt::event::VKeyCode::VK_RIGHT = 0x97u , gamp::wt::event::VKeyCode::VK_DOWN = 0x98u ,
  gamp::wt::event::VKeyCode::VK_CONTEXT_MENU = 0x99u , gamp::wt::event::VKeyCode::VK_WINDOWS = 0x9Au , gamp::wt::event::VKeyCode::VK_META = 0x9Bu , gamp::wt::event::VKeyCode::VK_HELP = 0x9Cu ,
  gamp::wt::event::VKeyCode::VK_COMPOSE = 0x9Du , gamp::wt::event::VKeyCode::VK_BEGIN = 0x9Eu , gamp::wt::event::VKeyCode::VK_STOP = 0x9Fu , gamp::wt::event::VKeyCode::VK_INVERTED_EXCLAMATION_MARK = 0xA1u ,
  gamp::wt::event::VKeyCode::VK_EURO_SIGN = 0x20ACu , gamp::wt::event::VKeyCode::VK_CUT = 0xF879u , gamp::wt::event::VKeyCode::VK_COPY = 0xF87Au , gamp::wt::event::VKeyCode::VK_PASTE = 0xF87Bu ,
  gamp::wt::event::VKeyCode::VK_UNDO = 0xF87Cu , gamp::wt::event::VKeyCode::VK_AGAIN = 0xF87Du , gamp::wt::event::VKeyCode::VK_FIND = 0xF87Eu , gamp::wt::event::VKeyCode::VK_PROPS = 0xF87Fu ,
  gamp::wt::event::VKeyCode::VK_INPUT_METHOD_ON_OFF = 0xF890u , gamp::wt::event::VKeyCode::VK_CODE_INPUT = 0xF891u , gamp::wt::event::VKeyCode::VK_ROMAN_CHARACTERS = 0xF892u , gamp::wt::event::VKeyCode::VK_ALL_CANDIDATES = 0xF893u ,
  gamp::wt::event::VKeyCode::VK_PREVIOUS_CANDIDATE = 0xF894u , gamp::wt::event::VKeyCode::VK_ALPHANUMERIC = 0xF895u , gamp::wt::event::VKeyCode::VK_KATAKANA = 0xF896u , gamp::wt::event::VKeyCode::VK_HIRAGANA = 0xF897u ,
  gamp::wt::event::VKeyCode::VK_FULL_WIDTH = 0xF898u , gamp::wt::event::VKeyCode::VK_HALF_WIDTH = 0xF89Au , gamp::wt::event::VKeyCode::VK_JAPANESE_KATAKANA = 0xF89Bu , gamp::wt::event::VKeyCode::VK_JAPANESE_HIRAGANA = 0xF89Cu ,
  gamp::wt::event::VKeyCode::VK_JAPANESE_ROMAN = 0xF89Du , gamp::wt::event::VKeyCode::VK_KANA_LOCK = 0xF89Fu , gamp::wt::event::VKeyCode::VK_KEYBOARD_INVISIBLE = 0xF8FFu
}
 Virtual key code following UTF16 specification. More...
 

Functions

constexpr bool gamp::wt::event::isModifierKey (VKeyCode vKey)
 Returns true if the given virtualKey represents a modifier key, otherwise false.
 
bool gamp::wt::event::isPrintableKey (uint16_t uniChar, bool isKeyChar) noexcept
 Returns true if given uniChar represents a printable character, i.e.
 
bool gamp::wt::event::isPrintableKey (VKeyCode vKey, bool isKeyChar) noexcept
 Returns true if given uniCode represents a printable character, i.e.
 
constexpr uint16_t gamp::wt::event::operator* (const VKeyCode v) noexcept
 
std::ostream & gamp::wt::event::operator<< (std::ostream &out, const KeyEvent &v)
 
constexpr bool gamp::wt::event::operator== (const VKeyCode lhs, const VKeyCode rhs) noexcept
 
constexpr VKeyCode gamp::wt::event::toVKeyCode (uint16_t keyChar) noexcept