#include <keymap.h>

Definition at line 75 of file keymap.h.
Public Member Functions | |
| bx_keymap_c (CConfigurator *cfg) | |
| ~bx_keymap_c (void) | |
| void | loadKeymap (u32 stringToSymbol(const char *)) |
| Loads the configuration specified keymap file if keymapping is enabled using convertStringToSymbol to convert strings to client constants. | |
| void | loadKeymap (u32 stringToSymbol(const char *), const char *filename) |
| Loads the specified keymap file using convertStringToSymbol to convert strings to client constants. | |
| bool | isKeymapLoaded () |
| Returns true if the keymap contains any valid key entries. | |
| BXKeyEntry * | findHostKey (u32 hostkeynum) |
| Finds an entry whose hostKey value matches the target value, and returns a pointer to the corresponging BXKeyEntry structure. | |
| BXKeyEntry * | findAsciiChar (u8 ascii) |
| Finds an entry whose ASCII character matches the target value, and returns a pointer to the corresponging BXKeyEntry structure. | |
| const char * | getBXKeyName (u32 key) |
Private Member Functions | |
| u32 | convertStringToBXKey (const char *) |
| Convert a null-terminate string to a BX_KEY code. | |
Private Attributes | |
| CConfigurator * | myCfg |
| BXKeyEntry * | keymapTable |
| u16 | keymapCount |
| bx_keymap_c::bx_keymap_c | ( | CConfigurator * | cfg | ) |
| bx_keymap_c::~bx_keymap_c | ( | void | ) |
| void bx_keymap_c::loadKeymap | ( | u32 | stringToSymbolconst char * | ) |
Loads the configuration specified keymap file if keymapping is enabled using convertStringToSymbol to convert strings to client constants.
Definition at line 130 of file keymap.cpp.
References CConfigurator::get_bool_value(), CConfigurator::get_text_value(), and myCfg.
Referenced by bx_sdl_gui_c::specific_init(), bx_x11_gui_c::specific_init(), and bx_win32_gui_c::specific_init().
| void bx_keymap_c::loadKeymap | ( | u32 | stringToSymbolconst char *, | |
| const char * | filename | |||
| ) |
Loads the specified keymap file using convertStringToSymbol to convert strings to client constants.
Definition at line 271 of file keymap.cpp.
References BXKeyEntry::ascii, BXKeyEntry::baseKey, BX_DEBUG, BX_INFO, BX_KEYMAP_UNKNOWN, BX_PANIC, CHECK_REALLOCATION, convertStringToBXKey(), get_next_keymap_line(), BXKeyEntry::hostKey, init_parse(), keymapCount, keymapTable, and BXKeyEntry::modKey.
| bool bx_keymap_c::isKeymapLoaded | ( | ) |
Returns true if the keymap contains any valid key entries.
Definition at line 139 of file keymap.cpp.
References keymapCount.
| BXKeyEntry * bx_keymap_c::findHostKey | ( | u32 | hostkeynum | ) |
Finds an entry whose hostKey value matches the target value, and returns a pointer to the corresponging BXKeyEntry structure.
Definition at line 369 of file keymap.cpp.
References BX_DEBUG, keymapCount, and keymapTable.
Referenced by bx_sdl_gui_c::handle_events(), and xkeypress().
| BXKeyEntry * bx_keymap_c::findAsciiChar | ( | u8 | ascii | ) |
Finds an entry whose ASCII character matches the target value, and returns a pointer to the corresponging BXKeyEntry structure.
Definition at line 392 of file keymap.cpp.
References BX_DEBUG, keymapCount, and keymapTable.
| const char * bx_keymap_c::getBXKeyName | ( | u32 | key | ) |
Definition at line 412 of file keymap.cpp.
References bx_key_symbol.
Referenced by CKeyboard::gen_scancode().
| u32 bx_keymap_c::convertStringToBXKey | ( | const char * | string | ) | [private] |
Convert a null-terminate string to a BX_KEY code.
Definition at line 349 of file keymap.cpp.
References BX_KEY_NBKEYS, bx_key_symbol, and BX_KEYMAP_UNKNOWN.
Referenced by loadKeymap().
CConfigurator* bx_keymap_c::myCfg [private] |
BXKeyEntry* bx_keymap_c::keymapTable [private] |
Definition at line 93 of file keymap.h.
Referenced by bx_keymap_c(), findAsciiChar(), findHostKey(), loadKeymap(), and ~bx_keymap_c().
u16 bx_keymap_c::keymapCount [private] |
Definition at line 94 of file keymap.h.
Referenced by bx_keymap_c(), findAsciiChar(), findHostKey(), isKeymapLoaded(), loadKeymap(), and ~bx_keymap_c().