#include "keycode.h"#include "gettext.h"#include "settings.h"#include "log.h"#include "renderingengine.h"#include "util/basic_macros.h"#include "util/numeric.h"#include "util/string.h"#include <unordered_map>#include <vector>Classes | |
| struct | table_key |
Macros | |
| #define | DEFINEKEY1(x, lang) |
| #define | DEFINEKEY2(x, ch, lang) |
| #define | DEFINEKEY3(ch) |
| #define | DEFINEKEY4(ch) |
| #define | DEFINEKEY5(ch) |
Functions | |
| static const table_key & | lookup_keychar (wchar_t Char) |
| static const table_key & | lookup_keykey (EKEY_CODE key) |
| static const table_key & | lookup_keyname (std::string_view name) |
| static const table_key & | lookup_scancode (const u32 scancode) |
| const std::vector< KeyPress > & | getKeySetting (const std::string &settingname) |
| bool | keySettingHasMatch (const std::string &settingname, KeyPress kp) |
| void | clearKeyCache () |
Variables | |
| static std::vector< table_key > | table |
| static const table_key | invalid_key = {"", KEY_UNKNOWN, L'\0', ""} |
| std::unordered_map< std::string, KeyPress > | specialKeyCache |
| static std::unordered_map< std::string, std::vector< KeyPress > > | g_key_setting_cache |
| #define DEFINEKEY1 | ( | x, | |
| lang ) |
| #define DEFINEKEY3 | ( | ch | ) |
| #define DEFINEKEY5 | ( | ch | ) |
| void clearKeyCache | ( | ) |
References clearKeyCache(), and g_key_setting_cache.
Referenced by clearKeyCache(), and MyEventReceiver::reloadKeybindings().
| const std::vector< KeyPress > & getKeySetting | ( | const std::string & | settingname | ) |
References g_key_setting_cache, g_settings, Settings::get(), getKeySetting(), str_split(), and warningstream.
Referenced by getKeySetting(), keySettingHasMatch(), and MyEventReceiver::reloadKeybindings().
| bool keySettingHasMatch | ( | const std::string & | settingname, |
| KeyPress | kp ) |
References CONTAINS, getKeySetting(), and keySettingHasMatch().
Referenced by keySettingHasMatch(), GUIChatConsole::OnEvent(), GUIFormSpecMenu::OnEvent(), MyEventReceiver::OnEvent(), and GUIFormSpecMenu::preprocessEvent().
|
static |
References table_key::Char, invalid_key, lookup_keychar(), table, and wide_to_utf8().
Referenced by lookup_keychar(), lookup_keyname(), and lookup_scancode().
|
static |
References invalid_key, table_key::Key, lookup_keykey(), and table.
Referenced by lookup_keykey(), and lookup_scancode().
|
static |
References invalid_key, lookup_keychar(), lookup_keyname(), table_key::Name, table, and utf8_to_wide().
Referenced by KeyPress::KeyPress(), and lookup_keyname().
|
static |
References RenderingEngine::get_raw_device(), invalid_key, lookup_keychar(), lookup_keykey(), and lookup_scancode().
Referenced by lookup_scancode(), and KeyPress::name().
|
static |
Referenced by clearKeyCache(), and getKeySetting().
|
static |
Referenced by lookup_keychar(), lookup_keykey(), lookup_keyname(), and lookup_scancode().
| std::unordered_map<std::string, KeyPress> specialKeyCache |
Referenced by KeyPress::getSpecialKey().
|
static |
Referenced by getboolfield(), getboolfield_default(), getenumfield(), getflagsfield(), getfloatfield(), getfloatfield_default(), getintfield(), getintfield_default(), getstringfield(), getstringfield(), getstringfield_default(), getstringlistfield(), getv3s16field_default(), lookup_keychar(), lookup_keykey(), lookup_keyname(), read_flags_table(), read_tool_capabilities(), setboolfield(), setfloatfield(), setintfield(), and setstringfield().