aboutsummaryrefslogtreecommitdiff
path: root/keybind.h
diff options
context:
space:
mode:
authorRiley Beckett <rbeckettvt@gmail.com>2025-10-26 19:55:26 -0400
committerRiley Beckett <rbeckettvt@gmail.com>2025-10-26 19:55:26 -0400
commit500cd948a40a9ad2ee8e123254d66259c46464d6 (patch)
tree8a0d1a8364fbf11d02e7df40ceb4b8081644e903 /keybind.h
parent8003084ccf17b26e932b565cfc0bb30302af3dd7 (diff)
refactor keybinds
Diffstat (limited to 'keybind.h')
-rw-r--r--keybind.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/keybind.h b/keybind.h
new file mode 100644
index 0000000..a574093
--- /dev/null
+++ b/keybind.h
@@ -0,0 +1,34 @@
+#ifndef KEYBIND_H_
+#define KEYBIND_H_
+#include <stdbool.h>
+
+#include "state.h"
+
+typedef bool key_repeat_t;
+
+#define KEY_REPEAT 1
+#define KEY_NO_REPEAT 0
+
+key_repeat_t quit(client_state* state);
+
+key_repeat_t submit_line(client_state* state);
+
+key_repeat_t insert_selected(client_state* state);
+
+key_repeat_t select_next(client_state* state);
+key_repeat_t select_previous(client_state* state);
+
+key_repeat_t goto_end(client_state* state);
+key_repeat_t goto_begining(client_state* state);
+
+key_repeat_t forward_char(client_state* state);
+key_repeat_t backward_char(client_state* state);
+
+key_repeat_t kill_to_end(client_state* state);
+
+key_repeat_t delete_word(client_state* state);
+key_repeat_t delete_char(client_state* state);
+key_repeat_t delete_char_backward(client_state* state);
+
+key_repeat_t clear_input(client_state* state);
+#endif // KEYBIND_H_