diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-08-18 00:19:14 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-08-18 00:19:14 +0100 |
| commit | f2580a366d716dc68d1f6ee744d3003f06cbcfde (patch) | |
| tree | 3c8d0139977d75782ca1daaebcd9478e24fa6a45 /src/keys.hh | |
| parent | 043ca9998396bf447c693b1e72078e840f582d11 (diff) | |
Cleanup key to codepoint conversion
Fixes #378
Fixes #365
Diffstat (limited to 'src/keys.hh')
| -rw-r--r-- | src/keys.hh | 7 |
1 files changed, 5 insertions, 2 deletions
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> codepoint() const; }; template<> struct WithBitOps<Key::Modifiers> : std::true_type {}; |
