about summary refs log tree commit diff
path: root/keyboard.h
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2021-12-02 11:03:41 -0500
committerJohn Sullivan <jsullivan@csumb.edu>2022-01-10 03:08:06 +0000
commit7ec530ef4612dc5b9df5e4faf57708df9e4fad8f (patch)
tree793498c88e9379b0c6d2c4cb80dd2c5b7fb68198 /keyboard.h
parentfb318069c9ec0c5101bc20660181cb4acf33dce7 (diff)
downloadsuggpicker-7ec530ef4612dc5b9df5e4faf57708df9e4fad8f.tar.gz
output: add -O flag to output overlapped keys
the use-case for this is simple 'swipe'-typing:
another program can take the output, guess the word which is being typed, and type the rest of the word
Diffstat (limited to 'keyboard.h')
-rw-r--r--keyboard.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/keyboard.h b/keyboard.h
index 0242a44..cdb5dd8 100644
--- a/keyboard.h
+++ b/keyboard.h
@@ -85,11 +85,13 @@ struct kbd {
 	struct clr_scheme scheme1;
 
 	bool print;
+	bool print_intersect;
 	uint32_t w, h, s;
 	bool landscape;
 	uint8_t mods;
 	uint8_t compose;
 	struct key *last_press;
+	struct key *last_swipe;
 	struct layout *prevlayout;
 	size_t layer_index;
 
@@ -108,6 +110,8 @@ void kbd_init(struct kbd *kb, struct layout *layouts, char *layer_names_list);
 void kbd_init_layout(struct layout *l, uint32_t width, uint32_t height);
 struct key *kbd_get_key(struct kbd *kb, uint32_t x, uint32_t y);
 void kbd_unpress_key(struct kbd *kb, uint32_t time);
+void kbd_release_key(struct kbd *kb, uint32_t time);
+void kbd_motion_key(struct kbd *kb, uint32_t time, uint32_t x, uint32_t y);
 void kbd_press_key(struct kbd *kb, struct key *k, uint32_t time);
 void kbd_print_key_stdout(struct kbd *kb, struct key *k);
 void kbd_draw_key(struct kbd *kb, struct key *k, bool pressed);