#ifndef NOOS_KEYMAP__H #define NOOS_KEYMAP__H #include #include #include #include #include // in configuration: bind-key namespace noos { enum operation { OP_NIL = 0, OP_QUIT, OP_RELOAD, OP_RELOADALL, OP_MARKFEEDREAD, OP_MARKALLFEEDSREAD, OP_OPEN, OP_SAVE, OP_NEXTUNREAD, OP_OPENINBROWSER, OP_HELP, OP_TOGGLESOURCEVIEW, OP_TOGGLEITEMREAD, OP_TOGGLESHOWREAD }; class keymap : public config_action_handler { public: keymap(); ~keymap(); void set_key(operation op, const std::string& key); void unset_key(const std::string& key); operation get_opcode(const std::string& opstr); operation get_operation(const std::string& keycode); std::string getkey(operation ); virtual action_handler_status handle_action(const std::string& action, const std::vector& params); void get_keymap_descriptions(std::vector >& descs); private: std::map keymap_; }; } #endif