summaryrefslogtreecommitdiff
path: root/keyboards/nullbitsco/tidbit/keymaps/snailmap_lite
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/nullbitsco/tidbit/keymaps/snailmap_lite')
-rw-r--r--keyboards/nullbitsco/tidbit/keymaps/snailmap_lite/keymap.c86
-rw-r--r--keyboards/nullbitsco/tidbit/keymaps/snailmap_lite/rules.mk1
2 files changed, 47 insertions, 40 deletions
diff --git a/keyboards/nullbitsco/tidbit/keymaps/snailmap_lite/keymap.c b/keyboards/nullbitsco/tidbit/keymaps/snailmap_lite/keymap.c
index 32306ef9d6..d14723df03 100644
--- a/keyboards/nullbitsco/tidbit/keymaps/snailmap_lite/keymap.c
+++ b/keyboards/nullbitsco/tidbit/keymaps/snailmap_lite/keymap.c
@@ -25,38 +25,44 @@ enum layer_names {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LAY0] = LAYOUT(
- KC_PSLS, KC_PAST, KC_PMNS,
- KC_VOLD, KC_VOLU, KC_P7, KC_P8, KC_P9, KC_PPLS,
- KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PPLS,
- KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PENT,
- KC_TRNS, KC_TRNS, KC_P0, KC_P0, KC_PDOT, KC_PENT
+ KC_PSLS, KC_PAST, KC_PMNS,
+ KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_P0, KC_P0, KC_PDOT, KC_PENT
),
-
[_LAY1] = LAYOUT(
- _______, _______, _______,
- _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______
+ _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______
),
-
[_LAY2] = LAYOUT(
- _______, _______, _______,
- _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______
+ _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______
),
-
[_LAY3] = LAYOUT(
- _______, _______, _______,
- _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______
- ),
+ _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______
+ )
};
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), },
+ [1] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), },
+ [2] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), },
+ [3] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), },
+};
+#endif
+
#ifdef OLED_ENABLE
/*=========================================== OLED CONFIGURATION ===========================================*/
#define OLED_ROTATE true // OLED rotation (flip 180* from default orientation)
@@ -112,18 +118,18 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
// Draw static background image to OLED (keyboard with no bottom row)
static void render_background(void) {
static const char PROGMEM nullbits_n_oled[] = {
- 0x00, 0xe0, 0xf0, 0xf0, 0xf8, 0xf8, 0xf0, 0xf0, 0xe0, 0x80, 0x20, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0,
- 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f,
- 0x1f, 0x1f, 0x1f, 0x1f, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xf0, 0x00, 0x00,
- 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00,
- 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
- 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
- 0x00, 0x07, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x07, 0x03, 0x00,
+ 0x00, 0xe0, 0xf0, 0xf0, 0xf8, 0xf8, 0xf0, 0xf0, 0xe0, 0x80, 0x20, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0,
+ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f,
+ 0x1f, 0x1f, 0x1f, 0x1f, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xf0, 0x00, 0x00,
+ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00,
+ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x07, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x07, 0x03, 0x00,
};
oled_write_raw_P(nullbits_n_oled, sizeof(nullbits_n_oled));
}
@@ -173,13 +179,13 @@ static void render_wpm_counters(uint8_t current_wpm) {
static void render_led_status(void) {
// Host Keyboard LED Status
- uint8_t led_usb_state = host_keyboard_leds();
+ led_t led_state = host_keyboard_led_state();
oled_set_cursor(0, 8);
- oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR(CAPLCK_STR) : PSTR(EMPTY_STR), false);
+ oled_write_P(led_state.caps_lock ? PSTR(CAPLCK_STR) : PSTR(EMPTY_STR), false);
oled_set_cursor(0, 9);
- oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR(NUMLCK_STR) : PSTR(EMPTY_STR), false);
+ oled_write_P(led_state.num_lock ? PSTR(NUMLCK_STR) : PSTR(EMPTY_STR), false);
oled_set_cursor(0, 10);
- oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR(SCRLK_STR) : PSTR(EMPTY_STR), false);
+ oled_write_P(led_state.scroll_lock ? PSTR(SCRLK_STR) : PSTR(EMPTY_STR), false);
}
// Update WPM snail icon
diff --git a/keyboards/nullbitsco/tidbit/keymaps/snailmap_lite/rules.mk b/keyboards/nullbitsco/tidbit/keymaps/snailmap_lite/rules.mk
index 1b72fd006a..605f034e1d 100644
--- a/keyboards/nullbitsco/tidbit/keymaps/snailmap_lite/rules.mk
+++ b/keyboards/nullbitsco/tidbit/keymaps/snailmap_lite/rules.mk
@@ -4,3 +4,4 @@ VIA_ENABLE = yes
SPACE_CADET_ENABLE = no
GRAVE_ESC_ENABLE = no
MAGIC_ENABLE = no
+ENCODER_MAP_ENABLE = yes