18 #define KEYS_PER_COLUMN 10
19 #define MAPPED_KEYS (2*KEYS_PER_COLUMN)
21 #define AWAR_KEYMAPPING_ENABLE "key_mapping/enable"
25 for (i=0; i<256; i++) mapping[i] = i;
38 return awar_content[0];
42 for (
int i=0; i<256; i++) mapping[i] = i;
78 AW_window_simple *aws =
new AW_window_simple;
79 aws->init(root,
"KEY_MAPPINGS",
"KEY MAPPINGS");
84 aws->create_button(
"CLOSE",
"CLOSE",
"C");
88 aws->create_button(
"HELP",
"HELP",
"H");
96 aws->auto_space(10, 10);
98 aws->at(
"ascii2");
int ax2 = aws->get_at_xposition();
99 aws->at(
"ascii1");
int ax1 = aws->get_at_xposition();
100 aws->at(
"key2");
int kx2 = aws->get_at_xposition();
101 aws->at(
"key1");
int kx1 = aws->get_at_xposition();
103 int y = aws->get_at_yposition();
108 aws->at(kx2, y); aws->create_input_field(
mapping_awar_name(i+KEYS_PER_COLUMN,
"source"), 2);
109 aws->at(ax2, y); aws->create_input_field(
mapping_awar_name(i+KEYS_PER_COLUMN,
"dest"), 2);
112 y = aws->get_at_yposition();
char read_mapping_awar(AW_root *awr, int idx, const char *subkey)
void add(const char *awar_name, const char *config_name)
AW_window * create_key_map_window(AW_root *root)
CONSTEXPR_INLINE unsigned char safeCharIndex(char c)
void load_xfig(const char *file, bool resize=true)
void AWT_insert_config_manager(AW_window *aww, AW_default default_file_, const char *id, const StoreConfigCallback &store_cb, const RestoreConfigCallback &load_or_reset_cb, const char *macro_id, const AWT_predefined_config *predef)
const char * GBS_global_string(const char *templat,...)
void AW_POPDOWN(AW_window *window)
AW_awar * add_callback(const RootCallback &cb)
const char * read_char_pntr() const
WindowCallback makeHelpCallback(const char *helpfile)
void create_awars(AW_root *root)
void rehash_mapping(AW_root *awr)
const char * mapping_awar_name(int idx, const char *subkey)
AW_awar * awar(const char *awar)
static void ed_rehash_mapping(AW_root *awr, ed_key *ek)
AW_awar * awar_int(const char *var_name, long default_value=0, AW_default default_file=AW_ROOT_DEFAULT)
#define AWAR_KEYMAPPING_ENABLE
static void setup_keymap_config(AWT_config_definition &cdef)
AW_awar * awar_string(const char *var_name, const char *default_value="", AW_default default_file=AW_ROOT_DEFAULT)