1
#ifndef NEWSBEUTER_KEYMAP__H
2
#define NEWSBEUTER_KEYMAP__H
9
#include <configparser.h>
11
// in configuration: bind-key <key> <operation>
13
#define KM_NEWSBEUTER (1<<0)
14
#define KM_PODBEUTER (1<<1)
15
#define KM_BOTH (KM_NEWSBEUTER | KM_PODBEUTER)
17
namespace newsbeuter {
19
enum operation { OP_NIL = 0,
20
// general and newsbeuter-specific operations:
42
// podbeuter-specific operations:
54
class keymap : public config_action_handler {
58
void set_key(operation op, const std::string& key);
59
void unset_key(const std::string& key);
60
operation get_opcode(const std::string& opstr);
61
operation get_operation(const std::string& keycode);
62
std::string getkey(operation );
63
virtual action_handler_status handle_action(const std::string& action, const std::vector<std::string>& params);
64
void get_keymap_descriptions(std::vector<std::pair<std::string,std::string> >& descs, unsigned short flags);
66
std::map<std::string,operation> keymap_;