The Battle for Wesnoth  1.19.0-dev
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
CKey Class Reference

Class that keeps track of all the keys on the keyboard. More...

#include <key.hpp>

Public Member Functions

 CKey ()
bool operator[] (int k) const

Static Public Member Functions

static bool is_uncomposable (const SDL_KeyboardEvent &event)

Private Attributes

const uint8_t * key_list

Detailed Description

Class that keeps track of all the keys on the keyboard.

Whether any key is pressed or not can be found by using its operator[]. Note though that it is generally better to use key events to see when keys are pressed rather than to poll using this object.

Definition at line 28 of file key.hpp.

Constructor & Destructor Documentation

◆ CKey()

CKey::CKey ( )

Definition at line 18 of file key.cpp.

Member Function Documentation

◆ is_uncomposable()

bool CKey::is_uncomposable ( const SDL_KeyboardEvent &  event)

Definition at line 28 of file key.cpp.

Referenced by hotkey::create_hotkey(), and hotkey::hotkey_keyboard::matches_helper().

◆ operator[]()

bool CKey::operator[] ( int  k) const

Definition at line 23 of file key.cpp.

References key_list.

Member Data Documentation

◆ key_list

const uint8_t* CKey::key_list

Definition at line 30 of file key.hpp.

Referenced by operator[]().

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