106 std::string_view
getKeyName(std::string_view configName)
const;
std::string getBindError() const
int getKeyValue(int index) const
Obtain the value stored in memory.
void store()
Store the key values to config file.
int mNewKeyIndex
Index of new key to be assigned.
void setNewKey(SDL_Keycode value)
Set the value of the new key.
void refreshActiveKeys()
Takes a snapshot of all the active keys.
int getKeyEmoteOffset(SDL_Keycode keyValue) const
Get the key function index for an emote by providing the offset value.
int getNewKeyIndex() const
Get the index of the new key to be assigned.
void callbackNewKey()
Calls a function back so the key re-assignment(s) can be seen.
void makeDefault()
Make the keys their default values.
bool isEnabled() const
Get the enable flag, which will stop the user from doing actions.
int getKeyIndex(SDL_Keycode keyValue) const
Get the key function index by providing the keys value.
bool hasConflicts()
Determines if any key assignments are the same as each other.
bool mEnabled
Flag to respond to key input.
std::string_view getKeyName(std::string_view configName) const
Get the key name by providing the keys config name.
const uint8_t * mActiveKeys
Stores a list of all the keys.
void retrieve()
Retrieve the key values from config file.
bool isKeyActive(int index) const
Checks if the key is active, by providing the key function index.
KeyAction
All the key functions.
@ KEY_WINDOW_EMOTE_SHORTCUT
void init()
Initializes the keyboard config explicitly.
void setEnabled(bool flag)
Set the enable flag, which will stop the user from doing actions.
KeyFunction mKey[KEY_TOTAL]
Pointer to all the key data.
const std::string & getKeyCaption(int index) const
Get the key caption, providing more meaning to the user.
Setup_Keyboard * mSetupKey
Reference to setup window.
void setNewKeyIndex(int value)
Set the index of the new key to be assigned.
void setSetupKeyboard(Setup_Keyboard *setupKey)
Set a reference to the key setup window.
Each key represents a key function.
SDL_Keycode value
The actual value that is used.
int defaultValue
The default key value used.
const char * configField
Field index that is in the config file.