input: Kitty encodes alternate keys

This commit is contained in:
Mitchell Hashimoto
2023-08-17 09:48:15 -07:00
parent fe0e1f5ee8
commit 6493da0dd3
2 changed files with 67 additions and 4 deletions

View File

@@ -6,7 +6,7 @@ const key = @import("key.zig");
/// for a given key.
pub const Entry = struct {
key: key.Key,
code: u16,
code: u21,
final: u8,
modifier: bool,
};
@@ -28,7 +28,7 @@ pub const entries: []const Entry = entries: {
/// Raw entry is the tuple form of an entry for easy human management.
/// This should never be used in a real program so it is not pub. For
/// real programs, use `entries` which has properly typed, structured data.
const RawEntry = struct { key.Key, u16, u8, bool };
const RawEntry = struct { key.Key, u21, u8, bool };
/// The raw data for how to map keys to Kitty data. Based on the information:
/// https://sw.kovidgoyal.net/kitty/keyboard-protocol/#functional-key-definitions