aboutsummaryrefslogtreecommitdiff
path: root/keyboards/kyria/keymaps/gotham/encoder_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/kyria/keymaps/gotham/encoder_utils.h')
-rw-r--r--keyboards/kyria/keymaps/gotham/encoder_utils.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/keyboards/kyria/keymaps/gotham/encoder_utils.h b/keyboards/kyria/keymaps/gotham/encoder_utils.h
new file mode 100644
index 000000000..60db6c6bd
--- /dev/null
+++ b/keyboards/kyria/keymaps/gotham/encoder_utils.h
@@ -0,0 +1,37 @@
1#pragma once
2
3#include <stdbool.h>
4
5#include "quantum.h"
6
7typedef enum {
8 ENC_MODE_VOLUME = 0,
9 ENC_MODE_WORD_NAV,
10 ENC_MODE_LEFT_RIGHT,
11 ENC_MODE_UP_DOWN,
12 ENC_MODE_PAGING,
13 _ENC_MODE_LAST // Do not use, except for looping through enum values
14} encoder_mode_t;
15
16encoder_mode_t encoder_left_mode;
17encoder_mode_t encoder_right_mode;
18
19void encoder_utils_init(void);
20
21void set_encoder_mode(bool left, encoder_mode_t mode);
22
23encoder_mode_t get_encoder_mode(bool left);
24
25void cycle_encoder_mode(bool left, bool reverse);
26
27void encoder_action_volume(uint8_t clockwise);
28
29void encoder_action_word_nav(uint8_t clockwise);
30
31void encoder_action_left_right(uint8_t clockwise);
32
33void encoder_action_up_down(uint8_t clockwise);
34
35void encoder_action_paging(uint8_t clockwise);
36
37void encoder_action(encoder_mode_t mode, uint8_t clockwise);