From f2580a366d716dc68d1f6ee744d3003f06cbcfde Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 18 Aug 2015 00:19:14 +0100 Subject: Cleanup key to codepoint conversion Fixes #378 Fixes #365 --- src/keys.hh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/keys.hh') diff --git a/src/keys.hh b/src/keys.hh index d9865f77..6aa5eb4e 100644 --- a/src/keys.hh +++ b/src/keys.hh @@ -1,11 +1,12 @@ #ifndef keys_hh_INCLUDED #define keys_hh_INCLUDED -#include "unicode.hh" +#include "coord.hh" #include "flags.hh" #include "hash.hh" +#include "optional.hh" +#include "unicode.hh" #include "vector.hh" -#include "coord.hh" namespace Kakoune { @@ -75,6 +76,8 @@ struct Key constexpr bool operator<(Key other) const { return val() < other.val(); } constexpr CharCoord mouse_coord() const { return {(int)((key & 0xFFFF0000) >> 16), (int)(key & 0x0000FFFF)}; } + + Optional codepoint() const; }; template<> struct WithBitOps : std::true_type {}; -- cgit v1.2.3