C API for invoking bindings

This commit is contained in:
Mitchell Hashimoto
2023-08-05 14:46:47 -07:00
parent 2f6159b16d
commit 0bb286eeb2
4 changed files with 307 additions and 270 deletions

View File

@@ -248,6 +248,13 @@ pub const Action = union(enum) {
};
};
// A key for the C API to execute an action. This must be kept in sync
// with include/ghostty.h.
pub const Key = enum(c_int) {
copy_to_clipboard,
paste_from_clipboard,
};
/// Trigger is the associated key state that can trigger an action.
pub const Trigger = struct {
/// The key that has to be pressed for a binding to take action.