summaryrefslogtreecommitdiffstats
path: root/src/input_dispatcher.hh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/input_dispatcher.hh10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/input_dispatcher.hh b/src/input_dispatcher.hh
index 6aa7059..0247e86 100644
--- a/src/input_dispatcher.hh
+++ b/src/input_dispatcher.hh
@@ -36,8 +36,7 @@
#include <sys/types.h>
-#define KEY_ESCAPE 0x1b
-#define KEY_CTRL_RBRACKET 0x1d
+#include "base/keycodes.hh"
class input_dispatcher {
public:
@@ -45,10 +44,7 @@ public:
void poll(const struct timeval& current_time);
- bool in_escape() const
- {
- return this->id_escape_index > 0;
- }
+ bool in_escape() const { return this->id_escape_index > 0; }
enum class escape_match_t {
NONE,
@@ -57,7 +53,7 @@ public:
};
std::function<escape_match_t(const char*)> id_escape_matcher;
- std::function<bool(int)> id_key_handler;
+ std::function<bool(int, const char*)> id_key_handler;
std::function<void(const char*)> id_escape_handler;
std::function<void()> id_mouse_handler;
std::function<void(const char*)> id_unhandled_handler;