diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-16 23:59:29 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 12:15:01 -0300 |
| commit | aabb92d26f6b46cd4c482e0e2cbc8e9e9751db0d (patch) | |
| tree | f5139ed90cf1747f3aa3aaa0f6266bab2a335c10 /src/abi.zig | |
| parent | c7ebfb6d18c44fec676da3d683e0b4e54001bd21 (diff) | |
| parent | bc6fe168278957ad15cf87826c8410e7358e0849 (diff) | |
| download | sketchbook-aabb92d26f6b46cd4c482e0e2cbc8e9e9751db0d.tar.gz sketchbook-aabb92d26f6b46cd4c482e0e2cbc8e9e9751db0d.zip | |
Merge the session recorder and the talk primitives
Recording (sessions, marks, clips, the reload speed-ups under them) and anim's Deck with its example talk, together; no conflicts; zig build test: 161/161 steps, 127/127 tests.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'src/abi.zig')
| -rw-r--r-- | src/abi.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/abi.zig b/src/abi.zig index c962772..f0abdb3 100644 --- a/src/abi.zig +++ b/src/abi.zig @@ -116,6 +116,11 @@ pub const Event = extern struct { /// `flags` bit for a held key's auto-repeat. pub const repeat: u8 = 1; + /// The key of a `key_down` or `key_up`. + pub fn key(e: Event) Key { + return @fromBackingInt(@intCast(@as(u8, @truncate(e.code)))); + } + /// For mouse and wheel events: the modifier keys held as it happened, /// as `Key.Mod` bits. Read this rather than `Input.held`, which is the /// state after the frame's events, and misses modifiers that come with |
