summaryrefslogtreecommitdiff
path: root/src/Event.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Event.zig')
-rw-r--r--src/Event.zig31
1 files changed, 1 insertions, 30 deletions
diff --git a/src/Event.zig b/src/Event.zig
index aa93f412..faea73cc 100644
--- a/src/Event.zig
+++ b/src/Event.zig
@@ -49,36 +49,7 @@ pub const Mouse = struct {
amount: f32 = 0,
};
-pub const Key = struct {
- cp: u21, // codepoint or one of the specials below
- text: []const u8 = "",
- ctrl: bool = false,
- alt: bool = false,
- shift: bool = false,
-
- pub const enter: u21 = 0x0D;
- pub const escape: u21 = 0x1B;
- pub const tab: u21 = 0x09;
- pub const backspace: u21 = 0x7F;
- // private-use plane for non-text keys, matching no real codepoint
- pub const up: u21 = 0xF0001;
- pub const down: u21 = 0xF0002;
- pub const left: u21 = 0xF0003;
- pub const right: u21 = 0xF0004;
- pub const home: u21 = 0xF0005;
- pub const end: u21 = 0xF0006;
- pub const page_up: u21 = 0xF0007;
- pub const page_down: u21 = 0xF0008;
- pub const delete: u21 = 0xF0009;
- pub const insert: u21 = 0xF000A;
- pub const print_screen: u21 = 0xF000B;
- pub const scroll_lock: u21 = 0xF000C;
- pub const pause: u21 = 0xF000D;
- pub const menu: u21 = 0xF000E;
- /// F1 to F25, in order: Fn is `f1 + n - 1`.
- pub const f1: u21 = 0xF0011;
- pub const f25: u21 = f1 + 24;
-};
+pub const Key = @import("plain").Key;
pub fn hit(key: Key, binding: []const config.Chord) bool {
for (binding) |c| {