diff options
| author | Joel Challis <git@zvecr.com> | 2022-10-22 18:03:33 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-22 18:03:33 +0100 |
| commit | 428114fac25dedadfff9fceaf98f3ecd196a469d (patch) | |
| tree | 9c6ee0020feb53cd53efd1006185b50439045148 /users | |
| parent | 4f3af0920903b2253ea80fce9de55ed669ba2e8d (diff) | |
Remove broken userspace and keymaps (#18806)
Diffstat (limited to 'users')
| -rw-r--r-- | users/bbaserdem/.gitignore | 2 | ||||
| -rw-r--r-- | users/bbaserdem/bb-audio.c | 82 | ||||
| -rw-r--r-- | users/bbaserdem/bb-audio.h | 28 | ||||
| -rw-r--r-- | users/bbaserdem/bb-backlight.c | 30 | ||||
| -rw-r--r-- | users/bbaserdem/bb-backlight.h | 23 | ||||
| -rw-r--r-- | users/bbaserdem/bb-encoder.c | 514 | ||||
| -rw-r--r-- | users/bbaserdem/bb-encoder.h | 29 | ||||
| -rw-r--r-- | users/bbaserdem/bb-macro.c | 156 | ||||
| -rw-r--r-- | users/bbaserdem/bb-macro.h | 113 | ||||
| -rw-r--r-- | users/bbaserdem/bb-oled-extra.c | 796 | ||||
| -rw-r--r-- | users/bbaserdem/bb-oled-extra.h | 25 | ||||
| -rw-r--r-- | users/bbaserdem/bb-oled.c | 216 | ||||
| -rw-r--r-- | users/bbaserdem/bb-oled.h | 32 | ||||
| -rw-r--r-- | users/bbaserdem/bb-rgb.c | 123 | ||||
| -rw-r--r-- | users/bbaserdem/bb-rgb.h | 28 | ||||
| -rw-r--r-- | users/bbaserdem/bb-underglow.c | 116 | ||||
| -rw-r--r-- | users/bbaserdem/bb-underglow.h | 28 | ||||
| -rw-r--r-- | users/bbaserdem/bbaserdem.c | 376 | ||||
| -rw-r--r-- | users/bbaserdem/bbaserdem.h | 573 | ||||
| -rw-r--r-- | users/bbaserdem/config.h | 134 | ||||
| -rw-r--r-- | users/bbaserdem/keymap-bitmaps/.gitignore | 4 | ||||
| -rwxr-xr-x | users/bbaserdem/keymap-bitmaps/cropBmp | 38 | ||||
| -rw-r--r-- | users/bbaserdem/readme.md | 131 | ||||
| -rw-r--r-- | users/bbaserdem/rules.mk | 87 |
24 files changed, 0 insertions, 3684 deletions
diff --git a/users/bbaserdem/.gitignore b/users/bbaserdem/.gitignore deleted file mode 100644 index 57bd0e43b4..0000000000 --- a/users/bbaserdem/.gitignore +++ /dev/null | |||
| @@ -1,2 +0,0 @@ | |||
| 1 | /secrets.h | ||
| 2 | /secrets.c | ||
diff --git a/users/bbaserdem/bb-audio.c b/users/bbaserdem/bb-audio.c deleted file mode 100644 index eef0cdf2f6..0000000000 --- a/users/bbaserdem/bb-audio.c +++ /dev/null | |||
| @@ -1,82 +0,0 @@ | |||
| 1 | /* Copyright 2021 Batuhan Başerdem | ||
| 2 | * <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | |||
| 19 | #include "bb-audio.h" | ||
| 20 | /* AUDIO | ||
| 21 | * This contains some audio related stuff. | ||
| 22 | * There is no need to wrap this up with preprocessor commands; | ||
| 23 | * This is only called if audio is enabled | ||
| 24 | */ | ||
| 25 | |||
| 26 | float tone_game_intro[][2] = GAME_ON_SONG; | ||
| 27 | float tone_game_outro[][2] = GAME_OFF_SONG; | ||
| 28 | |||
| 29 | // Audio playing when layer changes | ||
| 30 | layer_state_t layer_state_set_audio(layer_state_t state) { | ||
| 31 | // Get this layer | ||
| 32 | static bool prev_game = false; | ||
| 33 | |||
| 34 | // If entering the game layer; play the intro sound | ||
| 35 | if (layer_state_cmp(state, _GAME) && (!prev_game)) { | ||
| 36 | stop_all_notes(); | ||
| 37 | PLAY_SONG(tone_game_intro); | ||
| 38 | prev_game = true; | ||
| 39 | } | ||
| 40 | // If exiting the game layer; play the outro sound | ||
| 41 | if ((!layer_state_cmp(state, _GAME)) && prev_game) { | ||
| 42 | stop_all_notes(); | ||
| 43 | PLAY_SONG(tone_game_outro); | ||
| 44 | prev_game = false; | ||
| 45 | } | ||
| 46 | return state; | ||
| 47 | } | ||
| 48 | |||
| 49 | // Audio layer switch; add the music layer on top of this | ||
| 50 | bool process_record_audio(uint16_t keycode, keyrecord_t *record) { | ||
| 51 | switch (keycode) { | ||
| 52 | case MU_TOG: | ||
| 53 | if (!record->event.pressed) { | ||
| 54 | // On release, exit music mode if enabled | ||
| 55 | if (layer_state_is(_MUSI)) { | ||
| 56 | layer_off(_MUSI); | ||
| 57 | // If not enabled; turn off all layers and load music layer | ||
| 58 | } else { | ||
| 59 | layer_clear(); | ||
| 60 | layer_on(_MUSI); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | return true; | ||
| 64 | break; | ||
| 65 | case MU_ON: | ||
| 66 | if (!record->event.pressed) { | ||
| 67 | // On release, enter music mode | ||
| 68 | layer_clear(); | ||
| 69 | layer_on(_MUSI); | ||
| 70 | } | ||
| 71 | return true; | ||
| 72 | break; | ||
| 73 | case MU_OFF: | ||
| 74 | if (!record->event.pressed) { | ||
| 75 | // On release, exit music mode | ||
| 76 | layer_off(_MUSI); | ||
| 77 | } | ||
| 78 | return true; | ||
| 79 | break; | ||
| 80 | } | ||
| 81 | return true; | ||
| 82 | } | ||
diff --git a/users/bbaserdem/bb-audio.h b/users/bbaserdem/bb-audio.h deleted file mode 100644 index 351061ab9a..0000000000 --- a/users/bbaserdem/bb-audio.h +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | /* Copyright 2021 Batuhan Başerdem | ||
| 2 | * <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #pragma once | ||
| 18 | #include "bbaserdem.h" | ||
| 19 | |||
| 20 | /* AUDIO | ||
| 21 | * Some functions to hook to some modes | ||
| 22 | */ | ||
| 23 | |||
| 24 | // Hook to layer change effects | ||
| 25 | layer_state_t layer_state_set_audio(layer_state_t state); | ||
| 26 | |||
| 27 | // Hook to audio keycodes | ||
| 28 | bool process_record_audio(uint16_t keycode, keyrecord_t *record); | ||
diff --git a/users/bbaserdem/bb-backlight.c b/users/bbaserdem/bb-backlight.c deleted file mode 100644 index 5eca1f2c11..0000000000 --- a/users/bbaserdem/bb-backlight.c +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | /* Copyright 2021 Batuhan Başerdem | ||
| 2 | * <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include "bb-backlight.h" | ||
| 19 | /* Replaced functions with noeeprom varieties; I don't need retention across | ||
| 20 | * booting. | ||
| 21 | */ | ||
| 22 | |||
| 23 | // Backlight LEDs | ||
| 24 | void keyboard_post_init_backlight(void) { | ||
| 25 | backlight_enable(); | ||
| 26 | backlight_level(2); | ||
| 27 | # ifdef BACKLIGHT_BREATHING | ||
| 28 | breathing_enable(); | ||
| 29 | # endif // BACKLIGHT_BREATHING | ||
| 30 | } | ||
diff --git a/users/bbaserdem/bb-backlight.h b/users/bbaserdem/bb-backlight.h deleted file mode 100644 index 3af3137d9a..0000000000 --- a/users/bbaserdem/bb-backlight.h +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | /* Copyright 2021 Batuhan Başerdem | ||
| 2 | * <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #pragma once | ||
| 18 | #include "bbaserdem.h" | ||
| 19 | |||
| 20 | /* Hooks for backlight definitions | ||
| 21 | */ | ||
| 22 | |||
| 23 | void keyboard_post_init_backlight(void); | ||
diff --git a/users/bbaserdem/bb-encoder.c b/users/bbaserdem/bb-encoder.c deleted file mode 100644 index eea9751051..0000000000 --- a/users/bbaserdem/bb-encoder.c +++ /dev/null | |||
| @@ -1,514 +0,0 @@ | |||
| 1 | /* Copyright 2021 Batuhan Başerdem | ||
| 2 | * <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #include "bb-encoder.h" | ||
| 18 | |||
| 19 | // Need this to call velocikey activation | ||
| 20 | #ifdef VELOCIKEY_ENABLE | ||
| 21 | # include "velocikey.h" | ||
| 22 | #endif // VELOCIKEY_ENABLE | ||
| 23 | // Need memcpy and memcmp from string.h along with transfer stuff | ||
| 24 | #ifdef OLED_ENABLE | ||
| 25 | # include <string.h> | ||
| 26 | #endif // OLED_ENABLE | ||
| 27 | |||
| 28 | /* ROTARY ENCODER | ||
| 29 | * This contains my general rotary encoder code | ||
| 30 | * Encoders each have a list of different modes they can be in. | ||
| 31 | * Each mode also have an on click action as well. | ||
| 32 | * Modes can be cycled using either shift-click or ctrl-click | ||
| 33 | * Modes can be reset using OS click | ||
| 34 | * Some modes are only accessible through some keymap layers | ||
| 35 | */ | ||
| 36 | |||
| 37 | // Default state for the encoders | ||
| 38 | void reset_encoder_state(void) { | ||
| 39 | userspace_config.e0base = 0; | ||
| 40 | userspace_config.e0point = 0; | ||
| 41 | userspace_config.e0rgb = 0; | ||
| 42 | userspace_config.e1base = 1; | ||
| 43 | userspace_config.e1point = 1; | ||
| 44 | userspace_config.e1rgb = 1; | ||
| 45 | } | ||
| 46 | |||
| 47 | // Encoder scroll functionality | ||
| 48 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 49 | uint8_t this_number; | ||
| 50 | // Differentiate layer roles | ||
| 51 | switch (get_highest_layer(layer_state)) { | ||
| 52 | # ifdef RGB_MATRIX_ENABLE | ||
| 53 | case _MEDI: | ||
| 54 | // Get correct index | ||
| 55 | if (index == 0) { | ||
| 56 | this_number = userspace_config.e0rgb; | ||
| 57 | } else if (index == 1) { | ||
| 58 | this_number = userspace_config.e1rgb; | ||
| 59 | } else { | ||
| 60 | this_number = 128; | ||
| 61 | } | ||
| 62 | switch(this_number) { | ||
| 63 | case 0: // Effect the RGB mode | ||
| 64 | if (clockwise) { | ||
| 65 | rgb_matrix_step_noeeprom(); | ||
| 66 | } else { | ||
| 67 | rgb_matrix_step_reverse_noeeprom(); | ||
| 68 | } | ||
| 69 | break; | ||
| 70 | case 1: // Effect the RGB hue | ||
| 71 | if (clockwise) { | ||
| 72 | rgb_matrix_increase_hue_noeeprom(); | ||
| 73 | } else { | ||
| 74 | rgb_matrix_decrease_hue_noeeprom(); | ||
| 75 | } | ||
| 76 | break; | ||
| 77 | case 2: // Effect the RGB saturation | ||
| 78 | if (clockwise) { | ||
| 79 | rgb_matrix_increase_sat_noeeprom(); | ||
| 80 | } else { | ||
| 81 | rgb_matrix_decrease_sat_noeeprom(); | ||
| 82 | } | ||
| 83 | break; | ||
| 84 | case 3: // Effect the RGB brightness | ||
| 85 | if (clockwise) { | ||
| 86 | rgb_matrix_increase_val_noeeprom(); | ||
| 87 | } else { | ||
| 88 | rgb_matrix_decrease_val_noeeprom(); | ||
| 89 | } | ||
| 90 | break; | ||
| 91 | case 4: // Effect the RGB effect speed | ||
| 92 | if (clockwise) { | ||
| 93 | rgb_matrix_increase_speed_noeeprom(); | ||
| 94 | } else { | ||
| 95 | rgb_matrix_decrease_speed_noeeprom(); | ||
| 96 | } | ||
| 97 | break; | ||
| 98 | } | ||
| 99 | break; | ||
| 100 | # endif // RGB_MATRIX_ENABLE | ||
| 101 | # ifdef MOUSEKEY_ENABLE | ||
| 102 | case _MOUS: | ||
| 103 | // Get correct index | ||
| 104 | if (index == 0) { | ||
| 105 | this_number = userspace_config.e0point; | ||
| 106 | } else if (index == 1) { | ||
| 107 | this_number = userspace_config.e1point; | ||
| 108 | } else { | ||
| 109 | this_number = 128; | ||
| 110 | } | ||
| 111 | switch(this_number) { | ||
| 112 | case 0: // Move mouse on horizontal axis | ||
| 113 | if (clockwise) { | ||
| 114 | tap_code(KC_MS_R); | ||
| 115 | } else { | ||
| 116 | tap_code(KC_MS_L); | ||
| 117 | } | ||
| 118 | break; | ||
| 119 | case 1: // Move mouse on vertical axis | ||
| 120 | if (clockwise) { | ||
| 121 | tap_code(KC_MS_D); | ||
| 122 | } else { | ||
| 123 | tap_code(KC_MS_U); | ||
| 124 | } | ||
| 125 | break; | ||
| 126 | case 2: // Move mouse wheel on vertical axis | ||
| 127 | if (clockwise) { | ||
| 128 | tap_code(KC_WH_D); | ||
| 129 | } else { | ||
| 130 | tap_code(KC_WH_U); | ||
| 131 | } | ||
| 132 | break; | ||
| 133 | case 3: // Move mouse on horizontal axis | ||
| 134 | if (clockwise) { | ||
| 135 | tap_code(KC_WH_R); | ||
| 136 | } else { | ||
| 137 | tap_code(KC_WH_L); | ||
| 138 | } | ||
| 139 | break; | ||
| 140 | } | ||
| 141 | break; | ||
| 142 | # endif // MOUSEKEY_ENABLE | ||
| 143 | default: | ||
| 144 | // Get correct index | ||
| 145 | if (index == 0) { | ||
| 146 | this_number = userspace_config.e0base; | ||
| 147 | } else if (index == 1) { | ||
| 148 | this_number = userspace_config.e1base; | ||
| 149 | } else { | ||
| 150 | this_number = 128; | ||
| 151 | } | ||
| 152 | switch(this_number) { | ||
| 153 | case 0: // Volume | ||
| 154 | if (clockwise) { | ||
| 155 | tap_code16(KC_VOLU); | ||
| 156 | } else { | ||
| 157 | tap_code16(KC_VOLD); | ||
| 158 | } | ||
| 159 | break; | ||
| 160 | case 1: // Song change | ||
| 161 | if (clockwise) { | ||
| 162 | tap_code16(KC_MNXT); | ||
| 163 | } else { | ||
| 164 | tap_code16(KC_MPRV); | ||
| 165 | } | ||
| 166 | break; | ||
| 167 | case 2: // Move to audio sink | ||
| 168 | if (clockwise) { | ||
| 169 | tap_code16(KC_F13); | ||
| 170 | } else { | ||
| 171 | tap_code16(S(KC_F13)); | ||
| 172 | } | ||
| 173 | break; | ||
| 174 | case 3: // Volume of source | ||
| 175 | if (clockwise) { | ||
| 176 | tap_code16(S(KC_VOLU)); | ||
| 177 | } else { | ||
| 178 | tap_code16(C(KC_VOLD)); | ||
| 179 | } | ||
| 180 | break; | ||
| 181 | case 4: // Move to audio source | ||
| 182 | if (clockwise) { | ||
| 183 | tap_code16(C(KC_F13)); | ||
| 184 | } else { | ||
| 185 | tap_code16(C(S(KC_F13))); | ||
| 186 | } | ||
| 187 | break; | ||
| 188 | case 5: // Left-right | ||
| 189 | if (clockwise) { | ||
| 190 | tap_code16(KC_RGHT); | ||
| 191 | } else { | ||
| 192 | tap_code16(KC_LEFT); | ||
| 193 | } | ||
| 194 | break; | ||
| 195 | case 6: // Up-down | ||
| 196 | if (clockwise) { | ||
| 197 | tap_code16(KC_DOWN); | ||
| 198 | } else { | ||
| 199 | tap_code16(KC_UP); | ||
| 200 | } | ||
| 201 | break; | ||
| 202 | case 7: // Page Up-down | ||
| 203 | if (clockwise) { | ||
| 204 | tap_code16(KC_PGDN); | ||
| 205 | } else { | ||
| 206 | tap_code16(KC_PGUP); | ||
| 207 | } | ||
| 208 | break; | ||
| 209 | case 8: // Delete | ||
| 210 | if (clockwise) { | ||
| 211 | tap_code16(KC_DEL); | ||
| 212 | } else { | ||
| 213 | tap_code16(KC_BSPC); | ||
| 214 | } | ||
| 215 | break; | ||
| 216 | } | ||
| 217 | break; | ||
| 218 | } | ||
| 219 | return false; | ||
| 220 | } | ||
| 221 | |||
| 222 | void encoder_click_action(uint8_t index) { | ||
| 223 | uint8_t this_number; | ||
| 224 | // Differentiate layer roles | ||
| 225 | switch (get_highest_layer(layer_state)) { | ||
| 226 | # ifdef RGB_MATRIX_ENABLE | ||
| 227 | case _MEDI: | ||
| 228 | // Get correct index | ||
| 229 | if (index == 0) { | ||
| 230 | this_number = userspace_config.e0rgb; | ||
| 231 | } else if (index == 1) { | ||
| 232 | this_number = userspace_config.e1rgb; | ||
| 233 | } else { | ||
| 234 | this_number = 128; | ||
| 235 | } | ||
| 236 | switch(this_number) { | ||
| 237 | case 0: // Return to no animation | ||
| 238 | rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR); | ||
| 239 | break; | ||
| 240 | case 1: | ||
| 241 | case 2: | ||
| 242 | case 3: // Toggle | ||
| 243 | rgb_matrix_increase_val_noeeprom(); | ||
| 244 | break; | ||
| 245 | case 4: // Toggle velocikey | ||
| 246 | # ifdef VELOCIKEY_ENABLE | ||
| 247 | velocikey_toggle(); | ||
| 248 | # endif // VELOCIKEY_ENABLE | ||
| 249 | break; | ||
| 250 | } | ||
| 251 | break; | ||
| 252 | # endif // RGB_MATRIX_ENABLE | ||
| 253 | # ifdef MOUSEKEY_ENABLE | ||
| 254 | case _MOUS: | ||
| 255 | // Get correct index | ||
| 256 | if (index == 0) { | ||
| 257 | this_number = userspace_config.e0point; | ||
| 258 | } else if (index == 1) { | ||
| 259 | this_number = userspace_config.e1point; | ||
| 260 | } else { | ||
| 261 | this_number = 128; | ||
| 262 | } | ||
| 263 | switch(this_number) { | ||
| 264 | case 0: // Left click | ||
| 265 | tap_code16(KC_BTN1); | ||
| 266 | break; | ||
| 267 | case 1: // Right click | ||
| 268 | tap_code16(KC_BTN2); | ||
| 269 | break; | ||
| 270 | case 2: | ||
| 271 | case 3: // Middle click | ||
| 272 | tap_code16(KC_BTN2); | ||
| 273 | break; | ||
| 274 | } | ||
| 275 | break; | ||
| 276 | # endif // MOUSEKEY_ENABLE | ||
| 277 | default: | ||
| 278 | // Get correct index | ||
| 279 | if (index == 0) { | ||
| 280 | this_number = userspace_config.e0base; | ||
| 281 | } else if (index == 1) { | ||
| 282 | this_number = userspace_config.e1base; | ||
| 283 | } else { | ||
| 284 | this_number = 128; | ||
| 285 | } | ||
| 286 | switch(this_number) { | ||
| 287 | case 0: // Toggle mute | ||
| 288 | case 2: | ||
| 289 | tap_code16(KC_MUTE); | ||
| 290 | break; | ||
| 291 | case 1: // Pause | ||
| 292 | tap_code16(KC_MPLY); | ||
| 293 | break; | ||
| 294 | case 3: // Mute source | ||
| 295 | case 4: | ||
| 296 | tap_code16(A(KC_MUTE)); | ||
| 297 | break; | ||
| 298 | case 5: // Insert | ||
| 299 | tap_code16(KC_INS); | ||
| 300 | break; | ||
| 301 | case 6: // Capslock | ||
| 302 | tap_code16(KC_CAPS); | ||
| 303 | break; | ||
| 304 | case 7: // Redo | ||
| 305 | tap_code16(BB_REDO); | ||
| 306 | break; | ||
| 307 | case 8: // Undo | ||
| 308 | tap_code16(BB_UNDO); | ||
| 309 | break; | ||
| 310 | } | ||
| 311 | break; | ||
| 312 | } | ||
| 313 | } | ||
| 314 | |||
| 315 | bool process_record_encoder(uint16_t keycode, keyrecord_t *record) { | ||
| 316 | // Check if and which encoder | ||
| 317 | int encoder_index = -1; | ||
| 318 | |||
| 319 | // Get the pressed encoder | ||
| 320 | switch (keycode) { | ||
| 321 | case BB_ENC0: | ||
| 322 | encoder_index = 0; | ||
| 323 | break; | ||
| 324 | case BB_ENC1: | ||
| 325 | encoder_index = 1; | ||
| 326 | break; | ||
| 327 | } | ||
| 328 | |||
| 329 | // Activate encoder function of button | ||
| 330 | if ((encoder_index >= 0) & (!record->event.pressed)) { | ||
| 331 | // If shifted, move mode one point forward | ||
| 332 | if (get_mods() & MOD_MASK_SHIFT) { | ||
| 333 | switch (get_highest_layer(layer_state)) { | ||
| 334 | # ifdef RGB_MATRIX_ENABLE | ||
| 335 | case _MEDI: | ||
| 336 | if (encoder_index == 0) { | ||
| 337 | userspace_config.e0rgb = (userspace_config.e0rgb + 1) % 5; | ||
| 338 | } else { | ||
| 339 | userspace_config.e1rgb = (userspace_config.e1rgb + 1) % 5; | ||
| 340 | } | ||
| 341 | break; | ||
| 342 | # endif // RGB_MATRIX_ENABLE | ||
| 343 | # ifdef MOUSEKEY_ENABLE | ||
| 344 | case _MOUS: | ||
| 345 | if (encoder_index == 0) { | ||
| 346 | userspace_config.e0point = (userspace_config.e0point + 1) % 4; | ||
| 347 | } else { | ||
| 348 | userspace_config.e1point = (userspace_config.e1point + 1) % 4; | ||
| 349 | } | ||
| 350 | break; | ||
| 351 | # endif // MOUSEKEY_ENABLE | ||
| 352 | default: | ||
| 353 | if (encoder_index == 0) { | ||
| 354 | userspace_config.e0base = (userspace_config.e0base + 1) % 9; | ||
| 355 | } else { | ||
| 356 | userspace_config.e1base = (userspace_config.e1base + 1) % 9; | ||
| 357 | } | ||
| 358 | break; | ||
| 359 | } | ||
| 360 | // If ctrl is active, move mode one point backwards | ||
| 361 | } else if (get_mods() & MOD_MASK_CTRL) { | ||
| 362 | switch (get_highest_layer(layer_state)) { | ||
| 363 | # ifdef RGB_MATRIX_ENABLE | ||
| 364 | case _MEDI: | ||
| 365 | if (encoder_index == 0) { | ||
| 366 | userspace_config.e0rgb = (userspace_config.e0rgb + 5 - 1) % 5; | ||
| 367 | } else { | ||
| 368 | userspace_config.e1rgb = (userspace_config.e1rgb + 5 - 1) % 5; | ||
| 369 | } | ||
| 370 | break; | ||
| 371 | # endif // RGB_MATRIX_ENABLE | ||
| 372 | # ifdef MOUSEKEY_ENABLE | ||
| 373 | case _MOUS: | ||
| 374 | if (encoder_index == 0) { | ||
| 375 | userspace_config.e0point = (userspace_config.e0point + 4 - 1) % 4; | ||
| 376 | } else { | ||
| 377 | userspace_config.e1point = (userspace_config.e1point + 4 - 1) % 4; | ||
| 378 | } | ||
| 379 | break; | ||
| 380 | # endif // MOUSEKEY_ENABLE | ||
| 381 | default: | ||
| 382 | if (encoder_index == 0) { | ||
| 383 | userspace_config.e0base = (userspace_config.e0base + 9 - 1) % 9; | ||
| 384 | } else { | ||
| 385 | userspace_config.e1base = (userspace_config.e1base + 9 - 1) % 9; | ||
| 386 | } | ||
| 387 | break; | ||
| 388 | } | ||
| 389 | // If meta is active, reset the encoder states | ||
| 390 | } else if (get_mods() & MOD_MASK_GUI) { | ||
| 391 | reset_encoder_state(); | ||
| 392 | eeconfig_update_user(userspace_config.raw); | ||
| 393 | // If nothing else; just perform the click action | ||
| 394 | } else { | ||
| 395 | encoder_click_action(encoder_index); | ||
| 396 | } | ||
| 397 | } | ||
| 398 | return true; | ||
| 399 | } | ||
| 400 | |||
| 401 | // For printing status to OLED | ||
| 402 | #ifdef OLED_ENABLE | ||
| 403 | void encoder_state_string(uint8_t index, uint8_t layer, char* buffer) { | ||
| 404 | uint8_t this_number; | ||
| 405 | // Get the layer straight from the main function | ||
| 406 | switch (layer) { | ||
| 407 | // If RGB control mode is enabled | ||
| 408 | # ifdef RGB_MATRIX_ENABLE | ||
| 409 | case _MEDI: | ||
| 410 | // Get correct index | ||
| 411 | if (index == 0) { | ||
| 412 | this_number = userspace_config.e0rgb; | ||
| 413 | } else if (index == 1) { | ||
| 414 | this_number = userspace_config.e1rgb; | ||
| 415 | } else { | ||
| 416 | this_number = 128; | ||
| 417 | } | ||
| 418 | switch (this_number) { | ||
| 419 | case 0: | ||
| 420 | strcpy(buffer, "ani mode"); | ||
| 421 | break; | ||
| 422 | case 1: | ||
| 423 | strcpy(buffer, "hue "); | ||
| 424 | break; | ||
| 425 | case 2: | ||
| 426 | strcpy(buffer, "saturat."); | ||
| 427 | break; | ||
| 428 | case 3: | ||
| 429 | strcpy(buffer, "bright. "); | ||
| 430 | break; | ||
| 431 | case 4: | ||
| 432 | strcpy(buffer, "ani. spd"); | ||
| 433 | break; | ||
| 434 | default: | ||
| 435 | strcpy(buffer, " -N/A- "); | ||
| 436 | break; | ||
| 437 | } | ||
| 438 | break; | ||
| 439 | # endif // RGB_MATRIX_ENABLE | ||
| 440 | // If pointer control is enabled | ||
| 441 | # ifdef MOUSEKEY_ENABLE | ||
| 442 | case _MOUS: | ||
| 443 | // Get correct index | ||
| 444 | if (index == 0) { | ||
| 445 | this_number = userspace_config.e0point; | ||
| 446 | } else if (index == 1) { | ||
| 447 | this_number = userspace_config.e1point; | ||
| 448 | } else { | ||
| 449 | this_number = 128; | ||
| 450 | } | ||
| 451 | switch (this_number) { | ||
| 452 | case 0: | ||
| 453 | strcpy(buffer, "Lateral "); | ||
| 454 | break; | ||
| 455 | case 1: | ||
| 456 | strcpy(buffer, "Vertical"); | ||
| 457 | break; | ||
| 458 | case 2: | ||
| 459 | strcpy(buffer, "Scr. Ver"); | ||
| 460 | break; | ||
| 461 | case 3: | ||
| 462 | strcpy(buffer, "Scr. Lat"); | ||
| 463 | break; | ||
| 464 | default: | ||
| 465 | strcpy(buffer, " -N/A- "); | ||
| 466 | break; | ||
| 467 | } | ||
| 468 | break; | ||
| 469 | # endif // MOUSEKEY_ENABLE | ||
| 470 | default: | ||
| 471 | // Get correct index | ||
| 472 | if (index == 0) { | ||
| 473 | this_number = userspace_config.e0base; | ||
| 474 | } else if (index == 1) { | ||
| 475 | this_number = userspace_config.e1base; | ||
| 476 | } else { | ||
| 477 | this_number = 128; | ||
| 478 | } | ||
| 479 | switch (this_number) { | ||
| 480 | case 0: | ||
| 481 | strcpy(buffer, "Volume "); | ||
| 482 | break; | ||
| 483 | case 1: | ||
| 484 | strcpy(buffer, "Song "); | ||
| 485 | break; | ||
| 486 | case 2: | ||
| 487 | strcpy(buffer, "Sink "); | ||
| 488 | break; | ||
| 489 | case 3: | ||
| 490 | strcpy(buffer, "Src. Vol"); | ||
| 491 | break; | ||
| 492 | case 4: | ||
| 493 | strcpy(buffer, "Source "); | ||
| 494 | break; | ||
| 495 | case 5: | ||
| 496 | strcpy(buffer, "Arrow LR"); | ||
| 497 | break; | ||
| 498 | case 6: | ||
| 499 | strcpy(buffer, "Arrow UD"); | ||
| 500 | break; | ||
| 501 | case 7: | ||
| 502 | strcpy(buffer, "Page U/D"); | ||
| 503 | break; | ||
| 504 | case 8: | ||
| 505 | strcpy(buffer, "Erase "); | ||
| 506 | break; | ||
| 507 | default: | ||
| 508 | strcpy(buffer, " -N/A- "); | ||
| 509 | break; | ||
| 510 | } | ||
| 511 | break; | ||
| 512 | } | ||
| 513 | } | ||
| 514 | #endif // OLED_ENABLE | ||
diff --git a/users/bbaserdem/bb-encoder.h b/users/bbaserdem/bb-encoder.h deleted file mode 100644 index dce08cd3d5..0000000000 --- a/users/bbaserdem/bb-encoder.h +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | /* Copyright 2021 Batuhan Başerdem | ||
| 2 | * <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #pragma once | ||
| 18 | #include "bbaserdem.h" | ||
| 19 | |||
| 20 | // Hook to encoder stuff | ||
| 21 | bool encoder_update_user(uint8_t index, bool clockwise); | ||
| 22 | // Complicated code for what the encoder keys do when pressed | ||
| 23 | bool process_record_encoder(uint16_t keycode, keyrecord_t *record); | ||
| 24 | // Clear the encoder settings | ||
| 25 | void reset_encoder_state(void); | ||
| 26 | // This is so that encoder state is synched between two halves | ||
| 27 | void housekeeping_task_encoder(void); | ||
| 28 | // This is purely for oled; should it want to use it | ||
| 29 | void encoder_state_string(uint8_t index, uint8_t layer, char* buffer); | ||
diff --git a/users/bbaserdem/bb-macro.c b/users/bbaserdem/bb-macro.c deleted file mode 100644 index 6a722e6db1..0000000000 --- a/users/bbaserdem/bb-macro.c +++ /dev/null | |||
| @@ -1,156 +0,0 @@ | |||
| 1 | /* Copyright 2021 Batuhan Başerdem | ||
| 2 | * <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #include "bb-macro.h" | ||
| 18 | |||
| 19 | /* MACRO Definitions | ||
| 20 | * This file has my macros/unicodes | ||
| 21 | * Hooks for other functionality to inject itself into the process_record | ||
| 22 | */ | ||
| 23 | |||
| 24 | // Tap dance definitons | ||
| 25 | #ifdef AUDIO_ENABLE | ||
| 26 | #ifdef TAP_DANCE_ENABLE | ||
| 27 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
| 28 | // Music playback speed modulator | ||
| 29 | [TD_AUDIO_TEMPO] = ACTION_TAP_DANCE_DOUBLE(MU_SLOW, MU_FAST), | ||
| 30 | }; | ||
| 31 | #endif // AUDIO_ENABLE | ||
| 32 | #endif // TAP_DANCE_ENABLE | ||
| 33 | |||
| 34 | // Unicode definitions; for single character keys | ||
| 35 | // We mask their definitions if unicode is not enabled | ||
| 36 | #ifdef UNICODEMAP_ENABLE | ||
| 37 | const uint32_t PROGMEM unicode_map[] = { | ||
| 38 | [UPC_A_CIRC] = 0x00C2, [LOW_A_CIRC] = 0x00E2, // Â â | ||
| 39 | [UPC_C_CEDI] = 0x00C7, [LOW_C_CEDI] = 0x00E7, // Ç ç | ||
| 40 | [UPC_G_BREV] = 0x011E, [LOW_G_BREV] = 0x001F, // Ğ ğ | ||
| 41 | [UPC_I_CIRC] = 0x00CE, [LOW_I_CIRC] = 0x00EE, // Î î | ||
| 42 | [UPC_I_DOTL] = 0x0049, [LOW_I_DOTL] = 0x0131, // I ı | ||
| 43 | [UPC_I_DOTT] = 0x0130, [LOW_I_DOTT] = 0x0069, // İ i | ||
| 44 | [UPC_O_DIAE] = 0x00D6, [LOW_O_DIAE] = 0x00F6, // Ö ö | ||
| 45 | [UPC_S_CEDI] = 0x015E, [LOW_S_CEDI] = 0x015F, // Ş ş | ||
| 46 | [UPC_U_CIRC] = 0x00DB, [LOW_U_CIRC] = 0x00FB, // Û û | ||
| 47 | [UPC_U_DIAE] = 0x00DC, [LOW_U_DIAE] = 0x00FC, // Ü ü | ||
| 48 | [UPC_ALPHA] = 0x0391, [LOW_ALPHA] = 0x03B1, // Α α | ||
| 49 | [UPC_BETA] = 0x0392, [LOW_BETA] = 0x03B2, // Β β | ||
| 50 | [UPC_GAMMA] = 0x0393, [LOW_GAMMA] = 0x03B3, // Γ γ | ||
| 51 | [UPC_DELTA] = 0x0394, [LOW_DELTA] = 0x03B4, // Δ δ | ||
| 52 | [UPC_EPSILON] = 0x0395, [LOW_EPSILON] = 0x03B5, // Ε ε | ||
| 53 | [UPC_ZETA] = 0x0396, [LOW_ZETA] = 0x03B6, // Ζ ζ | ||
| 54 | [UPC_ETA] = 0x0397, [LOW_ETA] = 0x03B7, // Η η | ||
| 55 | [UPC_THETA] = 0x0398, [LOW_THETA] = 0x03B8, // Θ θ | ||
| 56 | [UPC_IOTA] = 0x0399, [LOW_IOTA] = 0x03B9, // Ι ι | ||
| 57 | [UPC_KAPPA] = 0x039A, [LOW_KAPPA] = 0x03BA, // Κ κ | ||
| 58 | [UPC_LAMBDA] = 0x039B, [LOW_LAMBDA] = 0x03BB, // Λ λ | ||
| 59 | [UPC_MU] = 0x039C, [LOW_MU] = 0x03BC, // Μ μ | ||
| 60 | [UPC_NU] = 0x039D, [LOW_NU] = 0x03BD, // Ν ν | ||
| 61 | [UPC_XI] = 0x039E, [LOW_XI] = 0x03BE, // Ξ ξ | ||
| 62 | [UPC_OMICRON] = 0x039F, [LOW_OMICRON] = 0x03BF, // Ο ο | ||
| 63 | [UPC_PI] = 0x03A0, [LOW_PI] = 0x03C0, // Π π | ||
| 64 | [UPC_RHO] = 0x03A1, [LOW_RHO] = 0x03C1, // Ρ ρ | ||
| 65 | [UPC_SIGMA] = 0x03A3, [LOW_SIGMA] = 0x03C3, // Σ σ | ||
| 66 | [UPC_TAU] = 0x03A4, [LOW_TAU] = 0x03C4, // Τ τ | ||
| 67 | [UPC_UPSILON] = 0x03A5, [LOW_UPSILON] = 0x03C5, // Υ υ | ||
| 68 | [UPC_PHI] = 0x03A6, [LOW_PHI] = 0x03C6, // Φ φ | ||
| 69 | [UPC_CHI] = 0x03A7, [LOW_CHI] = 0x03C7, // Χ χ | ||
| 70 | [UPC_PSI] = 0x03A8, [LOW_PSI] = 0x03C8, // Ψ ψ | ||
| 71 | [UPC_OMEGA] = 0x03A9, [LOW_OMEGA] = 0x03C9, // Ω ω | ||
| 72 | [ELLIPSIS] = 0x2026, // … | ||
| 73 | [PLANCK_CON] = 0x210F, // ℏ | ||
| 74 | [ANGSTROM] = 0x212B, // Å | ||
| 75 | [BITCOIN] = 0x20BF // ₿ | ||
| 76 | }; | ||
| 77 | #endif // UNICODEMAP_ENABLE | ||
| 78 | |||
| 79 | // Keycodes | ||
| 80 | bool process_record_macro(uint16_t keycode, keyrecord_t *record) { | ||
| 81 | switch (keycode) { | ||
| 82 | // AltGr + Caps should change the oled layout variable | ||
| 83 | case KC_CAPS_LOCK: | ||
| 84 | if (record->event.pressed) { | ||
| 85 | if (get_mods() & MOD_BIT(KC_RALT)) { | ||
| 86 | userspace_config.layout = (userspace_config.layout + 1) % 3; | ||
| 87 | } | ||
| 88 | } | ||
| 89 | return true; | ||
| 90 | break; | ||
| 91 | case BB_OLED: | ||
| 92 | if (record->event.pressed) { | ||
| 93 | if (get_mods() & MOD_MASK_SHIFT) { | ||
| 94 | // Scroll in opposite direction | ||
| 95 | userspace_config.layout = (userspace_config.layout + 4) % 3; | ||
| 96 | } else { | ||
| 97 | userspace_config.layout = (userspace_config.layout + 1) % 3; | ||
| 98 | } | ||
| 99 | } | ||
| 100 | return false; | ||
| 101 | break; | ||
| 102 | // Plain macros | ||
| 103 | case BB_PGPK: | ||
| 104 | // My public PGP key | ||
| 105 | if (record->event.pressed) { | ||
| 106 | SEND_STRING("0B7151C823559DD8A7A04CE36426139E2F4C6CCE"); | ||
| 107 | } | ||
| 108 | return false; break; | ||
| 109 | case DBL_ANG: | ||
| 110 | // Double angular bracket | ||
| 111 | if (record->event.pressed) { | ||
| 112 | SEND_STRING("<>"SS_TAP(X_LEFT)); | ||
| 113 | } | ||
| 114 | return false; break; | ||
| 115 | case DBL_PAR: | ||
| 116 | // Double paranthesis | ||
| 117 | if (record->event.pressed) { | ||
| 118 | SEND_STRING("()"SS_TAP(X_LEFT)); | ||
| 119 | } | ||
| 120 | return false; break; | ||
| 121 | case DBL_BRC: | ||
| 122 | // Double square brackets | ||
| 123 | if (record->event.pressed) { | ||
| 124 | SEND_STRING("[]"SS_TAP(X_LEFT)); | ||
| 125 | } | ||
| 126 | return false; break; | ||
| 127 | case DBL_CBR: | ||
| 128 | // Double curly brackets | ||
| 129 | if (record->event.pressed) { | ||
| 130 | SEND_STRING("{}"SS_TAP(X_LEFT)); | ||
| 131 | } | ||
| 132 | return false; break; | ||
| 133 | // Unicode macros | ||
| 134 | # ifdef UNICODEMAP_ENABLE | ||
| 135 | case TR_FLAG: | ||
| 136 | // Turkish flag | ||
| 137 | if (record->event.pressed) { | ||
| 138 | send_unicode_string("🇹🇷"); | ||
| 139 | } | ||
| 140 | return false; break; | ||
| 141 | case BB_LENY: | ||
| 142 | // Lenny face: ( ͡° ͜ʖ ͡°) | ||
| 143 | if (record->event.pressed) { | ||
| 144 | send_unicode_string("( ͡° ͜ʖ ͡°)"); | ||
| 145 | } | ||
| 146 | return false; break; | ||
| 147 | case BB_TABL: | ||
| 148 | // Table flip: ┻━┻︵ \(°□°)/ ︵ ┻━┻ | ||
| 149 | if (record->event.pressed) { | ||
| 150 | send_unicode_string("┻━┻︵ \\(°□°)/ ︵ ┻━┻"); | ||
| 151 | } | ||
| 152 | return false; break; | ||
| 153 | # endif // UNICODEMAP_ENABLE | ||
| 154 | } | ||
| 155 | return true; | ||
| 156 | } | ||
diff --git a/users/bbaserdem/bb-macro.h b/users/bbaserdem/bb-macro.h deleted file mode 100644 index 3dc14e7a8a..0000000000 --- a/users/bbaserdem/bb-macro.h +++ /dev/null | |||
| @@ -1,113 +0,0 @@ | |||
| 1 | /* Copyright 2021 Batuhan Başerdem | ||
| 2 | * <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #pragma once | ||
| 18 | #include "bbaserdem.h" | ||
| 19 | |||
| 20 | /* This header file contains definitons regarding custom keycodes. | ||
| 21 | * - Both regular and unicode macros are dealt with in this file | ||
| 22 | */ | ||
| 23 | |||
| 24 | // These will be delegated to keymap specific stuff (weak definition) | ||
| 25 | bool process_record_macro(uint16_t keycode, keyrecord_t *record); | ||
| 26 | |||
| 27 | // Unicodemap implementation | ||
| 28 | #ifdef UNICODEMAP_ENABLE | ||
| 29 | enum userspace_unicodemap { | ||
| 30 | UPC_A_CIRC, | ||
| 31 | UPC_C_CEDI, | ||
| 32 | UPC_G_BREV, | ||
| 33 | UPC_I_CIRC, | ||
| 34 | UPC_I_DOTL, | ||
| 35 | UPC_I_DOTT, | ||
| 36 | UPC_O_DIAE, | ||
| 37 | UPC_S_CEDI, | ||
| 38 | UPC_U_CIRC, | ||
| 39 | UPC_U_DIAE, | ||
| 40 | LOW_A_CIRC, | ||
| 41 | LOW_C_CEDI, | ||
| 42 | LOW_G_BREV, | ||
| 43 | LOW_I_CIRC, | ||
| 44 | LOW_I_DOTL, | ||
| 45 | LOW_I_DOTT, | ||
| 46 | LOW_O_DIAE, | ||
| 47 | LOW_S_CEDI, | ||
| 48 | LOW_U_CIRC, | ||
| 49 | LOW_U_DIAE, | ||
| 50 | ELLIPSIS, | ||
| 51 | PLANCK_CON, | ||
| 52 | ANGSTROM, | ||
| 53 | MATHPI, | ||
| 54 | BITCOIN, | ||
| 55 | UPC_ALPHA, | ||
| 56 | UPC_BETA, | ||
| 57 | UPC_GAMMA, | ||
| 58 | UPC_DELTA, | ||
| 59 | UPC_EPSILON, | ||
| 60 | UPC_ZETA, | ||
| 61 | UPC_ETA, | ||
| 62 | UPC_THETA, | ||
| 63 | UPC_IOTA, | ||
| 64 | UPC_KAPPA, | ||
| 65 | UPC_LAMBDA, | ||
| 66 | UPC_MU, | ||
| 67 | UPC_NU, | ||
| 68 | UPC_XI, | ||
| 69 | UPC_OMICRON, | ||
| 70 | UPC_PI, | ||
| 71 | UPC_RHO, | ||
| 72 | UPC_SIGMA, | ||
| 73 | UPC_TAU, | ||
| 74 | UPC_UPSILON, | ||
| 75 | UPC_PHI, | ||
| 76 | UPC_CHI, | ||
| 77 | UPC_PSI, | ||
| 78 | UPC_OMEGA, | ||
| 79 | LOW_ALPHA, | ||
| 80 | LOW_BETA, | ||
| 81 | LOW_GAMMA, | ||
| 82 | LOW_DELTA, | ||
| 83 | LOW_EPSILON, | ||
| 84 | LOW_ZETA, | ||
| 85 | LOW_ETA, | ||
| 86 | LOW_THETA, | ||
| 87 | LOW_IOTA, | ||
| 88 | LOW_KAPPA, | ||
| 89 | LOW_LAMBDA, | ||
| 90 | LOW_MU, | ||
| 91 | LOW_NU, | ||
| 92 | LOW_XI, | ||
| 93 | LOW_OMICRON, | ||
| 94 | LOW_PI, | ||
| 95 | LOW_RHO, | ||
| 96 | LOW_SIGMA, | ||
| 97 | LOW_TAU, | ||
| 98 | LOW_UPSILON, | ||
| 99 | LOW_PHI, | ||
| 100 | LOW_CHI, | ||
| 101 | LOW_PSI, | ||
| 102 | LOW_OMEGA, | ||
| 103 | }; | ||
| 104 | #endif // UNICODEMAP_ENABLE | ||
| 105 | |||
| 106 | // Tap dance stuff | ||
| 107 | #ifdef AUDIO_ENABLE | ||
| 108 | #ifdef TAP_DANCE_ENABLE | ||
| 109 | enum { | ||
| 110 | TD_AUDIO_TEMPO, | ||
| 111 | }; | ||
| 112 | #endif // AUDIO_ENABLE | ||
| 113 | #endif // TAP_DANCE_ENABLE | ||
diff --git a/users/bbaserdem/bb-oled-extra.c b/users/bbaserdem/bb-oled-extra.c deleted file mode 100644 index b52c4b335a..0000000000 --- a/users/bbaserdem/bb-oled-extra.c +++ /dev/null | |||
| @@ -1,796 +0,0 @@ | |||
| 1 | /* Copyright 2021 Batuhan Başerdem | ||
| 2 | * <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #include "bb-oled.h" | ||
| 18 | #include "bb-oled-extra.h" | ||
| 19 | |||
| 20 | // Helper function that draws images | ||
| 21 | void draw_image(uint8_t row, uint8_t col, const char image[4][42]) { | ||
| 22 | // Draw this image iteratively | ||
| 23 | for (int i = 0; i < 4; i++) { | ||
| 24 | oled_set_cursor(col, row + i); | ||
| 25 | oled_write_raw_P(image[i], 42); | ||
| 26 | } | ||
| 27 | } | ||
| 28 | |||
| 29 | // Write modifiers to the screen | ||
| 30 | void render_modifiers(uint8_t row, uint8_t col, uint8_t mods) { | ||
| 31 | static const char PROGMEM mod_meta[12] = {0x00,0x01,0x01,0x01,0x01,0x06,0x18,0x60,0x81,0x81,0x81,0x81}; | ||
| 32 | static const char PROGMEM mod_altL[12] = {0x00,0x80,0x80,0x80,0x40,0x20,0x10,0x08,0x84,0x95,0x8e,0x84}; | ||
| 33 | static const char PROGMEM mod_altR[12] = {0x00,0x86,0x8f,0x8f,0x46,0x20,0x10,0x08,0x84,0x95,0x8e,0x84}; | ||
| 34 | static const char PROGMEM mod_ctrl[12] = {0x00,0x00,0xbd,0x42,0xa5,0x99,0x99,0xa5,0x42,0xbd,0x00,0x00}; | ||
| 35 | static const char PROGMEM mod_shft[12] = {0x00,0x20,0x30,0x28,0xe4,0x02,0x01,0x02,0xe4,0x28,0x30,0x20}; | ||
| 36 | // Looks like Mods: <OS> <Alt/Gr> <Ctrl> <Shift> | ||
| 37 | oled_set_cursor(col, row); | ||
| 38 | oled_write("Mods: ", false); | ||
| 39 | // Meta | ||
| 40 | if (mods & MOD_MASK_GUI) { | ||
| 41 | oled_write_raw_P(mod_meta, 12); | ||
| 42 | oled_set_cursor(col + 8, row); | ||
| 43 | } else { | ||
| 44 | oled_write(" ", false); | ||
| 45 | } | ||
| 46 | // Alt(Gr) | ||
| 47 | if (mods & MOD_BIT(KC_RALT)) { | ||
| 48 | oled_write_raw_P(mod_altR, 12); | ||
| 49 | oled_set_cursor(col + 10, row); | ||
| 50 | } else if (mods & MOD_MASK_ALT) { | ||
| 51 | oled_write_raw_P(mod_altL, 12); | ||
| 52 | oled_set_cursor(col + 10, row); | ||
| 53 | } else { | ||
| 54 | oled_write(" ", false); | ||
| 55 | } | ||
| 56 | // Ctrl | ||
| 57 | if (mods & MOD_MASK_CTRL) { | ||
| 58 | oled_write_raw_P(mod_ctrl, 12); | ||
| 59 | oled_set_cursor(col + 12, row); | ||
| 60 | } else { | ||
| 61 | oled_write(" ", false); | ||
| 62 | } | ||
| 63 | // Shift | ||
| 64 | if (mods & MOD_MASK_SHIFT) { | ||
| 65 | oled_write_raw_P(mod_shft, 12); | ||
| 66 | oled_set_cursor(col + 14, row); | ||
| 67 | } else { | ||
| 68 | oled_write(" ", false); | ||
| 69 | } | ||
| 70 | } | ||
| 71 | |||
| 72 | // Draws the image of the currently used layout | ||
| 73 | void render_layout(uint8_t row, uint8_t col, uint8_t mods, bool isLeft) { | ||
| 74 | // DVORAK | ||
| 75 | static const char PROGMEM base0_L_dvor_nomod[4][42] = { | ||
| 76 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0x00,0x00,0x04,0x08,0x10,0x00,0x00,0x00, | ||
| 77 | 0x00,0x0e,0x00,0x00,0x00,0x00,0x60,0xe0,0x00,0x00,0x00,0x00,0xc0,0xc0, | ||
| 78 | 0x00,0x00,0x00,0xf8,0x90,0x88,0x88,0x70,0x00,0x78,0x80,0x80,0x40,0xf8 | ||
| 79 | },{ 0x00,0x00,0xce,0x9c,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x18,0x00,0x00, | ||
| 80 | 0x40,0x40,0x40,0x80,0x00,0x80,0x41,0x40,0x40,0x80,0x00,0x80,0x40,0x40, | ||
| 81 | 0x40,0x80,0x00,0xc3,0x00,0x00,0x00,0xc0,0x00,0x00,0x42,0xd2,0x02,0x01 | ||
| 82 | },{ 0x00,0x00,0x39,0x73,0x00,0x00,0x00,0xd8,0x06,0x01,0x00,0x00,0x00,0x02, | ||
| 83 | 0x05,0x05,0x05,0x07,0x00,0x03,0x04,0x04,0x04,0x03,0x00,0x03,0x05,0x05, | ||
| 84 | 0x85,0x05,0x00,0xc3,0x04,0x04,0x02,0x07,0x00,0x00,0x00,0x07,0x04,0x00 | ||
| 85 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x00,0x00,0x03,0x0c,0x30,0xc0,0x00,0x00, | ||
| 86 | 0xb6,0x76,0x00,0x00,0x00,0x1c,0x22,0x22,0x12,0xfe,0x00,0x00,0x80,0x82, | ||
| 87 | 0x7e,0x00,0x00,0x3f,0x08,0x0c,0x12,0x20,0x00,0x22,0x14,0x08,0x14,0x22}}; | ||
| 88 | static const char PROGMEM base0_L_dvor_shift[4][42] = { | ||
| 89 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0x00,0x20,0x10,0x20,0x40,0x20,0x00,0x00, | ||
| 90 | 0x07,0x00,0x07,0x00,0x00,0x10,0x28,0x44,0x82,0x00,0x00,0x82,0x44,0x28, | ||
| 91 | 0x10,0x00,0x00,0xfe,0x12,0x12,0x12,0x0c,0x00,0x06,0x08,0xf0,0x08,0x06 | ||
| 92 | },{ 0x00,0x00,0xce,0x9c,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xe0, | ||
| 93 | 0x90,0x90,0x90,0xe0,0x00,0xe0,0x10,0x10,0x10,0xe0,0x00,0xf0,0x90,0x90, | ||
| 94 | 0x90,0x10,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x10,0xf0,0x10,0x00 | ||
| 95 | },{ 0x00,0x00,0x39,0x73,0x00,0x00,0x00,0x00,0x80,0x87,0x80,0x00,0x00,0x07, | ||
| 96 | 0x00,0x00,0x00,0x07,0x00,0x03,0x84,0x84,0x84,0x03,0x00,0x07,0x04,0x04, | ||
| 97 | 0x04,0x84,0x00,0x83,0x04,0x04,0x04,0x83,0x00,0x80,0x04,0x07,0x04,0x80 | ||
| 98 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x00,0x01,0x00,0x28,0x04,0x03,0x00,0x00, | ||
| 99 | 0x36,0x36,0x00,0x00,0x00,0x1f,0x20,0x28,0x10,0x6f,0x00,0x18,0x20,0x20, | ||
| 100 | 0x20,0x1f,0x00,0x3f,0x04,0x0a,0x11,0x20,0x00,0x31,0x0a,0x04,0x0a,0x31}}; | ||
| 101 | static const char PROGMEM base0_R_dvor_nomod[4][42] = { | ||
| 102 | { 0x00,0xfc,0x12,0x12,0x00,0x00,0x70,0x88,0x88,0x48,0xf8,0x00,0x70,0x88, | ||
| 103 | 0x88,0x88,0x88,0x00,0xf8,0x10,0x08,0x08,0x10,0x00,0x00,0x02,0x7e,0x80, | ||
| 104 | 0x80,0x00,0x10,0x28,0x44,0x82,0x00,0x00,0x00,0x00,0xe7,0x73,0x00,0x00 | ||
| 105 | },{ 0x00,0x80,0x80,0x80,0xf0,0x00,0xf0,0x02,0x82,0x82,0x01,0x00,0x00,0x80, | ||
| 106 | 0xf0,0x80,0x80,0x00,0xc0,0x40,0x40,0x40,0x80,0x00,0x80,0x40,0x40,0x40, | ||
| 107 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0xce,0x00,0x00 | ||
| 108 | },{ 0x83,0x04,0x04,0x02,0x07,0x00,0x07,0x01,0x00,0x00,0x07,0x00,0x00,0x00, | ||
| 109 | 0x03,0x04,0x04,0x00,0x07,0x00,0x00,0x00,0x07,0x00,0x04,0x05,0x05,0x05, | ||
| 110 | 0x02,0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x73,0x39,0x00,0x00 | ||
| 111 | },{ 0x3f,0x24,0x22,0x22,0x1c,0x00,0x3e,0x02,0x3e,0x02,0x3c,0x00,0x1e,0x20, | ||
| 112 | 0x1c,0x20,0x1e,0x00,0x06,0x18,0x20,0x18,0x06,0x00,0x22,0x32,0x2a,0x26, | ||
| 113 | 0x22,0x00,0x14,0x14,0x14,0x14,0x14,0x00,0x00,0x00,0xce,0xe7,0x00,0x00}}; | ||
| 114 | static const char PROGMEM base0_R_dvor_shift[4][42] = { | ||
| 115 | { 0xfe,0x12,0x12,0x12,0x02,0x00,0xfc,0x02,0x12,0x12,0xf4,0x00,0xfc,0x02, | ||
| 116 | 0x02,0x02,0x84,0x00,0xfe,0x12,0x12,0x32,0xcc,0x00,0xfe,0x00,0x00,0x00, | ||
| 117 | 0x00,0x00,0x04,0x88,0x50,0x20,0x00,0x00,0x00,0x00,0xe7,0x73,0x00,0x00 | ||
| 118 | },{ 0xf1,0x10,0x10,0x10,0xe0,0x00,0xf0,0x81,0x81,0x81,0xf0,0x00,0x10,0x11, | ||
| 119 | 0xf1,0x11,0x10,0x00,0xf1,0x60,0x80,0x00,0xf1,0x00,0x61,0x91,0x91,0x91, | ||
| 120 | 0x21,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0xce,0x00,0x00 | ||
| 121 | },{ 0x8f,0x88,0x88,0x88,0x07,0x00,0x8f,0x00,0x00,0x00,0x8f,0x00,0x80,0x00, | ||
| 122 | 0x0f,0x00,0x80,0x00,0x8f,0x00,0x01,0x06,0x8f,0x00,0x84,0x88,0x88,0x88, | ||
| 123 | 0x87,0x00,0x08,0x08,0x08,0x08,0x08,0x00,0x00,0x00,0x73,0x39,0x00,0x00 | ||
| 124 | },{ 0x7f,0x44,0x44,0x44,0x3b,0x00,0x7f,0x01,0x06,0x01,0x7f,0x00,0x1f,0x60, | ||
| 125 | 0x1c,0x60,0x1f,0x00,0x07,0x18,0x60,0x18,0x07,0x00,0x70,0x48,0x44,0x42, | ||
| 126 | 0x41,0x00,0x08,0x08,0x3e,0x08,0x08,0x00,0x00,0x00,0xce,0xe7,0x00,0x00}}; | ||
| 127 | static const char PROGMEM symb5_R_dvor[4][42] = { | ||
| 128 | { 0x00,0x02,0x04,0x08,0x00,0x00,0x20,0x20,0xdc,0x02,0x02,0x00,0x02,0x02, | ||
| 129 | 0xdc,0x20,0x20,0x00,0x00,0xc0,0x30,0x0c,0x03,0x00,0x50,0x50,0x50,0x50, | ||
| 130 | 0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe7,0x73,0x00,0x00 | ||
| 131 | },{ 0x00,0x80,0x00,0x00,0x00,0x00,0x00,0xf0,0x11,0x12,0x02,0x00,0x02,0x12, | ||
| 132 | 0x11,0xf0,0x00,0x00,0x43,0x20,0x20,0x20,0xc0,0x00,0x00,0x00,0xc0,0x00, | ||
| 133 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0xce,0x00,0x00 | ||
| 134 | },{ 0x01,0x80,0x41,0x82,0x01,0x00,0x00,0x1f,0x10,0x90,0x00,0x00,0x00,0x90, | ||
| 135 | 0x10,0x1f,0x00,0x00,0xc0,0x00,0x14,0x03,0x00,0x00,0x01,0x01,0x87,0x01, | ||
| 136 | 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x39,0x00,0x00 | ||
| 137 | },{ 0x22,0xf3,0x0a,0xf3,0x22,0x00,0x00,0x1c,0x63,0x80,0x00,0x00,0x00,0x80, | ||
| 138 | 0x63,0x1c,0x00,0x00,0x00,0x03,0x0c,0x30,0xc0,0x00,0x00,0x00,0x7f,0x00, | ||
| 139 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xce,0xe7,0x00,0x00}}; | ||
| 140 | static const char PROGMEM numb6_L_dvor_nomod[4][42] = { | ||
| 141 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20, | ||
| 142 | 0x50,0x88,0x04,0x00,0x00,0x04,0x04,0xc4,0x34,0x0c,0x00,0xd8,0x24,0x24, | ||
| 143 | 0x24,0xd8,0x00,0x18,0x24,0x24,0x24,0xf8,0x00,0xf8,0x44,0x24,0x14,0xf8 | ||
| 144 | },{ 0x00,0x00,0xce,0x9c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 145 | 0x00,0x00,0x01,0x00,0x00,0x00,0x80,0x41,0xe0,0x00,0x00,0xe0,0xa1,0xa1, | ||
| 146 | 0xa1,0x20,0x00,0xc0,0xa1,0xa1,0xa1,0x00,0x00,0x00,0x01,0x01,0x01,0x00 | ||
| 147 | },{ 0x00,0x00,0x39,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08, | ||
| 148 | 0x08,0x08,0x08,0x08,0x00,0x03,0x02,0x02,0x0f,0x02,0x00,0x04,0x08,0x08, | ||
| 149 | 0x08,0x07,0x00,0x07,0x08,0x08,0x08,0x07,0x00,0x01,0x01,0x01,0x01,0x00 | ||
| 150 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41, | ||
| 151 | 0x22,0x14,0x08,0x00,0x00,0x00,0x04,0x02,0x7f,0x00,0x00,0x42,0x61,0x51, | ||
| 152 | 0x49,0x46,0x00,0x22,0x41,0x49,0x49,0x36,0x00,0x5e,0x61,0x01,0x61,0x5e}}; | ||
| 153 | static const char PROGMEM numb6_L_dvor_shift[4][42] = { | ||
| 154 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 155 | 0x00,0x00,0x00,0x00,0x00,0xd8,0x24,0x54,0x88,0x40,0x00,0x50,0x20,0xf8, | ||
| 156 | 0x20,0x50,0x00,0x00,0x38,0xc6,0x01,0x00,0x00,0x00,0x01,0xc6,0x38,0x00 | ||
| 157 | },{ 0x00,0x00,0xce,0x9c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 158 | 0x00,0x00,0x00,0x00,0x00,0x60,0x91,0xf9,0x90,0x21,0x00,0x20,0x50,0x20, | ||
| 159 | 0x80,0x60,0x00,0x40,0x20,0x10,0x21,0x40,0x00,0x00,0x01,0x00,0x00,0x00 | ||
| 160 | },{ 0x00,0x00,0x39,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 161 | 0x00,0x00,0x00,0x00,0x00,0x02,0x04,0x8f,0x04,0x03,0x00,0x0c,0x02,0x09, | ||
| 162 | 0x14,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 | ||
| 163 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 164 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5f,0x00,0x00,0x00,0x3e,0x41,0x5d, | ||
| 165 | 0x55,0x5e,0x00,0x14,0x7f,0x14,0x7f,0x14,0x00,0x00,0x00,0x00,0x00,0x00}}; | ||
| 166 | // Turkish F | ||
| 167 | static const char PROGMEM base0_L_turf_nomod[4][42] = { | ||
| 168 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0x00,0x10,0x10,0x7c,0x10,0x10,0x00,0x00, | ||
| 169 | 0xfe,0x09,0x09,0x00,0x00,0x70,0x88,0x88,0x48,0xf8,0x00,0x51,0xaa,0xaa, | ||
| 170 | 0x92,0x09,0x00,0x00,0x88,0xf8,0x80,0x00,0x00,0x70,0x88,0x88,0x88,0x70 | ||
| 171 | },{ 0x00,0x00,0xce,0x9c,0x00,0x00,0x00,0x40,0x80,0x00,0x80,0x40,0x00,0xc0, | ||
| 172 | 0x00,0x00,0x00,0xc0,0x00,0x00,0x42,0xd2,0x02,0x01,0x00,0x81,0x42,0x42, | ||
| 173 | 0x42,0x81,0x00,0x00,0x40,0x40,0x40,0x80,0x00,0xc0,0x10,0x00,0x10,0xc0 | ||
| 174 | },{ 0x00,0x00,0x39,0x73,0x00,0x00,0x00,0x04,0x02,0x01,0x02,0x04,0x00,0x03, | ||
| 175 | 0x04,0x04,0x82,0x07,0x00,0x00,0x80,0x07,0x84,0x00,0x00,0x03,0x05,0x05, | ||
| 176 | 0x05,0x05,0x00,0x02,0x05,0x05,0x05,0x07,0x00,0x03,0x04,0x04,0x02,0x07 | ||
| 177 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x00,0x1c,0x22,0x22,0x12,0xfe,0x00,0x00, | ||
| 178 | 0x80,0x82,0x7e,0x00,0x00,0x1c,0x22,0x22,0x22,0x1c,0x00,0x06,0x18,0x20, | ||
| 179 | 0x18,0x06,0x00,0x1c,0x22,0x22,0x22,0x22,0x00,0x1c,0xa2,0x62,0x22,0x22}}; | ||
| 180 | static const char PROGMEM base0_L_turf_shift[4][42] = { | ||
| 181 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0x00,0x28,0x10,0x7c,0x10,0x28,0x00,0xfe, | ||
| 182 | 0x12,0x12,0x12,0x02,0x00,0xfc,0x02,0x12,0x12,0xf4,0x00,0xf1,0x0a,0x4a, | ||
| 183 | 0x4a,0xd1,0x00,0x00,0x02,0xfe,0x02,0x00,0x00,0xfc,0x02,0x02,0x02,0xfc | ||
| 184 | },{ 0x00,0x00,0xce,0x9c,0x00,0x00,0x00,0x30,0x40,0x80,0x40,0x30,0x00,0xf1, | ||
| 185 | 0x00,0x00,0x00,0xf0,0x00,0x00,0x21,0xe9,0x21,0x00,0x00,0xf1,0x92,0x92, | ||
| 186 | 0x92,0x11,0x00,0xe0,0x91,0x91,0x91,0xe0,0x00,0xe0,0x09,0x01,0x09,0xe0 | ||
| 187 | },{ 0x00,0x00,0x39,0x73,0x00,0x00,0x00,0x0e,0x81,0x80,0x81,0x0e,0x00,0x07, | ||
| 188 | 0x08,0x08,0x08,0x87,0x00,0x00,0x50,0x1f,0x50,0x00,0x00,0x8f,0x08,0x08, | ||
| 189 | 0x08,0x88,0x00,0x0f,0x80,0x80,0x80,0x0f,0x00,0x8f,0x50,0x50,0x50,0x8f | ||
| 190 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x00,0x3f,0x40,0x50,0x20,0xdf,0x00,0x30, | ||
| 191 | 0x40,0x40,0x40,0x3f,0x00,0x7e,0x81,0x81,0x81,0x7e,0x00,0x07,0x18,0x60, | ||
| 192 | 0x18,0x07,0x00,0x3f,0x40,0x40,0x40,0x21,0x00,0x1f,0xa0,0x60,0x20,0x10}}; | ||
| 193 | static const char PROGMEM base0_L_turf_altgr[4][42] = { | ||
| 194 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0x00,0x10,0x10,0x10,0x30,0x00,0x00,0xf0, | ||
| 195 | 0x08,0xe8,0xa8,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 196 | 0x00,0x00,0x00,0x0c,0x1e,0xfe,0x02,0xfe,0x00,0x70,0x8a,0x89,0x8a,0x70 | ||
| 197 | },{ 0x00,0x00,0xce,0x9c,0x00,0x00,0x00,0x00,0x10,0x20,0x40,0x00,0x00,0xc1, | ||
| 198 | 0x12,0x0a,0x12,0xc2,0x00,0x00,0x10,0xc8,0x10,0x00,0x00,0x40,0xe0,0x50, | ||
| 199 | 0x10,0x20,0x00,0x00,0x50,0x48,0x50,0x80,0x00,0xc0,0x10,0x08,0x10,0xc0 | ||
| 200 | },{ 0x00,0x00,0x39,0x73,0x00,0x00,0x00,0x00,0x80,0x00,0x80,0x00,0x00,0x03, | ||
| 201 | 0x04,0x04,0x02,0x07,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x01,0x83,0x05, | ||
| 202 | 0x04,0x82,0x00,0x02,0x05,0x05,0x05,0x07,0x00,0x83,0x84,0x04,0x82,0x87 | ||
| 203 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x00,0x00,0x3e,0x3e,0x3e,0x00,0x08,0x14, | ||
| 204 | 0x22,0x08,0x14,0x22,0x00,0x22,0x14,0x08,0x22,0x14,0x08,0x03,0x02,0x00, | ||
| 205 | 0x03,0x02,0x00,0x1c,0x22,0x7f,0x22,0x22,0x00,0x02,0x01,0x00,0x02,0x01}}; | ||
| 206 | static const char PROGMEM base0_L_turf_shfgr[4][42] = { | ||
| 207 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0x00,0x90,0x90,0xfc,0x90,0x90,0x00,0x00, | ||
| 208 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 209 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x0a,0x09,0x0a,0xf0 | ||
| 210 | },{ 0x00,0x00,0xce,0x9c,0x00,0x00,0x00,0x00,0x88,0x90,0xa0,0x00,0x00,0xc0, | ||
| 211 | 0x10,0x08,0x10,0xc0,0x00,0x00,0x50,0xc8,0x50,0x00,0x00,0x00,0x00,0x00, | ||
| 212 | 0x00,0x00,0x00,0x80,0x50,0x48,0x50,0x80,0x00,0xc1,0x12,0x0a,0x12,0xc1 | ||
| 213 | },{ 0x00,0x00,0x39,0x73,0x00,0x00,0x00,0x00,0x8f,0x4f,0x8f,0x00,0x00,0x0f, | ||
| 214 | 0x10,0x10,0x90,0x0f,0x00,0x80,0x10,0x1f,0x10,0x00,0x00,0x00,0x00,0x00, | ||
| 215 | 0x00,0x00,0x00,0x1f,0x82,0x82,0x82,0x1f,0x00,0x0f,0x10,0x10,0x10,0x0f | ||
| 216 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x00,0x00,0x7c,0x7d,0x7c,0x00,0x00,0x04, | ||
| 217 | 0x0a,0x11,0x20,0x00,0x00,0x20,0x11,0x0a,0x04,0x00,0x00,0x00,0x00,0x00, | ||
| 218 | 0x00,0x00,0x00,0x1f,0x24,0x2a,0x20,0x1f,0x00,0x00,0x00,0x00,0x00,0x00}}; | ||
| 219 | static const char PROGMEM base0_R_turf_nomod[4][42] = { | ||
| 220 | { 0x70,0x88,0x88,0x48,0xff,0x00,0xf8,0x10,0x08,0x08,0x10,0x00,0xf8,0x08, | ||
| 221 | 0x08,0x08,0xf0,0x00,0xff,0x10,0x08,0x08,0xf0,0x00,0xf8,0x90,0x88,0x88, | ||
| 222 | 0x70,0x00,0x10,0x28,0x44,0x82,0x00,0x00,0x00,0x00,0xe7,0x73,0x00,0x00 | ||
| 223 | },{ 0x40,0xf8,0x40,0x40,0x00,0x00,0xf8,0x00,0x80,0x40,0x00,0x00,0xc0,0x40, | ||
| 224 | 0xc0,0x40,0x80,0x00,0x08,0xf8,0x00,0x00,0x00,0x00,0xc3,0x00,0x00,0x00, | ||
| 225 | 0xc0,0x00,0x80,0x40,0x40,0x40,0x00,0x00,0x00,0x00,0x9c,0xce,0x00,0x00 | ||
| 226 | },{ 0x00,0x03,0x04,0x04,0x00,0x00,0x07,0x01,0x01,0x02,0x04,0x00,0xc7,0x00, | ||
| 227 | 0x07,0x00,0x07,0x00,0x00,0x03,0x04,0x04,0x00,0x00,0x03,0x14,0x14,0x12, | ||
| 228 | 0x0f,0x00,0x04,0x15,0x0d,0x05,0x02,0x00,0x00,0x00,0x73,0x39,0x00,0x00 | ||
| 229 | },{ 0x22,0x32,0x2a,0x26,0x22,0x00,0x24,0x2a,0x2a,0x2a,0x10,0x00,0x3f,0x24, | ||
| 230 | 0x22,0x22,0x1c,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0xb0,0x70,0x00, | ||
| 231 | 0x00,0x00,0x1e,0x20,0x1c,0x20,0x1e,0x00,0x00,0x00,0xce,0xe7,0x00,0x00}}; | ||
| 232 | static const char PROGMEM base0_R_turf_shift[4][42] = { | ||
| 233 | { 0xfe,0x02,0x02,0x02,0xfc,0x00,0xfe,0x12,0x12,0x32,0xcc,0x00,0xfe,0x0c, | ||
| 234 | 0x30,0xc0,0xfe,0x00,0xfe,0x10,0x10,0x10,0xfe,0x00,0xfe,0x12,0x12,0x12, | ||
| 235 | 0x0c,0x00,0x82,0x44,0x28,0x10,0x00,0x00,0x00,0x00,0xe7,0x73,0x00,0x00 | ||
| 236 | },{ 0x11,0x11,0xf1,0x11,0x10,0x00,0xf1,0x80,0x40,0x20,0x11,0x00,0xf1,0x20, | ||
| 237 | 0xc0,0x20,0xf1,0x00,0xf1,0x00,0x00,0x00,0x01,0x00,0x31,0x40,0x80,0x40, | ||
| 238 | 0x30,0x00,0x30,0x48,0x48,0x48,0x90,0x00,0x00,0x00,0x9c,0xce,0x00,0x00 | ||
| 239 | },{ 0x80,0x80,0x8f,0x80,0x80,0x00,0x0f,0x80,0x81,0x82,0x0c,0x00,0x8f,0x80, | ||
| 240 | 0x80,0x80,0x0f,0x00,0x0f,0x08,0x08,0x08,0x08,0x00,0x00,0x00,0x0f,0x00, | ||
| 241 | 0x00,0x00,0x82,0x14,0x0c,0x04,0x83,0x00,0x00,0x00,0x73,0x39,0x00,0x00 | ||
| 242 | },{ 0x70,0x48,0x44,0x42,0x41,0x00,0x23,0x44,0x44,0x44,0x39,0x00,0x7f,0x44, | ||
| 243 | 0x44,0x44,0x3b,0x00,0x00,0x36,0x36,0x00,0x00,0x00,0x00,0xb6,0x76,0x00, | ||
| 244 | 0x00,0x00,0x1f,0x60,0x1c,0x60,0x1f,0x00,0x00,0x00,0xce,0xe7,0x00,0x00}}; | ||
| 245 | static const char PROGMEM base0_R_turf_altgr[4][42] = { | ||
| 246 | { 0x53,0x54,0xf8,0x54,0x53,0x00,0x7c,0xba,0x8a,0x8a,0x7c,0x00,0x00,0x00, | ||
| 247 | 0x00,0x00,0x00,0x00,0x0c,0x12,0x12,0x0c,0x00,0x00,0x20,0xfc,0x22,0x02, | ||
| 248 | 0x84,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0xe7,0x73,0x00,0x00 | ||
| 249 | },{ 0x80,0x80,0xf1,0xa0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, | ||
| 250 | 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x20,0x11,0x01, | ||
| 251 | 0x00,0x00,0x40,0xf0,0x41,0xf0,0x40,0x00,0x00,0x00,0x9c,0xce,0x00,0x00 | ||
| 252 | },{ 0x02,0x01,0x0f,0x08,0x08,0x06,0x83,0x40,0x40,0x40,0x00,0x00,0x0f,0x02, | ||
| 253 | 0x04,0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 254 | 0x00,0x00,0x01,0x07,0x01,0x07,0x01,0x00,0x00,0x00,0x73,0x39,0x00,0x00 | ||
| 255 | },{ 0x00,0x00,0x00,0x00,0x00,0x00,0x47,0x4a,0x4a,0x3c,0x00,0x00,0x11,0x0a, | ||
| 256 | 0x04,0x0a,0x11,0x00,0x04,0x04,0x15,0x04,0x04,0x00,0x00,0x00,0x04,0x00, | ||
| 257 | 0x00,0x00,0x04,0x02,0x04,0x08,0x04,0x00,0x00,0x00,0xce,0xe7,0x00,0x00}}; | ||
| 258 | static const char PROGMEM base0_R_turf_shfgr[4][42] = { | ||
| 259 | { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 260 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 261 | 0x00,0x00,0x00,0x00,0xef,0x00,0x00,0x00,0x00,0x00,0xe7,0x73,0x00,0x00 | ||
| 262 | },{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 263 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x90,0x88, | ||
| 264 | 0x00,0x00,0x00,0x90,0xa1,0x90,0x00,0x00,0x00,0x00,0x9c,0xce,0x00,0x00 | ||
| 265 | },{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 266 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0f, | ||
| 267 | 0x00,0x00,0x00,0x0f,0x0f,0x0f,0x00,0x00,0x00,0x00,0x73,0x39,0x00,0x00 | ||
| 268 | },{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 269 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x7d,0x7c, | ||
| 270 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xce,0xe7,0x00,0x00}}; | ||
| 271 | static const char PROGMEM symb5_R_turf_nomod[4][42] = { | ||
| 272 | { 0x20,0x20,0xf8,0x20,0x20,0x00,0x00,0xc0,0x30,0x0c,0x03,0x00,0x20,0x20, | ||
| 273 | 0x20,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 274 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe7,0x73,0x00,0x00 | ||
| 275 | },{ 0x80,0x00,0xc0,0x00,0x80,0x00,0x43,0x20,0x20,0x20,0xc0,0x00,0x00,0x00, | ||
| 276 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 277 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0xce,0x00,0x00 | ||
| 278 | },{ 0x02,0x81,0x47,0x81,0x02,0x00,0x00,0x00,0x0a,0x01,0x00,0x00,0x04,0x04, | ||
| 279 | 0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 280 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x39,0x00,0x00 | ||
| 281 | },{ 0x22,0xf3,0x0a,0xf3,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 282 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 283 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xce,0xe7,0x00,0x00}}; | ||
| 284 | static const char PROGMEM symb5_R_turf_altgr[4][42] = { | ||
| 285 | { 0x10,0x10,0x10,0x30,0x00,0x00,0x03,0x0c,0x30,0xc0,0x00,0x00,0x00,0x00, | ||
| 286 | 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 287 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe7,0x73,0x00,0x00 | ||
| 288 | },{ 0x80,0x80,0xe0,0x80,0x80,0x00,0x00,0x00,0xa0,0x00,0x03,0x00,0x00,0x00, | ||
| 289 | 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 290 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0xce,0x00,0x00 | ||
| 291 | },{ 0x04,0x84,0x47,0x84,0x04,0x00,0x06,0x09,0x08,0x08,0x04,0x00,0x00,0x00, | ||
| 292 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 293 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x39,0x00,0x00 | ||
| 294 | },{ 0x22,0xf3,0x0a,0xf3,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 295 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 296 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xce,0xe7,0x00,0x00}}; | ||
| 297 | static const char PROGMEM numb6_L_turf_nomod[4][42] = { | ||
| 298 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20, | ||
| 299 | 0x50,0x88,0x04,0x00,0x00,0x04,0x04,0xc4,0x34,0x0c,0x00,0xd8,0x24,0x24, | ||
| 300 | 0x24,0xd8,0x00,0x18,0x24,0x24,0x24,0xf8,0x00,0xf8,0x44,0x24,0x14,0xf8 | ||
| 301 | },{ 0x00,0x00,0xce,0x9c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 302 | 0x00,0x00,0x01,0x00,0x00,0x00,0x80,0x41,0xe0,0x00,0x00,0xe0,0xa1,0xa1, | ||
| 303 | 0xa1,0x20,0x00,0xc0,0xa1,0xa1,0xa1,0x00,0x00,0x00,0x01,0x01,0x01,0x00 | ||
| 304 | },{ 0x00,0x00,0x39,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 305 | 0x00,0x00,0x00,0x00,0x00,0x03,0x02,0x02,0x0f,0x02,0x00,0x04,0x08,0x08, | ||
| 306 | 0x08,0x07,0x00,0x07,0x08,0x08,0x08,0x07,0x00,0x00,0x00,0x00,0x00,0x00 | ||
| 307 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41, | ||
| 308 | 0x22,0x14,0x08,0x00,0x00,0x00,0x04,0x02,0x7f,0x00,0x00,0x42,0x61,0x51, | ||
| 309 | 0x49,0x46,0x00,0x22,0x41,0x49,0x49,0x36,0x00,0x5e,0x61,0x01,0x61,0x5e}}; | ||
| 310 | static const char PROGMEM numb6_L_turf_shift[4][42] = { | ||
| 311 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04, | ||
| 312 | 0x88,0x50,0x20,0x00,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0x00,0x38,0xc6, | ||
| 313 | 0x01,0x00,0x00,0x00,0x01,0xc6,0x38,0x00,0x00,0x50,0x50,0x50,0x50,0x50 | ||
| 314 | },{ 0x00,0x00,0xce,0x9c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, | ||
| 315 | 0x00,0x00,0x00,0x00,0x00,0x60,0x90,0xf8,0x90,0x20,0x00,0x20,0x50,0x20, | ||
| 316 | 0x81,0x60,0x00,0x70,0x89,0x48,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00 | ||
| 317 | },{ 0x00,0x00,0x39,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 318 | 0x00,0x00,0x00,0x00,0x00,0x02,0x04,0x8f,0x04,0x03,0x00,0x0c,0x82,0x09, | ||
| 319 | 0x94,0x08,0x00,0x07,0x08,0x89,0x06,0x09,0x00,0x00,0x00,0x00,0x00,0x00 | ||
| 320 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41, | ||
| 321 | 0x22,0x14,0x08,0x00,0x00,0x00,0x00,0x5f,0x00,0x00,0x00,0x00,0x03,0x00, | ||
| 322 | 0x03,0x00,0x00,0x02,0x01,0x00,0x01,0x02,0x00,0x5e,0x61,0x01,0x61,0x5e}}; | ||
| 323 | static const char PROGMEM numb6_L_turf_altgr[4][42] = { | ||
| 324 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 325 | 0x00,0xff,0x00,0x00,0x00,0x10,0x10,0xee,0x01,0x01,0x00,0x00,0xff,0x01, | ||
| 326 | 0x01,0x00,0x00,0x00,0x01,0x01,0xff,0x00,0x00,0x01,0x01,0xee,0x10,0x10 | ||
| 327 | },{ 0x00,0x00,0xce,0x9c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 328 | 0x00,0x01,0x00,0x00,0x00,0x10,0xf8,0x00,0x01,0x01,0x00,0x10,0xf9,0x01, | ||
| 329 | 0x01,0x00,0x00,0x88,0xa9,0x51,0x01,0x00,0x00,0x01,0x01,0x00,0x00,0x00 | ||
| 330 | },{ 0x00,0x00,0x39,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 331 | 0x00,0xc0,0x00,0x00,0x00,0x00,0x08,0x8c,0x0a,0x1f,0x00,0x00,0x00,0x90, | ||
| 332 | 0x90,0x10,0x00,0x00,0x08,0x0c,0x0a,0x1f,0x00,0x00,0x00,0x00,0x00,0x00 | ||
| 333 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 334 | 0x00,0x7b,0x00,0x00,0x00,0x00,0x09,0x0f,0x08,0x00,0x00,0x00,0x09,0x0c, | ||
| 335 | 0x0a,0x09,0x00,0x14,0x7f,0x14,0x7f,0x14,0x00,0x5e,0x61,0x01,0x61,0x5e}}; | ||
| 336 | static const char PROGMEM numb6_L_turf_shfgr[4][42] = { | ||
| 337 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 338 | 0x00,0xef,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x90,0xfc, | ||
| 339 | 0x90,0x90,0x00,0x06,0x09,0x09,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00 | ||
| 340 | },{ 0x00,0x00,0xce,0x9c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 341 | 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0xa8,0x50, | ||
| 342 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 | ||
| 343 | },{ 0x00,0x00,0x39,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 344 | 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x0a, | ||
| 345 | 0x15,0x0a,0x00,0x40,0x40,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00 | ||
| 346 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 347 | 0x00,0x7b,0x00,0x00,0x00,0x00,0x00,0x3f,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 348 | 0x00,0x00,0x00,0x04,0x05,0x05,0x02,0x00,0x00,0x5e,0x61,0x01,0x61,0x5e}}; | ||
| 349 | // QWERTY | ||
| 350 | static const char PROGMEM base0_L_qwer_nomod[4][42] = { | ||
| 351 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0x00,0x00,0x04,0x08,0x10,0x00,0x00,0x70, | ||
| 352 | 0x88,0x88,0x48,0xf8,0x00,0x78,0x80,0x70,0x80,0x78,0x00,0x70,0xa8,0xa8, | ||
| 353 | 0xa8,0xb0,0x00,0xf8,0x10,0x08,0x08,0x10,0x00,0x08,0x7f,0x88,0x88,0x00 | ||
| 354 | },{ 0x00,0x00,0xce,0x9c,0x00,0x00,0x00,0x18,0x60,0x80,0x00,0x00,0x00,0x00, | ||
| 355 | 0x40,0x40,0x40,0x83,0x00,0x80,0x40,0x40,0x40,0x00,0x00,0x80,0x40,0x40, | ||
| 356 | 0x40,0xf8,0x00,0x00,0xf0,0x48,0x48,0x00,0x00,0x80,0x40,0x40,0x40,0xc0 | ||
| 357 | },{ 0x00,0x00,0x39,0x73,0x00,0x00,0x00,0x00,0xc0,0x41,0x46,0x18,0x00,0x02, | ||
| 358 | 0x05,0x05,0x05,0x07,0x00,0x04,0x05,0x05,0x05,0x02,0x00,0x03,0x04,0x04, | ||
| 359 | 0x02,0x07,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0xc3,0x14,0x14,0x12,0x0f | ||
| 360 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x00,0x00,0xff,0x80,0x80,0x00,0x00,0x22, | ||
| 361 | 0x32,0x2a,0x26,0x22,0x00,0x22,0x14,0x08,0x14,0x22,0x00,0x1c,0x22,0x22, | ||
| 362 | 0x22,0x22,0x00,0x06,0x18,0x20,0x18,0x06,0x00,0x3f,0x24,0x22,0x22,0x1c}}; | ||
| 363 | static const char PROGMEM base0_L_qwer_shift[4][42] = { | ||
| 364 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0x00,0x20,0x10,0x20,0x40,0x20,0x00,0xfc, | ||
| 365 | 0x02,0x42,0x82,0x7c,0x00,0x7e,0x80,0x70,0x80,0x7e,0x00,0xfe,0x12,0x12, | ||
| 366 | 0x12,0x02,0x00,0xfe,0x12,0x12,0x32,0xcc,0x00,0x02,0x02,0xfe,0x02,0x02 | ||
| 367 | },{ 0x00,0x00,0xce,0x9c,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0xe0, | ||
| 368 | 0x91,0x91,0x90,0xe3,0x00,0x60,0x91,0x90,0x91,0x20,0x00,0xf1,0x11,0x11, | ||
| 369 | 0x11,0xe1,0x00,0xf1,0x90,0x90,0x90,0x11,0x00,0xe0,0x10,0x91,0x90,0xa0 | ||
| 370 | },{ 0x00,0x00,0x39,0x73,0x00,0x00,0x00,0x00,0x00,0x9f,0x40,0x40,0x00,0x8f, | ||
| 371 | 0x80,0x80,0x80,0x8f,0x00,0x84,0x08,0x08,0x08,0x87,0x00,0x0f,0x88,0x88, | ||
| 372 | 0x88,0x07,0x00,0x8f,0x00,0x00,0x00,0x80,0x00,0x87,0x88,0x88,0x88,0x07 | ||
| 373 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x00,0x04,0x04,0x7b,0x80,0x80,0x00,0x70, | ||
| 374 | 0x48,0x44,0x42,0x41,0x00,0x71,0x0a,0x04,0x0a,0x71,0x00,0x3f,0x40,0x40, | ||
| 375 | 0x40,0x21,0x00,0x07,0x18,0x60,0x18,0x07,0x00,0x7f,0x44,0x44,0x44,0x3b}}; | ||
| 376 | static const char PROGMEM base0_R_qwer_nomod[4][42] = { | ||
| 377 | { 0x78,0x80,0x80,0x40,0xf8,0x00,0x78,0x80,0x80,0x40,0xf8,0x00,0x00,0x08, | ||
| 378 | 0xfa,0x80,0x00,0x00,0x70,0x88,0x88,0x88,0x70,0x00,0xf8,0x90,0x88,0x88, | ||
| 379 | 0x70,0x00,0x10,0x28,0x44,0x82,0x00,0x00,0x00,0x00,0xe7,0x73,0x00,0x00 | ||
| 380 | },{ 0xf8,0x82,0x42,0x42,0x81,0x00,0x00,0x00,0x40,0xd0,0x00,0x00,0xf8,0x00, | ||
| 381 | 0x80,0x40,0x00,0x00,0x08,0xf8,0x00,0x00,0x00,0x00,0x03,0xc0,0xc0,0x00, | ||
| 382 | 0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x9c,0xce,0x00,0x00 | ||
| 383 | },{ 0x07,0x00,0x00,0x00,0x07,0x00,0x00,0x10,0x10,0x0f,0x00,0x00,0x07,0x01, | ||
| 384 | 0x01,0x02,0x04,0x00,0x00,0x03,0x04,0x04,0x00,0x00,0x00,0x16,0x0e,0x00, | ||
| 385 | 0xc0,0x00,0x00,0x40,0x40,0xc0,0x00,0x00,0x00,0x00,0x73,0x39,0x00,0x00 | ||
| 386 | },{ 0x3e,0x02,0x02,0x02,0x3c,0x00,0x3e,0x02,0x3e,0x02,0x3c,0x00,0x00,0xb0, | ||
| 387 | 0x70,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0xc0,0x30,0x0c,0x03, | ||
| 388 | 0x00,0x00,0x00,0x80,0x80,0xff,0x00,0x00,0x00,0x00,0xce,0xe7,0x00,0x00}}; | ||
| 389 | static const char PROGMEM base0_R_qwer_shift[4][42] = { | ||
| 390 | { 0x06,0x08,0xf0,0x08,0x06,0x00,0xfe,0x00,0x00,0x00,0xfe,0x00,0x00,0x02, | ||
| 391 | 0xfe,0x02,0x00,0x00,0xfc,0x02,0x02,0x02,0xfc,0x00,0xfe,0x12,0x12,0x12, | ||
| 392 | 0x0c,0x00,0x82,0x44,0x28,0x10,0x00,0x00,0x00,0x00,0xe7,0x73,0x00,0x00 | ||
| 393 | },{ 0xf0,0x80,0x81,0x80,0xf0,0x00,0x00,0x01,0x01,0x01,0xf0,0x00,0xf0,0x81, | ||
| 394 | 0x41,0x21,0x10,0x00,0xf0,0x01,0x01,0x01,0x00,0x00,0x01,0xc0,0xc0,0x00, | ||
| 395 | 0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x9c,0xce,0x00,0x00 | ||
| 396 | },{ 0x8f,0x00,0x00,0x00,0x8f,0x00,0x86,0x08,0x08,0x08,0x87,0x00,0x0f,0x00, | ||
| 397 | 0x01,0x82,0x0c,0x00,0x8f,0x08,0x08,0x08,0x08,0x00,0x00,0x86,0x86,0x80, | ||
| 398 | 0x00,0x00,0x00,0x40,0x40,0x80,0x00,0x00,0x00,0x00,0x73,0x39,0x00,0x00 | ||
| 399 | },{ 0x7f,0x03,0x0c,0x30,0x7f,0x00,0x7f,0x01,0x06,0x01,0x7f,0x00,0x04,0x0a, | ||
| 400 | 0x11,0x20,0x00,0x00,0x20,0x11,0x0a,0x04,0x00,0x00,0x01,0x00,0x28,0x04, | ||
| 401 | 0x03,0x00,0x00,0x80,0x80,0x7b,0x04,0x00,0x00,0x00,0xce,0xe7,0x00,0x00}}; | ||
| 402 | static const char PROGMEM symb5_R_qwer[4][42] = { | ||
| 403 | { 0x00,0x04,0x08,0x10,0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x00,0x50,0x50, | ||
| 404 | 0x50,0x50,0x50,0x00,0x10,0x10,0xee,0x01,0x01,0x00,0x01,0x01,0xee,0x10, | ||
| 405 | 0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe7,0x73,0x00,0x00 | ||
| 406 | },{ 0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 407 | 0xc0,0x00,0x00,0x00,0x00,0xf8,0x09,0x0a,0x02,0x00,0x02,0x0a,0x09,0xf8, | ||
| 408 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0xce,0x00,0x00 | ||
| 409 | },{ 0x01,0x80,0x41,0x82,0x01,0x00,0x04,0x04,0x84,0x44,0x04,0x00,0x01,0x41, | ||
| 410 | 0x87,0x01,0x01,0x00,0xc0,0x1f,0x10,0x10,0x00,0x00,0x00,0x10,0xd0,0x1f, | ||
| 411 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x39,0x00,0x00 | ||
| 412 | },{ 0x22,0xf3,0x0a,0xf3,0x22,0x00,0x00,0x1e,0x61,0x80,0x00,0x00,0x00,0x80, | ||
| 413 | 0x61,0x1e,0x00,0x00,0x00,0x03,0x0c,0x30,0xc0,0x00,0x00,0x00,0xff,0x00, | ||
| 414 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xce,0xe7,0x00,0x00}}; | ||
| 415 | static const char PROGMEM numb6_L_qwer_nomod[4][42] = { | ||
| 416 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20, | ||
| 417 | 0x50,0x88,0x04,0x00,0x00,0x04,0x04,0xc4,0x34,0x0c,0x00,0xd8,0x24,0x24, | ||
| 418 | 0x24,0xd8,0x00,0x18,0x24,0x24,0x24,0xf8,0x00,0xf8,0x44,0x24,0x14,0xf8 | ||
| 419 | },{ 0x00,0x00,0xce,0x9c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 420 | 0x70,0x00,0x71,0x00,0x00,0x00,0x80,0x41,0xe0,0x00,0x00,0xe0,0xa1,0xa1, | ||
| 421 | 0xa1,0x20,0x00,0xc0,0xa1,0xa1,0xa1,0x00,0x00,0x00,0x01,0x71,0x01,0x00 | ||
| 422 | },{ 0x00,0x00,0x39,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 423 | 0x00,0x00,0x00,0x00,0x00,0x03,0x02,0x02,0x0f,0x02,0x00,0x04,0x08,0x08, | ||
| 424 | 0x08,0x07,0x00,0x07,0x08,0x08,0x08,0x07,0x00,0x00,0x00,0x00,0x00,0x00 | ||
| 425 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41, | ||
| 426 | 0x22,0x14,0x08,0x00,0x00,0x00,0x04,0x02,0x7f,0x00,0x00,0x42,0x61,0x51, | ||
| 427 | 0x49,0x46,0x00,0x22,0x41,0x49,0x49,0x36,0x00,0x5e,0x61,0x01,0x61,0x5e}}; | ||
| 428 | static const char PROGMEM numb6_L_qwer_shift[4][42] = { | ||
| 429 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 430 | 0x00,0x00,0x00,0x00,0x00,0xd8,0x24,0x54,0x88,0x40,0x00,0x50,0x20,0xf8, | ||
| 431 | 0x20,0x50,0x00,0x00,0x38,0xc6,0x01,0x00,0x00,0x00,0x01,0xc6,0x38,0x00 | ||
| 432 | },{ 0x00,0x00,0xce,0x9c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 433 | 0x70,0x00,0x70,0x00,0x00,0x60,0x91,0xf9,0x90,0x21,0x00,0x20,0x50,0x20, | ||
| 434 | 0x80,0x60,0x00,0x40,0x20,0x10,0x21,0x40,0x00,0x00,0x71,0x00,0x70,0x00 | ||
| 435 | },{ 0x00,0x00,0x39,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 436 | 0x00,0x00,0x00,0x00,0x00,0x02,0x04,0x8f,0x04,0x03,0x00,0x0c,0x02,0x09, | ||
| 437 | 0x14,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 | ||
| 438 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 439 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5f,0x00,0x00,0x00,0x3e,0x41,0x5d, | ||
| 440 | 0x55,0x5e,0x00,0x14,0x7f,0x14,0x7f,0x14,0x00,0x00,0x00,0x00,0x00,0x00}}; | ||
| 441 | |||
| 442 | // UNIVERSAL | ||
| 443 | static const char PROGMEM char1_L[4][42] = { | ||
| 444 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 445 | 0xe2,0xae,0x42,0x00,0x00,0x20,0x44,0x40,0x4c,0x20,0x00,0x12,0xa4,0x88, | ||
| 446 | 0xa4,0x12,0x00,0x08,0xf8,0x08,0xf8,0x08,0x00,0x78,0x80,0x80,0x80,0x78 | ||
| 447 | },{ 0x00,0x00,0xce,0x9c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80, | ||
| 448 | 0x41,0x40,0x41,0x80,0x00,0x80,0x40,0x40,0x40,0x80,0x00,0x81,0x40,0x40, | ||
| 449 | 0x40,0x81,0x00,0xc0,0x00,0xc0,0x00,0xc0,0x00,0x00,0xc0,0x00,0x00,0x00 | ||
| 450 | },{ 0x00,0x00,0x39,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83, | ||
| 451 | 0xc4,0x84,0xc2,0x07,0x00,0x03,0x04,0x04,0x04,0x03,0x00,0x02,0x85,0x05, | ||
| 452 | 0x04,0x82,0x00,0x03,0x04,0x1f,0x04,0x03,0x00,0x80,0x83,0x84,0x82,0x80 | ||
| 453 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f, | ||
| 454 | 0xc4,0x44,0xef,0x3b,0x00,0x3e,0x49,0x49,0x49,0x3e,0x00,0x02,0x7f,0x09, | ||
| 455 | 0x09,0x78,0x00,0x3e,0x08,0x08,0x14,0x22,0x00,0x20,0x24,0x24,0x24,0x20}}; | ||
| 456 | static const char PROGMEM char1_R[4][42] = { | ||
| 457 | { 0x70,0x88,0xf0,0x88,0x70,0x00,0xfe,0x02,0x02,0x02,0x06,0x00,0x88,0x48, | ||
| 458 | 0x70,0x90,0x88,0x00,0xf0,0x88,0x88,0x88,0x70,0x00,0xc0,0x30,0x0c,0x30, | ||
| 459 | 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe7,0x73,0x00,0x00 | ||
| 460 | },{ 0xa0,0x50,0x53,0x90,0x20,0x00,0xc0,0x80,0x40,0x40,0x80,0x00,0x40,0x40, | ||
| 461 | 0xc0,0x40,0x40,0x00,0xc3,0x00,0x00,0x00,0xc0,0x00,0x80,0x40,0xc0,0x40, | ||
| 462 | 0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0xce,0x00,0x00 | ||
| 463 | },{ 0x03,0x84,0x84,0x04,0x03,0x00,0x07,0x00,0x00,0x00,0x1f,0x00,0x00,0x80, | ||
| 464 | 0x83,0x84,0x00,0x00,0x00,0x83,0x54,0x8b,0x00,0x00,0x83,0x84,0x84,0x83, | ||
| 465 | 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x39,0x00,0x00 | ||
| 466 | },{ 0xff,0x24,0x24,0x27,0x18,0x00,0x7e,0x10,0x20,0x20,0x1e,0x00,0x2f,0x30, | ||
| 467 | 0x00,0x30,0x2f,0x00,0xe0,0x38,0x25,0x38,0xe0,0x00,0x18,0x26,0xa1,0xa0, | ||
| 468 | 0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xce,0xe7,0x00,0x00}}; | ||
| 469 | static const char PROGMEM game2_L[4][42] = { | ||
| 470 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c, | ||
| 471 | 0x82,0xa2,0x42,0xbc,0x00,0x3e,0xc0,0x30,0xc0,0x3e,0x00,0xfe,0x92,0x92, | ||
| 472 | 0x92,0x82,0x00,0xfe,0x12,0x12,0x32,0xcc,0x00,0x02,0x02,0xfe,0x02,0x02 | ||
| 473 | },{ 0x00,0x00,0xce,0x9c,0x00,0x00,0x00,0x40,0x40,0x40,0x40,0xe0,0x00,0xe0, | ||
| 474 | 0x90,0x90,0x90,0xe1,0x00,0x60,0x90,0x90,0x90,0x20,0x00,0xf0,0x10,0x10, | ||
| 475 | 0x10,0xe0,0x00,0xf0,0x90,0x90,0x90,0x10,0x00,0xe0,0x10,0x90,0x90,0xa0 | ||
| 476 | },{ 0x00,0x00,0x39,0x73,0x00,0x00,0x00,0x07,0x02,0x02,0x02,0x02,0x00,0x87, | ||
| 477 | 0x80,0x80,0x80,0x87,0x00,0x82,0x04,0x04,0x04,0x83,0x00,0x07,0x84,0x84, | ||
| 478 | 0x84,0x03,0x00,0x87,0x00,0x00,0x00,0x80,0x00,0x83,0x84,0x84,0x84,0x03 | ||
| 479 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x00,0x08,0x3c,0x02,0x3c,0x08,0x00,0x30, | ||
| 480 | 0x28,0x24,0x22,0x21,0x00,0x31,0x0a,0x04,0x0a,0x31,0x00,0x1f,0x20,0x20, | ||
| 481 | 0x20,0x11,0x00,0x03,0x0c,0x30,0x0c,0x03,0x00,0x3f,0x24,0x24,0x24,0x1b}}; | ||
| 482 | static const char PROGMEM medi3_R_nomod[4][42] = { | ||
| 483 | { 0x03,0x0c,0xb0,0x0c,0x03,0x00,0x3f,0x02,0x9c,0x02,0x3f,0x00,0x3f,0x04, | ||
| 484 | 0x84,0x04,0x3f,0x00,0x22,0x25,0xa5,0x25,0x18,0x00,0x3f,0x25,0xa5,0x25, | ||
| 485 | 0x1a,0x00,0x00,0xe0,0x8f,0x02,0x31,0x49,0xfa,0x00,0xe7,0x73,0x00,0x00 | ||
| 486 | },{ 0xc0,0x01,0x73,0x01,0xc0,0x00,0xf0,0x81,0xc3,0xe1,0xf0,0x00,0x00,0x71, | ||
| 487 | 0x03,0x71,0x00,0x00,0x00,0xc1,0xc3,0xc1,0x00,0x00,0xf0,0xe1,0xc3,0x81, | ||
| 488 | 0xf0,0x00,0x00,0x03,0xe2,0x21,0xe0,0x21,0xc0,0x00,0x9c,0xce,0x00,0x00 | ||
| 489 | },{ 0x01,0x02,0x02,0x02,0x01,0x00,0x07,0x00,0x01,0x03,0x87,0x00,0x00,0x1f, | ||
| 490 | 0x0e,0x04,0x80,0x00,0x00,0x03,0x03,0x03,0x00,0x00,0x07,0x03,0x01,0x00, | ||
| 491 | 0x87,0x00,0x00,0x40,0xa6,0xa8,0x08,0x04,0x8e,0x00,0x73,0x39,0x00,0x00 | ||
| 492 | },{ 0x3e,0x31,0x01,0x31,0x3e,0x00,0x00,0x46,0x46,0x4f,0x1f,0x00,0x00,0xa6, | ||
| 493 | 0x46,0xaf,0x1f,0x00,0x28,0x2c,0x2e,0x2c,0x28,0x00,0x00,0x46,0xe6,0x4f, | ||
| 494 | 0x1f,0x00,0x00,0x02,0x72,0x8a,0x89,0x00,0x1e,0x00,0xce,0xe7,0x00,0x00}}; | ||
| 495 | static const char PROGMEM medi3_R_shift[4][42] = { | ||
| 496 | { 0x03,0x0c,0x30,0x0c,0x03,0x00,0x3f,0x02,0x1c,0x02,0x3f,0x00,0x3f,0x04, | ||
| 497 | 0x04,0x04,0x3f,0x00,0x22,0x25,0x25,0x25,0x18,0x00,0x3f,0x25,0x25,0x25, | ||
| 498 | 0x1a,0x00,0x00,0xe0,0x8f,0x02,0x31,0x49,0xfa,0x00,0xe7,0x73,0x00,0x00 | ||
| 499 | },{ 0xc0,0x01,0x71,0x01,0xc0,0x00,0xf0,0x81,0xc1,0xe1,0xf0,0x00,0x00,0x71, | ||
| 500 | 0x01,0x71,0x00,0x00,0x00,0xc1,0xc1,0xc1,0x00,0x00,0xf0,0xe1,0xc1,0x81, | ||
| 501 | 0xf0,0x00,0x00,0x03,0xe2,0x21,0xe0,0x21,0xc0,0x00,0x9c,0xce,0x00,0x00 | ||
| 502 | },{ 0x01,0x02,0x02,0x02,0x01,0x00,0x07,0x00,0x01,0x03,0x87,0x00,0x00,0x1f, | ||
| 503 | 0x0e,0x04,0x80,0x00,0x00,0x03,0x03,0x03,0x00,0x00,0x07,0x03,0x01,0x00, | ||
| 504 | 0x87,0x00,0x00,0x40,0xa6,0xa8,0x08,0x04,0x8e,0x00,0x73,0x39,0x00,0x00 | ||
| 505 | },{ 0x3e,0x31,0x01,0x31,0x3e,0x00,0x00,0x46,0x46,0x4f,0x1f,0x00,0x00,0xa6, | ||
| 506 | 0x46,0xaf,0x1f,0x00,0x28,0x2c,0x2e,0x2c,0x28,0x00,0x00,0x46,0xe6,0x4f, | ||
| 507 | 0x1f,0x00,0x00,0x02,0x72,0x8a,0x89,0x00,0x1e,0x00,0xce,0xe7,0x00,0x00}}; | ||
| 508 | static const char PROGMEM navi4_R[4][42] = { | ||
| 509 | { 0xe0,0x10,0x54,0x38,0x10,0x00,0xfc,0x24,0x24,0x24,0x18,0x00,0x0c,0x10, | ||
| 510 | 0xe0,0x10,0x0c,0x00,0x8c,0x50,0x20,0x50,0x8c,0x00,0xc0,0xbe,0xa2,0xbe, | ||
| 511 | 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe7,0x73,0x00,0x00 | ||
| 512 | },{ 0x80,0xc1,0xa1,0x81,0x00,0x00,0x01,0x80,0x40,0x20,0x00,0x00,0x00,0x00, | ||
| 513 | 0xf1,0x00,0x00,0x00,0x41,0x20,0xd0,0x20,0x41,0x00,0x01,0x21,0x41,0x81, | ||
| 514 | 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0xce,0x00,0x00 | ||
| 515 | },{ 0x00,0x49,0x4a,0x48,0x87,0x00,0x81,0x82,0x85,0x89,0x01,0x00,0x01,0x02, | ||
| 516 | 0x85,0x02,0x01,0x00,0x40,0x40,0x47,0x40,0x40,0x00,0x81,0x09,0x05,0x02, | ||
| 517 | 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x39,0x00,0x00 | ||
| 518 | },{ 0x12,0x65,0x85,0x65,0x17,0x00,0x07,0x01,0x06,0x18,0x60,0x00,0x88,0x90, | ||
| 519 | 0xaf,0x90,0x88,0x00,0x04,0x02,0x7d,0x02,0x04,0x00,0x01,0x46,0x58,0x60, | ||
| 520 | 0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xce,0xe7,0x00,0x00}}; | ||
| 521 | static const char PROGMEM func7_L[4][42] = { | ||
| 522 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0xff,0x09,0xe9,0xc9,0x01,0x00,0xe0,0x00, | ||
| 523 | 0x10,0x08,0xfc,0x00,0x00,0x08,0x84,0x44,0x24,0x18,0x00,0x88,0x04,0x24, | ||
| 524 | 0x24,0xd8,0x00,0x60,0x50,0x48,0xfc,0x40,0x00,0x70,0x80,0x9c,0x80,0x70 | ||
| 525 | },{ 0x00,0x00,0xce,0x9c,0x00,0xf0,0x00,0x00,0x9f,0x00,0x03,0x0c,0x1f,0x00, | ||
| 526 | 0xe0,0xa0,0xa1,0x20,0x00,0xc1,0xa1,0xa1,0xa1,0x01,0x00,0x20,0x21,0x21, | ||
| 527 | 0xa1,0x60,0x00,0xc0,0x20,0x20,0x21,0xc0,0x00,0x40,0xe0,0x50,0x40,0x80 | ||
| 528 | },{ 0x00,0x00,0x39,0x73,0x00,0xef,0x02,0x83,0xe4,0x00,0x0e,0x15,0x16,0x00, | ||
| 529 | 0x04,0x08,0x08,0x07,0x00,0x07,0x48,0xc8,0x08,0x07,0x00,0x00,0x40,0xce, | ||
| 530 | 0x01,0x00,0x00,0x06,0x49,0xc9,0x09,0x06,0x00,0x06,0x08,0x49,0x08,0x07 | ||
| 531 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x05,0x04,0x03,0x90,0xa8,0xa8,0x40,0x06, | ||
| 532 | 0x49,0x49,0x49,0x3e,0x00,0x7c,0xa2,0x93,0x8a,0x7c,0x00,0x00,0x08,0x07, | ||
| 533 | 0xfe,0x00,0x00,0x84,0xc2,0xa3,0x92,0x8c,0x00,0x70,0x38,0x0d,0x38,0x70}}; | ||
| 534 | static const char PROGMEM mous8_L[4][42] = { | ||
| 535 | { 0x00,0x00,0x73,0xe7,0x00,0x3c,0x84,0xbc,0x84,0x38,0x00,0x00,0x00,0x10, | ||
| 536 | 0x28,0x92,0xc5,0x82,0x00,0xfe,0x1f,0x1f,0x01,0xfe,0x00,0xfe,0x01,0x19, | ||
| 537 | 0x01,0xfe,0x00,0xfe,0x01,0x1f,0x1f,0xfe,0x00,0x10,0x38,0x92,0xc7,0x82 | ||
| 538 | },{ 0x00,0x00,0xce,0x9c,0x00,0xe7,0x08,0x08,0x08,0xe7,0x00,0x00,0x00,0x00, | ||
| 539 | 0x00,0x80,0x01,0x00,0x00,0x01,0x01,0x81,0x01,0x01,0x00,0x01,0x01,0x81, | ||
| 540 | 0x01,0x01,0x00,0x01,0x01,0x81,0x01,0x01,0x00,0x60,0x50,0xf8,0x41,0x00 | ||
| 541 | },{ 0x00,0x00,0x39,0x73,0x00,0x91,0xaa,0xaa,0xa9,0x43,0x00,0x00,0x00,0x02, | ||
| 542 | 0x07,0xca,0x02,0x02,0x00,0x02,0x01,0xcf,0x01,0x02,0x00,0x02,0x04,0x0f, | ||
| 543 | 0x04,0x02,0x00,0x02,0x02,0xca,0x07,0x02,0x00,0xdc,0x58,0x5c,0x18,0x1f | ||
| 544 | },{ 0x00,0x00,0xe7,0xce,0x00,0x1c,0x2a,0x2a,0x2a,0x2c,0x00,0x00,0x00,0x0c, | ||
| 545 | 0x33,0xc0,0x00,0x00,0x00,0x0c,0x03,0x00,0x03,0x0c,0x00,0x0c,0x30,0xc0, | ||
| 546 | 0x30,0x0c,0x00,0x00,0x00,0xc0,0x33,0x0c,0x00,0xe5,0xc9,0xe6,0xc0,0xf8}}; | ||
| 547 | static const char PROGMEM musi9_L[4][42] = { | ||
| 548 | { 0x00,0x00,0x73,0xe7,0x00,0x00,0x00,0x00,0x00,0xfe,0x04,0x18,0x04,0xfe, | ||
| 549 | 0x00,0x00,0xfe,0x00,0x00,0x00,0xfe,0x00,0x8c,0x12,0x12,0x12,0xe4,0x00, | ||
| 550 | 0x00,0x02,0xfe,0x02,0x00,0x00,0xfc,0x02,0x02,0x02,0x84,0x00,0x00,0x00 | ||
| 551 | },{ 0x00,0x00,0xce,0x9c,0x00,0x00,0xc0,0xe0,0xf0,0xf9,0xf8,0xf8,0xf8,0xf9, | ||
| 552 | 0xf0,0xe0,0xc0,0x01,0x01,0x01,0x00,0xf0,0xf0,0x01,0x01,0xf1,0xf0,0x00, | ||
| 553 | 0x00,0x01,0x01,0x01,0x00,0x00,0xf8,0xf1,0xe1,0xc1,0x80,0x00,0x00,0x00 | ||
| 554 | },{ 0x00,0x00,0x39,0x73,0x00,0x00,0x07,0x0f,0x1f,0x3f,0x3f,0x3f,0x3f,0x3f, | ||
| 555 | 0x1f,0x0f,0x07,0x00,0x00,0x00,0x00,0x1f,0x1f,0x00,0x00,0x1f,0x1f,0x00, | ||
| 556 | 0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00,0x00 | ||
| 557 | },{ 0x00,0x00,0xe7,0xce,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x08, | ||
| 558 | 0xf8,0x08,0xf0,0x00,0x70,0x88,0x88,0x88,0x70,0x00,0x70,0x88,0x88,0x48, | ||
| 559 | 0xff,0x00,0x70,0xa8,0xa8,0xa8,0xb0,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}; | ||
| 560 | static const char PROGMEM musi9_R[4][42] = { | ||
| 561 | { 0x00,0x00,0x00,0xfe,0x04,0x18,0x04,0xfe,0x00,0x00,0xfe,0x00,0x00,0x00, | ||
| 562 | 0xfe,0x00,0x8c,0x12,0x12,0x12,0xe4,0x00,0x00,0x02,0xfe,0x02,0x00,0x00, | ||
| 563 | 0xfc,0x02,0x02,0x02,0x84,0x00,0x00,0x00,0x00,0x00,0xe7,0x73,0x00,0x00 | ||
| 564 | },{ 0x00,0x00,0x00,0x81,0x60,0x10,0x60,0x81,0x60,0x10,0x00,0x01,0x01,0x01, | ||
| 565 | 0xe0,0xe0,0x60,0x61,0x61,0x61,0x60,0xf8,0x70,0x21,0x01,0x01,0xc0,0xe0, | ||
| 566 | 0x60,0x01,0xf9,0xf9,0x00,0x60,0xe0,0xc0,0x00,0x00,0x9c,0xce,0x00,0x00 | ||
| 567 | },{ 0x18,0x24,0x4b,0x48,0x48,0x4c,0x4b,0x48,0x4b,0x2c,0x18,0x00,0x00,0x00, | ||
| 568 | 0x4f,0xe7,0xf0,0x60,0x60,0x60,0x60,0x60,0x7e,0x7f,0x00,0x0f,0x3f,0x70, | ||
| 569 | 0x60,0xc0,0xc1,0xc1,0xc0,0x60,0x70,0x3f,0x0f,0x00,0x73,0x39,0x00,0x00 | ||
| 570 | },{ 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x08,0xf8,0x08,0xf0,0x00,0x70,0x88, | ||
| 571 | 0x88,0x88,0x71,0x00,0x70,0x88,0x88,0x48,0xff,0x00,0x70,0xa8,0xa8,0xa8, | ||
| 572 | 0xb0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xce,0xe7,0x00,0x00}}; | ||
| 573 | uint8_t this_layout = userspace_config.layout % 3; | ||
| 574 | |||
| 575 | // Render the requested image on the given column and row | ||
| 576 | // Don't grab highest layer; instead compare from top to bottom. | ||
| 577 | // Highest layer might be on the other side | ||
| 578 | if (isLeft) { | ||
| 579 | if (layer_state_cmp(layer_state, _MUSI)) { | ||
| 580 | draw_image(row, col, musi9_L); | ||
| 581 | } else if (layer_state_cmp(layer_state, _MOUS)) { | ||
| 582 | draw_image(row, col, mous8_L); | ||
| 583 | } else if (layer_state_cmp(layer_state, _FUNC)) { | ||
| 584 | draw_image(row, col, func7_L); | ||
| 585 | } else if (layer_state_cmp(layer_state, _NUMB)) { | ||
| 586 | switch (this_layout) { | ||
| 587 | case 0: // Dvorak | ||
| 588 | if (mods & MOD_MASK_SHIFT) { | ||
| 589 | draw_image(row, col, numb6_L_dvor_shift); | ||
| 590 | } else { | ||
| 591 | draw_image(row, col, numb6_L_dvor_nomod); | ||
| 592 | } | ||
| 593 | break; | ||
| 594 | case 1: // Turkish F | ||
| 595 | if ((mods & MOD_MASK_SHIFT) && (mods & MOD_BIT(KC_RALT))) { | ||
| 596 | // Shift + AltGr | ||
| 597 | draw_image(row, col, numb6_L_turf_shfgr); | ||
| 598 | } else if (mods & MOD_MASK_SHIFT) { | ||
| 599 | // Shift | ||
| 600 | draw_image(row, col, numb6_L_turf_shift); | ||
| 601 | } else if (mods & MOD_BIT(KC_RALT)) { | ||
| 602 | // AltGr | ||
| 603 | draw_image(row, col, numb6_L_turf_altgr); | ||
| 604 | } else { | ||
| 605 | // Normal | ||
| 606 | draw_image(row, col, numb6_L_turf_nomod); | ||
| 607 | } | ||
| 608 | break; | ||
| 609 | case 2: // Qwerty | ||
| 610 | if (mods & MOD_MASK_SHIFT) { | ||
| 611 | draw_image(row, col, numb6_L_qwer_shift); | ||
| 612 | } else { | ||
| 613 | draw_image(row, col, numb6_L_qwer_nomod); | ||
| 614 | } | ||
| 615 | break; | ||
| 616 | } | ||
| 617 | } else if (layer_state_cmp(layer_state, _GAME)) { | ||
| 618 | draw_image(row, col, game2_L); | ||
| 619 | } else if (layer_state_cmp(layer_state, _CHAR)) { | ||
| 620 | draw_image(row, col, char1_L); | ||
| 621 | } else { | ||
| 622 | switch (this_layout) { | ||
| 623 | case 0: // Dvorak | ||
| 624 | if (mods & MOD_MASK_SHIFT) { | ||
| 625 | draw_image(row, col, base0_L_dvor_shift); | ||
| 626 | } else { | ||
| 627 | draw_image(row, col, base0_L_dvor_nomod); | ||
| 628 | } | ||
| 629 | break; | ||
| 630 | case 1: // Turkish F | ||
| 631 | if ((mods & MOD_MASK_SHIFT) && (mods & MOD_BIT(KC_RALT))) { | ||
| 632 | // Shift + AltGr | ||
| 633 | draw_image(row, col, base0_L_turf_shfgr); | ||
| 634 | } else if (mods & MOD_MASK_SHIFT) { | ||
| 635 | // Shift | ||
| 636 | draw_image(row, col, base0_L_turf_shift); | ||
| 637 | } else if (mods & MOD_BIT(KC_RALT)) { | ||
| 638 | // AltGr | ||
| 639 | draw_image(row, col, base0_L_turf_altgr); | ||
| 640 | } else { | ||
| 641 | // Normal | ||
| 642 | draw_image(row, col, base0_L_turf_nomod); | ||
| 643 | } | ||
| 644 | break; | ||
| 645 | case 2: // Qwerty | ||
| 646 | if (mods & MOD_MASK_SHIFT) { | ||
| 647 | draw_image(row, col, base0_L_qwer_shift); | ||
| 648 | } else { | ||
| 649 | draw_image(row, col, base0_L_qwer_nomod); | ||
| 650 | } | ||
| 651 | break; | ||
| 652 | } | ||
| 653 | } | ||
| 654 | } else { | ||
| 655 | if (layer_state_cmp(layer_state, _MUSI)) { | ||
| 656 | draw_image(row, col, musi9_R); | ||
| 657 | } else if (layer_state_cmp(layer_state, _SYMB)) { | ||
| 658 | switch (this_layout) { | ||
| 659 | case 0: // Dvorak | ||
| 660 | draw_image(row, col, symb5_R_dvor); | ||
| 661 | break; | ||
| 662 | case 1: // Turkish f | ||
| 663 | if (mods & MOD_BIT(KC_RALT)) { | ||
| 664 | // AltGr | ||
| 665 | draw_image(row, col, symb5_R_turf_altgr); | ||
| 666 | } else { | ||
| 667 | // Normal | ||
| 668 | draw_image(row, col, symb5_R_turf_nomod); | ||
| 669 | } | ||
| 670 | break; | ||
| 671 | case 2: // Qwerty | ||
| 672 | draw_image(row, col, symb5_R_qwer); | ||
| 673 | break; | ||
| 674 | } | ||
| 675 | } else if (layer_state_cmp(layer_state, _NAVI)) { | ||
| 676 | draw_image(row, col, navi4_R); | ||
| 677 | } else if (layer_state_cmp(layer_state, _MEDI)) { | ||
| 678 | if (mods & MOD_MASK_SHIFT) { | ||
| 679 | draw_image(row, col, medi3_R_shift); | ||
| 680 | } else { | ||
| 681 | draw_image(row, col, medi3_R_nomod); | ||
| 682 | } | ||
| 683 | } else if (layer_state_cmp(layer_state, _CHAR)) { | ||
| 684 | draw_image(row, col, char1_R); | ||
| 685 | } else { | ||
| 686 | switch (this_layout) { | ||
| 687 | case 0: // Dvorak | ||
| 688 | if (mods & MOD_MASK_SHIFT) { | ||
| 689 | draw_image(row, col, base0_R_dvor_shift); | ||
| 690 | } else { | ||
| 691 | draw_image(row, col, base0_R_dvor_nomod); | ||
| 692 | } | ||
| 693 | break; | ||
| 694 | case 1: // Turkish F | ||
| 695 | if ((mods & MOD_MASK_SHIFT) && (mods & MOD_BIT(KC_RALT))) { | ||
| 696 | // Shift + AltGr | ||
| 697 | draw_image(row, col, base0_R_turf_shfgr); | ||
| 698 | } else if (mods & MOD_MASK_SHIFT) { | ||
| 699 | // Shift | ||
| 700 | draw_image(row, col, base0_R_turf_shift); | ||
| 701 | } else if (mods & MOD_BIT(KC_RALT)) { | ||
| 702 | // AltGr | ||
| 703 | draw_image(row, col, base0_R_turf_altgr); | ||
| 704 | } else { | ||
| 705 | // Normal | ||
| 706 | draw_image(row, col, base0_R_turf_nomod); | ||
| 707 | } | ||
| 708 | break; | ||
| 709 | case 2: // Qwerty | ||
| 710 | if (mods & MOD_MASK_SHIFT) { | ||
| 711 | draw_image(row, col, base0_R_qwer_shift); | ||
| 712 | } else { | ||
| 713 | draw_image(row, col, base0_R_qwer_nomod); | ||
| 714 | } | ||
| 715 | break; | ||
| 716 | } | ||
| 717 | } | ||
| 718 | } | ||
| 719 | } | ||
| 720 | |||
| 721 | // Render the RGB state on the given column and row | ||
| 722 | void render_rgb(uint8_t row, uint8_t col) { | ||
| 723 | static const char PROGMEM rgb_enab[12] = {0x08,0x81,0x3c,0x42,0x99,0xbd,0xbd,0x99,0x42,0x3c,0x81,0x10}; | ||
| 724 | static const char PROGMEM rgb_disa[12] = {0x08,0x81,0x3c,0x42,0x81,0x81,0x81,0x81,0x42,0x3c,0x81,0x10}; | ||
| 725 | static char rgb_temp4[4] = {0}; | ||
| 726 | static char rgb_temp3[3] = {0}; | ||
| 727 | |||
| 728 | oled_set_cursor(col, row); | ||
| 729 | # ifdef RGB_MATRIX_ENABLE | ||
| 730 | if (rgb_matrix_is_enabled()) { | ||
| 731 | oled_write_raw_P(rgb_enab, 12); | ||
| 732 | } else { | ||
| 733 | oled_write_raw_P(rgb_disa, 12); | ||
| 734 | } | ||
| 735 | oled_set_cursor(col + 2, row); | ||
| 736 | oled_write(" hue sat val", false); | ||
| 737 | oled_set_cursor(col, row + 1); | ||
| 738 | itoa(rgb_matrix_get_mode(), rgb_temp3, 10); | ||
| 739 | oled_write(rgb_temp3, false); | ||
| 740 | oled_write(" ", false); | ||
| 741 | itoa(rgb_matrix_get_hue(), rgb_temp4, 10); | ||
| 742 | oled_write(rgb_temp4, false); | ||
| 743 | oled_write(" ", false); | ||
| 744 | itoa(rgb_matrix_get_sat(), rgb_temp4, 10); | ||
| 745 | oled_write(rgb_temp4, false); | ||
| 746 | oled_write(" ", false); | ||
| 747 | itoa(rgb_matrix_get_val(), rgb_temp4, 10); | ||
| 748 | oled_write(rgb_temp4, false); | ||
| 749 | # else // RGB_MATRIX_ENABLE | ||
| 750 | oled_write("-RGB disabled-", false); | ||
| 751 | # endif // RGB_MATRIX_ENABLE | ||
| 752 | } | ||
| 753 | |||
| 754 | void render_status_left(uint8_t row, uint8_t col) { | ||
| 755 | // Left side looks like this on the left half | ||
| 756 | // (Should be 14 characters per line) | ||
| 757 | // Mods: <OS> <Alt/Gr> <Ctrl> <Shift> | ||
| 758 | // Enc: <8 len str> | ||
| 759 | // Wpm: <wpm here> | ||
| 760 | // Layout: <dvorak/qwerty/tur. f> | ||
| 761 | // Right half is whatever layer image needs be | ||
| 762 | uint8_t this_mod = get_mods(); | ||
| 763 | uint8_t this_layer = get_highest_layer(layer_state); | ||
| 764 | |||
| 765 | // MODIFIERS | ||
| 766 | render_modifiers(row + 0, col + 0, this_mod); | ||
| 767 | // Encoders | ||
| 768 | render_encoder(row + 1, col + 0, 0, this_layer); | ||
| 769 | // WPM text | ||
| 770 | render_wpm(row + 2, col + 0); | ||
| 771 | // Visual layout | ||
| 772 | render_keymap(row + 3, col + 0, false); | ||
| 773 | // Draw the image after 14'th character | ||
| 774 | render_layout(row + 0, col + 14, this_mod, true); | ||
| 775 | } | ||
| 776 | |||
| 777 | void render_status_right(uint8_t row, uint8_t col) { | ||
| 778 | // Right half is whatever layer image needs be on the left | ||
| 779 | // Right side looks like this on the right half | ||
| 780 | // (Should be after the 12'th character; max 14 characters per line) | ||
| 781 | // Mods: <OS> <Alt/Gr> <Ctrl> <Shift> | ||
| 782 | // Enc: <8 len str> | ||
| 783 | // Wpm: <wpm here> | ||
| 784 | // Layout: <dvorak/qwerty/tur. f> | ||
| 785 | uint8_t this_mod = get_mods(); | ||
| 786 | uint8_t this_layer = get_highest_layer(layer_state); | ||
| 787 | |||
| 788 | // Draw the image | ||
| 789 | render_layout(row + 0, col + 0, this_mod, false); | ||
| 790 | // Modifiers | ||
| 791 | render_modifiers(row + 0, col + 7, this_mod); | ||
| 792 | // Encoder | ||
| 793 | render_encoder(row + 1, col + 7, 1, this_layer); | ||
| 794 | // RGB State (2 rows) | ||
| 795 | render_rgb(row + 2, col + 7); | ||
| 796 | } | ||
diff --git a/users/bbaserdem/bb-oled-extra.h b/users/bbaserdem/bb-oled-extra.h deleted file mode 100644 index c051e6226c..0000000000 --- a/users/bbaserdem/bb-oled-extra.h +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | /* Copyright 2021 Batuhan Başerdem | ||
| 2 | * <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #pragma once | ||
| 18 | #include "bbaserdem.h" | ||
| 19 | |||
| 20 | // OLED layout images writer function | ||
| 21 | void render_modifiers(uint8_t row, uint8_t col, uint8_t mods); | ||
| 22 | void render_layout(uint8_t row, uint8_t col, uint8_t mods, bool isLeft); | ||
| 23 | void render_rgb(uint8_t row, uint8_t col); | ||
| 24 | void render_status_left(uint8_t row, uint8_t col); | ||
| 25 | void render_status_right(uint8_t row, uint8_t col); | ||
diff --git a/users/bbaserdem/bb-oled.c b/users/bbaserdem/bb-oled.c deleted file mode 100644 index cf00193c03..0000000000 --- a/users/bbaserdem/bb-oled.c +++ /dev/null | |||
| @@ -1,216 +0,0 @@ | |||
| 1 | /* Copyright 2021 Batuhan Başerdem | ||
| 2 | * <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #include "bb-oled.h" | ||
| 18 | |||
| 19 | #include <string.h> | ||
| 20 | // Grab the print function | ||
| 21 | #ifdef ENCODER_ENABLE | ||
| 22 | # include "bb-encoder.h" | ||
| 23 | #endif // ENCODER_ENABLE | ||
| 24 | |||
| 25 | /* OLED | ||
| 26 | * This contains general purpose oled code | ||
| 27 | */ | ||
| 28 | |||
| 29 | // Allow default to be overwritten by keymap if they return false | ||
| 30 | __attribute__ ((weak)) bool oled_task_keymap(void) {return true;} | ||
| 31 | |||
| 32 | // Do sane defaults for regular oled rendering | ||
| 33 | void oled_task_user(void) { | ||
| 34 | if (is_oled_on()) { | ||
| 35 | if (oled_task_keymap()) { | ||
| 36 | render_status_lite(0, 0); | ||
| 37 | } | ||
| 38 | } | ||
| 39 | } | ||
| 40 | |||
| 41 | /*-------------------------*\ | ||
| 42 | |*---RENDERING FUNCTIONS---*| | ||
| 43 | \*-------------------------*/ | ||
| 44 | void render_qmk_logo(uint8_t row, uint8_t col) { | ||
| 45 | static const char PROGMEM qmk_logo[] = { | ||
| 46 | 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d, | ||
| 47 | 0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6, | ||
| 48 | 0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, | ||
| 49 | 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd, | ||
| 50 | 0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; | ||
| 51 | oled_set_cursor(col, row); | ||
| 52 | oled_write_P(qmk_logo, false); | ||
| 53 | } | ||
| 54 | |||
| 55 | void render_layer(uint8_t row, uint8_t col, uint8_t top_layer) { | ||
| 56 | // Write the layer state; 17 chars | ||
| 57 | oled_set_cursor(col, row); | ||
| 58 | oled_write("Layer: ", false); | ||
| 59 | switch (top_layer) { | ||
| 60 | case _BASE: | ||
| 61 | oled_write("Default ", false); | ||
| 62 | break; | ||
| 63 | case _CHAR: | ||
| 64 | oled_write("Sp. Chars ", false); | ||
| 65 | break; | ||
| 66 | case _GAME: | ||
| 67 | oled_write("Gaming ", false); | ||
| 68 | break; | ||
| 69 | case _MEDI: | ||
| 70 | oled_write("Media Ctr ", false); | ||
| 71 | break; | ||
| 72 | case _NAVI: | ||
| 73 | oled_write("Navigation", false); | ||
| 74 | break; | ||
| 75 | case _SYMB: | ||
| 76 | oled_write("Symbols ", false); | ||
| 77 | break; | ||
| 78 | case _NUMB: | ||
| 79 | oled_write("Numpad ", false); | ||
| 80 | break; | ||
| 81 | case _FUNC: | ||
| 82 | oled_write("Funct Keys", false); | ||
| 83 | break; | ||
| 84 | case _MOUS: | ||
| 85 | oled_write("Mouse Keys", false); | ||
| 86 | break; | ||
| 87 | case _MUSI: | ||
| 88 | oled_write("Music Mode", false); | ||
| 89 | break; | ||
| 90 | default: | ||
| 91 | oled_write("?? N/A ?? ", false); | ||
| 92 | } | ||
| 93 | } | ||
| 94 | |||
| 95 | void render_modifiers_lite(uint8_t row, uint8_t col, uint8_t mods) { | ||
| 96 | // Write the modifier state, 16 characters | ||
| 97 | oled_set_cursor(col, row); | ||
| 98 | oled_write((mods & MOD_MASK_SHIFT ) ? "Shft " : " ", false); | ||
| 99 | oled_write((mods & MOD_MASK_CTRL ) ? "Ctrl " : " ", false); | ||
| 100 | oled_write((mods & MOD_MASK_ALT ) ? "Alt" : " ", false); | ||
| 101 | oled_write((mods & MOD_BIT(KC_RALT)) ? "G " : " ", false); | ||
| 102 | oled_write((mods & MOD_MASK_GUI ) ? "Meta " : " ", false); | ||
| 103 | } | ||
| 104 | |||
| 105 | void render_encoder(uint8_t row, uint8_t col, uint8_t index, uint8_t layer) { | ||
| 106 | // Renders the encoder state, 14 characters | ||
| 107 | oled_set_cursor(col, row); | ||
| 108 | |||
| 109 | # ifdef ENCODER_ENABLE | ||
| 110 | static char encoder_temp9[9] = {0}; | ||
| 111 | oled_write("Enc: ", false); | ||
| 112 | encoder_state_string(index, layer, encoder_temp9); | ||
| 113 | oled_write(encoder_temp9, false); | ||
| 114 | # else // ENCODER_ENABLE | ||
| 115 | oled_write("No enc. avail.", false); | ||
| 116 | # endif // ENCODER_ENABLE | ||
| 117 | } | ||
| 118 | |||
| 119 | void render_wpm(uint8_t row, uint8_t col) { | ||
| 120 | // Renders the WPM, 8 characters | ||
| 121 | oled_set_cursor(col, row); | ||
| 122 | # ifdef WPM_ENABLE | ||
| 123 | static char wpm_temp4[4] = {0}; | ||
| 124 | oled_write("WPM: ", false); | ||
| 125 | itoa(get_current_wpm(), wpm_temp4, 10); | ||
| 126 | oled_write(wpm_temp4, false); | ||
| 127 | oled_write(" ", false); | ||
| 128 | # else // WPM_ENABLE | ||
| 129 | oled_write("WPM: N/A", false); | ||
| 130 | # endif // WPM_ENABLE | ||
| 131 | } | ||
| 132 | |||
| 133 | // Writes the currently used OLED display layout | ||
| 134 | void render_keymap(uint8_t row, uint8_t col, bool isLite) { | ||
| 135 | // Render the oled layout; lite is 11, regular is 14 characters | ||
| 136 | oled_set_cursor(col, row); | ||
| 137 | if (isLite) { | ||
| 138 | oled_write("KM: ", false); | ||
| 139 | } else { | ||
| 140 | oled_write("Layout: ", false); | ||
| 141 | } | ||
| 142 | switch (userspace_config.layout % 3) { | ||
| 143 | case 0: | ||
| 144 | oled_write("Dvorak", false); | ||
| 145 | break; | ||
| 146 | case 1: | ||
| 147 | oled_write("Tur. F", false); | ||
| 148 | break; | ||
| 149 | case 2: | ||
| 150 | oled_write("Qwerty", false); | ||
| 151 | break; | ||
| 152 | } | ||
| 153 | if (isLite) { | ||
| 154 | oled_write(" ", false); | ||
| 155 | } | ||
| 156 | } | ||
| 157 | |||
| 158 | // Writes the currently used OLED display layout | ||
| 159 | #ifdef RGB_MATRIX_ENABLE | ||
| 160 | void render_rgb_lite(uint8_t row, uint8_t col) { | ||
| 161 | // Writes the currently used OLED display layout, 19 characters | ||
| 162 | static char rgb_temp4[4] = {0}; | ||
| 163 | // Render the oled layout | ||
| 164 | oled_set_cursor(col, row); | ||
| 165 | oled_write("m", false); | ||
| 166 | itoa(rgb_matrix_get_mode(), rgb_temp4, 10); | ||
| 167 | oled_write(rgb_temp4, false); | ||
| 168 | oled_write(" h", false); | ||
| 169 | itoa(rgb_matrix_get_hue(), rgb_temp4, 10); | ||
| 170 | oled_write(rgb_temp4, false); | ||
| 171 | oled_write(" s", false); | ||
| 172 | itoa(rgb_matrix_get_sat(), rgb_temp4, 10); | ||
| 173 | oled_write(rgb_temp4, false); | ||
| 174 | oled_write(" v", false); | ||
| 175 | itoa(rgb_matrix_get_val(), rgb_temp4, 10); | ||
| 176 | oled_write(rgb_temp4, false); | ||
| 177 | } | ||
| 178 | #endif // RGB_MATRIX_ENABLE | ||
| 179 | |||
| 180 | void render_status_lite(uint8_t row, uint8_t col) { | ||
| 181 | // Function to print state information; for low flash memory | ||
| 182 | uint8_t this_layer = get_highest_layer(layer_state); | ||
| 183 | uint8_t this_mod = get_mods(); | ||
| 184 | |||
| 185 | // Line 1: Layer State | ||
| 186 | render_layer(row + 0, col + 0, this_layer); | ||
| 187 | |||
| 188 | // Line 2: Mod or info | ||
| 189 | switch (this_layer) { | ||
| 190 | // Show RGB mode as an overlay in media mode. | ||
| 191 | # ifdef RGB_MATRIX_ENABLE | ||
| 192 | case _MEDI: | ||
| 193 | render_rgb_lite(row + 1, col + 0); | ||
| 194 | break; | ||
| 195 | # endif // RGB_MATRIX_ENABLE | ||
| 196 | // Show the modifier if nothing else is doing anything | ||
| 197 | default: | ||
| 198 | render_modifiers_lite(row + 1, col + 0, this_mod); | ||
| 199 | break; | ||
| 200 | } | ||
| 201 | |||
| 202 | // Line 3: WPM and layout | ||
| 203 | render_keymap(row + 2, col + 0, true); | ||
| 204 | render_wpm(row + 2, col + 11); | ||
| 205 | |||
| 206 | // Line 4: Encoder states | ||
| 207 | # ifdef SPLIT_KEYBOARD | ||
| 208 | if (is_keyboard_left()) { | ||
| 209 | render_encoder(row + 3, col + 0, 0, this_layer); | ||
| 210 | } else { | ||
| 211 | render_encoder(row + 3, col + 0, 1, this_layer); | ||
| 212 | } | ||
| 213 | # else // SPLIT_KEYBOARD | ||
| 214 | render_encoder(row + 3, col + 0, 0, this_layer); | ||
| 215 | # endif // SPLIT_KEYBOARD | ||
| 216 | } | ||
diff --git a/users/bbaserdem/bb-oled.h b/users/bbaserdem/bb-oled.h deleted file mode 100644 index a355c88ca9..0000000000 --- a/users/bbaserdem/bb-oled.h +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | /* Copyright 2021 Batuhan Başerdem | ||
| 2 | * <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #pragma once | ||
| 18 | #include "bbaserdem.h" | ||
| 19 | |||
| 20 | // Contain the main oled writer here | ||
| 21 | void oled_task_user(void); | ||
| 22 | // Some generic rendering functions | ||
| 23 | void render_qmk_logo(uint8_t row, uint8_t col); | ||
| 24 | void render_layer(uint8_t row, uint8_t col, uint8_t top_layer); | ||
| 25 | void render_modifiers_lite(uint8_t row, uint8_t col, uint8_t mods); | ||
| 26 | void render_encoder(uint8_t row, uint8_t col, uint8_t index, uint8_t layer); | ||
| 27 | void render_wpm(uint8_t row, uint8_t col); | ||
| 28 | void render_keymap(uint8_t row, uint8_t col, bool isLite); | ||
| 29 | #ifdef RGB_MATRIX_ENABLE | ||
| 30 | void render_rgb_lite(uint8_t row, uint8_t col); | ||
| 31 | #endif // RGB_MATRIX_ENABLE | ||
| 32 | void render_status_lite(uint8_t row, uint8_t col); | ||
diff --git a/users/bbaserdem/bb-rgb.c b/users/bbaserdem/bb-rgb.c deleted file mode 100644 index 49b91129ba..0000000000 --- a/users/bbaserdem/bb-rgb.c +++ /dev/null | |||
| @@ -1,123 +0,0 @@ | |||
| 1 | /* Copyright 2021 Batuhan Başerdem | ||
| 2 | * <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #include "bb-rgb.h" | ||
| 18 | #include "color.h" | ||
| 19 | |||
| 20 | #define X_DIV 224/2 | ||
| 21 | /* Code relating to per-key RGB LED stuff | ||
| 22 | */ | ||
| 23 | |||
| 24 | // Allow hooking into the RGB matrix indications using keymap code | ||
| 25 | |||
| 26 | // Modulates the brightness of indicator | ||
| 27 | RGB helper_dimmer(uint8_t r, uint8_t g, uint8_t b) { | ||
| 28 | RGB output; | ||
| 29 | output.r = r / 2; | ||
| 30 | output.g = g / 2; | ||
| 31 | output.b = b / 2; | ||
| 32 | return output; | ||
| 33 | } | ||
| 34 | // x range from 0-left to 224-right | ||
| 35 | // y range from 0-top to 64-bottom | ||
| 36 | void helper_painter(uint8_t led_min, uint8_t led_max, RGB col, uint8_t side) { | ||
| 37 | if (side == 1) { | ||
| 38 | // Left | ||
| 39 | for(uint8_t i = led_min; i <= led_max; i++) { | ||
| 40 | if((g_led_config.point[i].x < X_DIV) && (g_led_config.flags[i] & LED_FLAG_INDICATOR)) { | ||
| 41 | rgb_matrix_set_color(i, col.r, col.g, col.b); | ||
| 42 | } | ||
| 43 | } | ||
| 44 | } else if (side == 2) { | ||
| 45 | // Right | ||
| 46 | for(uint8_t i = led_min; i <= led_max; i++) { | ||
| 47 | if((g_led_config.point[i].x > X_DIV) && (g_led_config.flags[i] & LED_FLAG_INDICATOR)) { | ||
| 48 | rgb_matrix_set_color(i, col.r, col.g, col.b); | ||
| 49 | } | ||
| 50 | } | ||
| 51 | } else if (side == 0) { | ||
| 52 | // Both | ||
| 53 | for(uint8_t i = led_min; i <= led_max; i++) { | ||
| 54 | if(g_led_config.flags[i] & LED_FLAG_INDICATOR) { | ||
| 55 | rgb_matrix_set_color(i, col.r, col.g, col.b); | ||
| 56 | } | ||
| 57 | } | ||
| 58 | } | ||
| 59 | } | ||
| 60 | |||
| 61 | // Allow to turn off global handling | ||
| 62 | __attribute__ ((weak)) bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { | ||
| 63 | return false; | ||
| 64 | } | ||
| 65 | // Set RGB state depending on layer | ||
| 66 | bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { | ||
| 67 | uint8_t thisInd = 3; | ||
| 68 | RGB thisCol; | ||
| 69 | // Load keymap hooks | ||
| 70 | if(rgb_matrix_indicators_advanced_keymap(led_min, led_max)) { | ||
| 71 | return false; | ||
| 72 | } | ||
| 73 | // Grab color info | ||
| 74 | switch (get_highest_layer(layer_state)) { | ||
| 75 | case _GAME: // Set left side as purple | ||
| 76 | thisCol = helper_dimmer(RGB_PURPLE); | ||
| 77 | thisInd = 1; | ||
| 78 | break; | ||
| 79 | case _CHAR: // Set full board as gold | ||
| 80 | thisCol = helper_dimmer(RGB_GOLD); | ||
| 81 | thisInd = 0; | ||
| 82 | break; | ||
| 83 | case _MEDI: // Set right side as pink | ||
| 84 | thisCol = helper_dimmer(RGB_MAGENTA); | ||
| 85 | thisInd = 2; | ||
| 86 | break; | ||
| 87 | case _NAVI: // Set right side as green | ||
| 88 | thisCol = helper_dimmer(RGB_GREEN); | ||
| 89 | thisInd = 2; | ||
| 90 | break; | ||
| 91 | case _SYMB: // Set right side as yellow | ||
| 92 | thisCol = helper_dimmer(RGB_YELLOW); | ||
| 93 | thisInd = 2; | ||
| 94 | break; | ||
| 95 | case _NUMB: // Set left side as blue | ||
| 96 | thisCol = helper_dimmer(RGB_BLUE); | ||
| 97 | thisInd = 1; | ||
| 98 | break; | ||
| 99 | case _FUNC: // Set left side as red | ||
| 100 | thisCol = helper_dimmer(RGB_RED); | ||
| 101 | thisInd = 1; | ||
| 102 | break; | ||
| 103 | case _MOUS: // Set left side as blue-green | ||
| 104 | thisCol = helper_dimmer(RGB_SPRINGGREEN); | ||
| 105 | thisInd = 1; | ||
| 106 | break; | ||
| 107 | case _MUSI: // Set full board as orange | ||
| 108 | thisCol = helper_dimmer(RGB_ORANGE); | ||
| 109 | thisInd = 0; | ||
| 110 | break; | ||
| 111 | } | ||
| 112 | helper_painter(led_min, led_max, thisCol, thisInd); | ||
| 113 | return false; | ||
| 114 | } | ||
| 115 | |||
| 116 | // Hook into shutdown code to make all perkey LED's red on hitting reset | ||
| 117 | void shutdown_rgb(void) { | ||
| 118 | // Flash all the key LED's red on shutdown | ||
| 119 | uint16_t timer_start = timer_read(); | ||
| 120 | rgb_matrix_set_color_all(RGB_CORAL); | ||
| 121 | // Delay until this registers | ||
| 122 | while(timer_elapsed(timer_start) < 250) {wait_ms(1);} | ||
| 123 | } | ||
diff --git a/users/bbaserdem/bb-rgb.h b/users/bbaserdem/bb-rgb.h deleted file mode 100644 index 3e96b997fe..0000000000 --- a/users/bbaserdem/bb-rgb.h +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | /* Copyright 2021 Batuhan Başerdem | ||
| 2 | * <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #pragma once | ||
| 18 | #include "bbaserdem.h" | ||
| 19 | |||
| 20 | /* Hooks involving perkey RGB LEDs | ||
| 21 | */ | ||
| 22 | |||
| 23 | // For custom indicators | ||
| 24 | bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max); | ||
| 25 | // Hook into shutdown code | ||
| 26 | void shutdown_rgb(void); | ||
| 27 | void suspend_wakeup_init_rgb(void); | ||
| 28 | void suspend_power_down_rgb(void); | ||
diff --git a/users/bbaserdem/bb-underglow.c b/users/bbaserdem/bb-underglow.c deleted file mode 100644 index 69aae439f4..0000000000 --- a/users/bbaserdem/bb-underglow.c +++ /dev/null | |||
| @@ -1,116 +0,0 @@ | |||
| 1 | /* Copyright 2021 Batuhan Başerdem | ||
| 2 | * <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #include "bb-underglow.h" | ||
| 18 | |||
| 19 | /* UNDERGLOW IMPLEMENTATION | ||
| 20 | */ | ||
| 21 | |||
| 22 | // Define the layer switching code | ||
| 23 | |||
| 24 | // An empty layer on the base | ||
| 25 | const rgblight_segment_t PROGMEM bb_base_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 26 | {0, 0, HSV_WHITE} | ||
| 27 | ); | ||
| 28 | // Gaming layer is turquoise | ||
| 29 | const rgblight_segment_t PROGMEM bb_game_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 30 | {RGBLIGHT_LEFT_BEG, RGBLIGHT_LEFT_NUM, HSV_PURPLE} | ||
| 31 | ); | ||
| 32 | // Character overlay is chartereuse | ||
| 33 | const rgblight_segment_t PROGMEM bb_char_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 34 | {0, RGBLED_NUM, HSV_GOLD} | ||
| 35 | ); | ||
| 36 | |||
| 37 | // Right-hand layers | ||
| 38 | |||
| 39 | // Media layer is orange | ||
| 40 | const rgblight_segment_t PROGMEM bb_medi_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 41 | {RGBLIGHT_RIGHT_BEG, RGBLIGHT_RIGHT_NUM, HSV_MAGENTA} | ||
| 42 | ); | ||
| 43 | // Navigation layer is green | ||
| 44 | const rgblight_segment_t PROGMEM bb_navi_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 45 | {RGBLIGHT_RIGHT_BEG, RGBLIGHT_RIGHT_NUM, HSV_GREEN} | ||
| 46 | ); | ||
| 47 | // Symbol layer is purple | ||
| 48 | const rgblight_segment_t PROGMEM bb_symb_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 49 | {RGBLIGHT_RIGHT_BEG, RGBLIGHT_RIGHT_NUM, HSV_YELLOW} | ||
| 50 | ); | ||
| 51 | |||
| 52 | // Left-hand layers | ||
| 53 | |||
| 54 | // Number layer is blue | ||
| 55 | const rgblight_segment_t PROGMEM bb_numb_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 56 | {RGBLIGHT_LEFT_BEG, RGBLIGHT_LEFT_NUM, HSV_BLUE} | ||
| 57 | ); | ||
| 58 | // Function layer is red | ||
| 59 | const rgblight_segment_t PROGMEM bb_func_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 60 | {RGBLIGHT_LEFT_BEG, RGBLIGHT_LEFT_NUM, HSV_RED} | ||
| 61 | ); | ||
| 62 | // Pointer layer is yellow | ||
| 63 | const rgblight_segment_t PROGMEM bb_mous_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 64 | {RGBLIGHT_LEFT_BEG, RGBLIGHT_LEFT_NUM, HSV_SPRINGGREEN} | ||
| 65 | ); | ||
| 66 | |||
| 67 | // Music playback layer is magenta | ||
| 68 | const rgblight_segment_t PROGMEM bb_musi_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 69 | {0, RGBLED_NUM, HSV_ORANGE} | ||
| 70 | ); | ||
| 71 | |||
| 72 | const rgblight_segment_t* const PROGMEM bb_rgb_layers[] = RGBLIGHT_LAYERS_LIST( | ||
| 73 | bb_base_layer, | ||
| 74 | bb_char_layer, | ||
| 75 | bb_game_layer, | ||
| 76 | bb_medi_layer, | ||
| 77 | bb_navi_layer, | ||
| 78 | bb_symb_layer, | ||
| 79 | bb_numb_layer, | ||
| 80 | bb_func_layer, | ||
| 81 | bb_mous_layer, | ||
| 82 | bb_musi_layer | ||
| 83 | ); | ||
| 84 | |||
| 85 | // Enable the LED switching layers | ||
| 86 | void keyboard_post_init_underglow(void) { | ||
| 87 | rgblight_layers = bb_rgb_layers; | ||
| 88 | // Default rgb mode is rainbow swirl; set this | ||
| 89 | rgblight_sethsv_noeeprom(100, 255, 255); | ||
| 90 | rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL + 0); | ||
| 91 | } | ||
| 92 | |||
| 93 | // Set RGBLIGHT state depending on layer | ||
| 94 | layer_state_t layer_state_set_underglow(layer_state_t state) { | ||
| 95 | // Activate layers if on that region | ||
| 96 | rgblight_set_layer_state(_BASE, layer_state_cmp(state, _BASE)); | ||
| 97 | rgblight_set_layer_state(_GAME, layer_state_cmp(state, _GAME)); | ||
| 98 | rgblight_set_layer_state(_CHAR, layer_state_cmp(state, _CHAR)); | ||
| 99 | rgblight_set_layer_state(_MEDI, layer_state_cmp(state, _MEDI)); | ||
| 100 | rgblight_set_layer_state(_NAVI, layer_state_cmp(state, _NAVI)); | ||
| 101 | rgblight_set_layer_state(_SYMB, layer_state_cmp(state, _SYMB)); | ||
| 102 | rgblight_set_layer_state(_NUMB, layer_state_cmp(state, _NUMB)); | ||
| 103 | rgblight_set_layer_state(_FUNC, layer_state_cmp(state, _FUNC)); | ||
| 104 | rgblight_set_layer_state(_MOUS, layer_state_cmp(state, _MOUS)); | ||
| 105 | rgblight_set_layer_state(_MUSI, layer_state_cmp(state, _MUSI)); | ||
| 106 | // Return so other stuff can be done | ||
| 107 | return state; | ||
| 108 | } | ||
| 109 | |||
| 110 | // Hook into shutdown code | ||
| 111 | void shutdown_underglow(void) { | ||
| 112 | // Make the LED's red on shutdown | ||
| 113 | rgblight_enable_noeeprom(); | ||
| 114 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); | ||
| 115 | rgblight_sethsv(HSV_WHITE); | ||
| 116 | } | ||
diff --git a/users/bbaserdem/bb-underglow.h b/users/bbaserdem/bb-underglow.h deleted file mode 100644 index 9cc1db3757..0000000000 --- a/users/bbaserdem/bb-underglow.h +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | /* Copyright 2021 Batuhan Başerdem | ||
| 2 | * <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #pragma once | ||
| 18 | #include "bbaserdem.h" | ||
| 19 | |||
| 20 | /* UNDERGLOW IMPLEMENTATION | ||
| 21 | */ | ||
| 22 | |||
| 23 | // Used to initialize layer switching overlay | ||
| 24 | void keyboard_post_init_underglow(void); | ||
| 25 | // Used to change RGB underglow layers on keymap layer change | ||
| 26 | layer_state_t layer_state_set_underglow(layer_state_t state); | ||
| 27 | // Hook into shutdown to show effect on shutdown | ||
| 28 | void shutdown_underglow(void); | ||
diff --git a/users/bbaserdem/bbaserdem.c b/users/bbaserdem/bbaserdem.c deleted file mode 100644 index e0e204c302..0000000000 --- a/users/bbaserdem/bbaserdem.c +++ /dev/null | |||
| @@ -1,376 +0,0 @@ | |||
| 1 | /* Copyright 2021 Batuhan Başerdem | ||
| 2 | * <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include "bbaserdem.h" | ||
| 19 | // Language imports | ||
| 20 | #include <sendstring_dvorak.h> | ||
| 21 | // Need memcpy and memcmp from string.h along with transfer stuff | ||
| 22 | #ifdef SPLIT_KEYBOARD | ||
| 23 | #include "transactions.h" | ||
| 24 | #include <string.h> | ||
| 25 | #endif // SPLIT_KEYBOARD | ||
| 26 | |||
| 27 | /*-------------------------*\ | ||
| 28 | |*-----KEYBOARD CONFIG-----*| | ||
| 29 | \*-------------------------*/ | ||
| 30 | userspace_config_t userspace_config; | ||
| 31 | userspace_runtime_t userspace_runtime; | ||
| 32 | |||
| 33 | /*---------------------------------*\ | ||
| 34 | |*----SPLIT KEYBOARD TRANSPORT-----*| | ||
| 35 | \*---------------------------------*/ | ||
| 36 | #ifdef SPLIT_KEYBOARD | ||
| 37 | userspace_config_t transport_userspace_config; | ||
| 38 | userspace_runtime_t transport_userspace_runtime; | ||
| 39 | |||
| 40 | // Translate the RPC data to the local variable | ||
| 41 | void userspace_config_sync(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) { | ||
| 42 | // Copy incoming data to local variable | ||
| 43 | if (in_buflen == sizeof(transport_userspace_config)) { | ||
| 44 | memcpy(&transport_userspace_config, in_data, in_buflen); | ||
| 45 | } | ||
| 46 | // There is no data to send back; so no output handling | ||
| 47 | } | ||
| 48 | void userspace_runtime_sync(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) { | ||
| 49 | // Copy incoming data to local variable | ||
| 50 | if (in_buflen == sizeof(transport_userspace_runtime)) { | ||
| 51 | memcpy(&transport_userspace_runtime, in_data, in_buflen); | ||
| 52 | } | ||
| 53 | // There is no data to send back; so no output handling | ||
| 54 | } | ||
| 55 | |||
| 56 | // Either send or receive the correct data | ||
| 57 | void userspace_transport_update(void) { | ||
| 58 | if (is_keyboard_master()) { | ||
| 59 | // If we are the main device; we want to send info. | ||
| 60 | transport_userspace_config.raw = userspace_config.raw; | ||
| 61 | transport_userspace_runtime.raw = userspace_runtime.raw; | ||
| 62 | } else { | ||
| 63 | // If we are the secondary device; we want to receive info, and save to eeprom. | ||
| 64 | userspace_config.raw = transport_userspace_config.raw; | ||
| 65 | userspace_runtime.raw = transport_userspace_runtime.raw; | ||
| 66 | } | ||
| 67 | } | ||
| 68 | |||
| 69 | // Initiate the protocol on sync | ||
| 70 | void userspace_transport_sync(bool force_sync) { | ||
| 71 | if (is_keyboard_master()) { | ||
| 72 | // Keep track of the last state | ||
| 73 | static userspace_config_t last_userspace_config; | ||
| 74 | static userspace_runtime_t last_userspace_runtime; | ||
| 75 | bool needs_sync = false; | ||
| 76 | |||
| 77 | // Check if the config values are different | ||
| 78 | if (memcmp(&transport_userspace_config, &last_userspace_config, sizeof(transport_userspace_config))) { | ||
| 79 | needs_sync = true; | ||
| 80 | memcpy(&last_userspace_config, &transport_userspace_config, sizeof(transport_userspace_config)); | ||
| 81 | } | ||
| 82 | // Perform the sync if requested | ||
| 83 | if (needs_sync || force_sync) { | ||
| 84 | transaction_rpc_send(RPC_ID_CONFIG_SYNC, sizeof(transport_userspace_config), &transport_userspace_config); | ||
| 85 | needs_sync = false; | ||
| 86 | } | ||
| 87 | |||
| 88 | // Check if the runtime values are different | ||
| 89 | if (memcmp(&transport_userspace_runtime, &last_userspace_runtime, sizeof(transport_userspace_runtime))) { | ||
| 90 | needs_sync = true; | ||
| 91 | memcpy(&last_userspace_runtime, &transport_userspace_runtime, sizeof(transport_userspace_runtime)); | ||
| 92 | } | ||
| 93 | |||
| 94 | // Perform the sync if requested | ||
| 95 | if (needs_sync || force_sync) { | ||
| 96 | transaction_rpc_send(RPC_ID_RUNTIME_SYNC, sizeof(transport_userspace_runtime), &transport_userspace_runtime); | ||
| 97 | needs_sync = false; | ||
| 98 | } | ||
| 99 | } | ||
| 100 | } | ||
| 101 | #endif // SPLIT_KEYBOARD | ||
| 102 | |||
| 103 | /*---------------------------*\ | ||
| 104 | |*-----KEYBOARD PRE INIT-----*| | ||
| 105 | \*---------------------------*/ | ||
| 106 | /* This code runs before anything is started. | ||
| 107 | * Good for early hardware setup | ||
| 108 | */ | ||
| 109 | __attribute__ ((weak)) void keyboard_pre_init_keymap(void) {} | ||
| 110 | __attribute__ ((weak)) void keyboard_pre_init_user(void) { | ||
| 111 | // Keymap specific stuff | ||
| 112 | keyboard_pre_init_keymap(); | ||
| 113 | } | ||
| 114 | |||
| 115 | /*---------------------*\ | ||
| 116 | |*-----MATRIX INIT-----*| | ||
| 117 | \*---------------------*/ | ||
| 118 | /* This code runs once midway thru the firmware process. | ||
| 119 | * So far, sets the base layer and fixes unicode mode | ||
| 120 | */ | ||
| 121 | __attribute__ ((weak)) void matrix_init_keymap(void) {} | ||
| 122 | void matrix_init_user (void) { | ||
| 123 | // Keymap specific things | ||
| 124 | matrix_init_keymap(); | ||
| 125 | } | ||
| 126 | |||
| 127 | /*----------------------------*\ | ||
| 128 | |*-----KEYBOARD POST INIT-----*| | ||
| 129 | \*----------------------------*/ | ||
| 130 | /* This code runs after anything is started. | ||
| 131 | * Good for late hardware setup, like setting up layer specifications | ||
| 132 | */ | ||
| 133 | __attribute__ ((weak)) void keyboard_post_init_keymap(void) {} | ||
| 134 | __attribute__ ((weak)) void keyboard_post_init_user(void) { | ||
| 135 | // Fix beginning base layer, in case some other firmware was flashed | ||
| 136 | // set_single_persistent_default_layer(_BASE); | ||
| 137 | |||
| 138 | // Unicode mode | ||
| 139 | # ifdef UNICODEMAP_ENABLE | ||
| 140 | set_unicode_input_mode(UC_LNX); | ||
| 141 | # endif // UNICODEMAP_ENABLE | ||
| 142 | |||
| 143 | // Split keyboard halves communication | ||
| 144 | # ifdef SPLIT_KEYBOARD | ||
| 145 | // Register the transactions | ||
| 146 | transaction_register_rpc( RPC_ID_CONFIG_SYNC, userspace_config_sync ); | ||
| 147 | transaction_register_rpc(RPC_ID_RUNTIME_SYNC, userspace_runtime_sync); | ||
| 148 | // Load default config values | ||
| 149 | if (is_keyboard_master()) { | ||
| 150 | // If we are main; load from eeconfig | ||
| 151 | userspace_config.raw = eeconfig_read_user(); | ||
| 152 | // And update the transport variable | ||
| 153 | userspace_transport_update(); | ||
| 154 | // Do one forced transfer to sync halves | ||
| 155 | userspace_transport_sync(true); | ||
| 156 | } else { | ||
| 157 | // Just sync the data received | ||
| 158 | userspace_transport_update(); | ||
| 159 | } | ||
| 160 | # else // SPLIT_KEYBOARD | ||
| 161 | // If we are not split; just load from eeprom | ||
| 162 | userspace_config.raw = eeconfig_read_user(); | ||
| 163 | # endif // SPLIT_KEYBOARD | ||
| 164 | |||
| 165 | // Backlight LED | ||
| 166 | # ifdef BACKLIGHT_ENABLE | ||
| 167 | keyboard_post_init_backlight(); | ||
| 168 | # endif // BACKLIGHT_ENABLE | ||
| 169 | |||
| 170 | // RGB underglow | ||
| 171 | # ifdef RGBLIGHT_ENABLE | ||
| 172 | keyboard_post_init_underglow(); | ||
| 173 | # endif // RGBLIGHT_ENABLE | ||
| 174 | |||
| 175 | // Keymap specific stuff | ||
| 176 | keyboard_post_init_keymap(); | ||
| 177 | } | ||
| 178 | |||
| 179 | /*---------------------------*\ | ||
| 180 | |*-----HOUSEKEEPING TASK-----*| | ||
| 181 | \*---------------------------*/ | ||
| 182 | /* I have no idea what this does | ||
| 183 | */ | ||
| 184 | __attribute__ ((weak)) void housekeeping_task_keymap(void) {} | ||
| 185 | void housekeeping_task_user(void) { | ||
| 186 | // Check eeprom every now and then | ||
| 187 | static userspace_config_t prev_userspace_config; | ||
| 188 | static fast_timer_t throttle_timer = 0; | ||
| 189 | static bool init_flag = true; | ||
| 190 | |||
| 191 | // Read this if we never read it before | ||
| 192 | if (init_flag) { | ||
| 193 | init_flag = false; | ||
| 194 | prev_userspace_config.raw = eeconfig_read_user(); | ||
| 195 | } | ||
| 196 | |||
| 197 | // Throttled tasks here | ||
| 198 | if (timer_elapsed_fast(throttle_timer) >= HOUSEKEEPING_THROTTLE_INTERVAL_MS) { | ||
| 199 | // Refresh timer | ||
| 200 | throttle_timer = timer_read_fast(); | ||
| 201 | // Check userspace config for eeprom updates | ||
| 202 | if (memcmp(&prev_userspace_config, &userspace_config, sizeof(userspace_config))) { | ||
| 203 | memcpy(&prev_userspace_config, &userspace_config, sizeof(userspace_config)); | ||
| 204 | eeconfig_update_user(userspace_config.raw); | ||
| 205 | } | ||
| 206 | } | ||
| 207 | |||
| 208 | // Do transport stuff | ||
| 209 | # ifdef SPLIT_KEYBOARD | ||
| 210 | userspace_transport_update(); | ||
| 211 | userspace_transport_sync(false); | ||
| 212 | # endif // SPLIT_KEYBOARD | ||
| 213 | |||
| 214 | // Hook to keymap code | ||
| 215 | housekeeping_task_keymap(); | ||
| 216 | } | ||
| 217 | |||
| 218 | /*-----------------------*\ | ||
| 219 | |*-----EECONFIG INIT-----*| | ||
| 220 | \*-----------------------*/ | ||
| 221 | /* Default values to send to the eeprom | ||
| 222 | */ | ||
| 223 | void eeconfig_init_user(void) { | ||
| 224 | // Set everything to default | ||
| 225 | userspace_config.raw = 0; | ||
| 226 | // Set encoder states to sane defaults if enabled | ||
| 227 | # ifdef ENCODER_ENABLE | ||
| 228 | reset_encoder_state(); | ||
| 229 | # endif // ENCODER_ENABLE | ||
| 230 | } | ||
| 231 | |||
| 232 | /*------------------------*\ | ||
| 233 | |*-----PROCESS RECORD-----*| | ||
| 234 | \*------------------------*/ | ||
| 235 | /* Process record: custom keycodes to process here | ||
| 236 | * Allow also the following codes to hook here as well; | ||
| 237 | * Macro definitions | ||
| 238 | * Audio hooks | ||
| 239 | */ | ||
| 240 | __attribute__ ((weak)) | ||
| 241 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
| 242 | return true; | ||
| 243 | } | ||
| 244 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 245 | // Return after running through all individual hooks | ||
| 246 | return | ||
| 247 | process_record_keymap(keycode, record) && | ||
| 248 | # ifdef AUDIO_ENABLE | ||
| 249 | process_record_audio(keycode, record) && | ||
| 250 | # endif // AUDIO_ENABLE | ||
| 251 | # ifdef ENCODER_ENABLE | ||
| 252 | process_record_encoder(keycode, record) && | ||
| 253 | # endif // ENCODER_ENABLE | ||
| 254 | process_record_macro(keycode, record); | ||
| 255 | } | ||
| 256 | |||
| 257 | /*---------------------*\ | ||
| 258 | |*-----MATRIX SCAN-----*| | ||
| 259 | \*---------------------*/ | ||
| 260 | /* This code runs every frame | ||
| 261 | * I used to check for layer switching here, but layer state is better used. | ||
| 262 | * Try to not put anything here; as it runs hundreds time per second-ish | ||
| 263 | */ | ||
| 264 | __attribute__ ((weak)) void matrix_scan_keymap(void) { } | ||
| 265 | void matrix_scan_user (void) { | ||
| 266 | // Keymap specific scan function | ||
| 267 | matrix_scan_keymap(); | ||
| 268 | } | ||
| 269 | |||
| 270 | /*---------------------*\ | ||
| 271 | |*-----LAYER STATE-----*| | ||
| 272 | \*---------------------*/ | ||
| 273 | /* This code runs after every layer change | ||
| 274 | * State represents the new layer state. | ||
| 275 | */ | ||
| 276 | __attribute__ ((weak)) | ||
| 277 | layer_state_t layer_state_set_keymap (layer_state_t state) { | ||
| 278 | return state; | ||
| 279 | } | ||
| 280 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
| 281 | // Keymap layer state setting | ||
| 282 | state = layer_state_set_keymap(state); | ||
| 283 | // For underglow stuff | ||
| 284 | # ifdef RGBLIGHT_ENABLE | ||
| 285 | state = layer_state_set_underglow(state); | ||
| 286 | # endif // RGBLIGHT_ENABLE | ||
| 287 | // Audio playback | ||
| 288 | # ifdef AUDIO_ENABLE | ||
| 289 | state = layer_state_set_audio(state); | ||
| 290 | # endif // AUDIO_ENABLE | ||
| 291 | |||
| 292 | return state; | ||
| 293 | } | ||
| 294 | |||
| 295 | /*-----------------------------*\ | ||
| 296 | |*-----DEFAULT LAYER STATE-----*| | ||
| 297 | \*-----------------------------*/ | ||
| 298 | /* This code runs after every time default base layer is changed | ||
| 299 | */ | ||
| 300 | __attribute__ ((weak)) | ||
| 301 | layer_state_t default_layer_state_set_keymap (layer_state_t state) { | ||
| 302 | return state; | ||
| 303 | } | ||
| 304 | layer_state_t default_layer_state_set_user(layer_state_t state) { | ||
| 305 | // Keymap level code | ||
| 306 | state = default_layer_state_set_keymap(state); | ||
| 307 | return state; | ||
| 308 | } | ||
| 309 | |||
| 310 | /*------------------------*\ | ||
| 311 | |*-----LED SET KEYMAP-----*| | ||
| 312 | \*------------------------*/ | ||
| 313 | /* Code for LED indicators | ||
| 314 | * I'm not sure when exactly does this code run | ||
| 315 | */ | ||
| 316 | __attribute__ ((weak)) void led_set_keymap(uint8_t usb_led) {} | ||
| 317 | void led_set_user(uint8_t usb_led) { | ||
| 318 | led_set_keymap(usb_led); | ||
| 319 | } | ||
| 320 | |||
| 321 | /*-----------------*\ | ||
| 322 | |*-----SUSPEND-----*| | ||
| 323 | \*-----------------*/ | ||
| 324 | /* Suspend stuff here, mostly for the rgb lighting. | ||
| 325 | */ | ||
| 326 | __attribute__ ((weak)) void suspend_power_down_keymap (void) { } | ||
| 327 | void suspend_power_down_user(void) { | ||
| 328 | suspend_power_down_keymap(); | ||
| 329 | // RGB matrix sleep hook | ||
| 330 | # ifdef RGB_MATRIX_ENABLE | ||
| 331 | suspend_power_down_rgb(); | ||
| 332 | # endif // RGB_MATRIX_ENABLE | ||
| 333 | } | ||
| 334 | __attribute__ ((weak)) void suspend_wakeup_init_keymap (void) { } | ||
| 335 | void suspend_wakeup_init_user(void) { | ||
| 336 | suspend_wakeup_init_keymap(); | ||
| 337 | // RGB matrix sleep hook | ||
| 338 | # ifdef RGB_MATRIX_ENABLE | ||
| 339 | suspend_wakeup_init_rgb(); | ||
| 340 | # endif // RGB_MATRIX_ENABLE | ||
| 341 | } | ||
| 342 | |||
| 343 | <<<<<<< HEAD | ||
| 344 | state = layer_state_set_keymap (state); | ||
| 345 | #ifdef RGBLIGHT_ENABLE | ||
| 346 | // Change RGB lighting depending on the last layer activated | ||
| 347 | rgblight_change( get_highest_layer(state) ); | ||
| 348 | #endif | ||
| 349 | return state; | ||
| 350 | ||||||| f439fe6055 | ||
| 351 | state = layer_state_set_keymap (state); | ||
| 352 | #ifdef RGBLIGHT_ENABLE | ||
| 353 | // Change RGB lighting depending on the last layer activated | ||
| 354 | rgblight_change( biton32(state) ); | ||
| 355 | #endif | ||
| 356 | return state; | ||
| 357 | ======= | ||
| 358 | /*------------------*\ | ||
| 359 | |*-----SHUTDOWN-----*| | ||
| 360 | \*------------------*/ | ||
| 361 | /* Shutdown stuff here; for when entering bootmode. | ||
| 362 | */ | ||
| 363 | __attribute__ ((weak)) void shutdown_keymap (void) { } | ||
| 364 | void shutdown_user(void) { | ||
| 365 | // Underglow LED hook on boot | ||
| 366 | # ifdef RGBLIGHT_ENABLE | ||
| 367 | shutdown_underglow(); | ||
| 368 | # endif // RGBLIGHT_ENABLE | ||
| 369 | // Perkey led hook on boot | ||
| 370 | # ifdef RGB_MATRIX_ENABLE | ||
| 371 | shutdown_rgb(); | ||
| 372 | # endif // RGB_MATRIX_ENABLE | ||
| 373 | // Keymap hooks | ||
| 374 | shutdown_keymap(); | ||
| 375 | >>>>>>> upstream/master | ||
| 376 | } | ||
diff --git a/users/bbaserdem/bbaserdem.h b/users/bbaserdem/bbaserdem.h deleted file mode 100644 index bfa083b870..0000000000 --- a/users/bbaserdem/bbaserdem.h +++ /dev/null | |||
| @@ -1,573 +0,0 @@ | |||
| 1 | /* Copyright 2021 Batuhan Başerdem | ||
| 2 | * <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #pragma once | ||
| 18 | #include QMK_KEYBOARD_H | ||
| 19 | #include "quantum.h" | ||
| 20 | #include "keymap_dvorak.h" | ||
| 21 | |||
| 22 | /* Besides loading libraries and definitions, this file has my layout defs | ||
| 23 | * LAYOUTS: | ||
| 24 | * This file has a couple layouts I use; so that the general changes can be | ||
| 25 | * propagated by only editing this file. | ||
| 26 | */ | ||
| 27 | |||
| 28 | // Macros to use, this has base level code so not affected by enabled features | ||
| 29 | #include "bb-macro.h" | ||
| 30 | // Audio from onboard speakers | ||
| 31 | #ifdef AUDIO_ENABLE | ||
| 32 | #include "bb-audio.h" | ||
| 33 | #endif // AUDIO_ENABLE | ||
| 34 | // Keycap backlight using non-rgb LEDs | ||
| 35 | #ifdef BACKLIGHT_ENABLE | ||
| 36 | #include "bb-backlight.h" | ||
| 37 | #endif // BACKLIGHT_ENABLE | ||
| 38 | // Underglow light using rgb LEDs | ||
| 39 | #ifdef RGBLIGHT_ENABLE | ||
| 40 | #include "bb-underglow.h" | ||
| 41 | #endif // RGBLIGHT_ENABLE | ||
| 42 | // Keycap backlight using rgb LEDs | ||
| 43 | #ifdef RGB_MATRIX_ENABLE | ||
| 44 | #include "bb-rgb.h" | ||
| 45 | #endif // RGB_MATRIX_ENABLE | ||
| 46 | // Rotary encoder | ||
| 47 | #ifdef ENCODER_ENABLE | ||
| 48 | #include "bb-encoder.h" | ||
| 49 | #endif // ENCODER_ENABLE | ||
| 50 | // Oled screen | ||
| 51 | #ifdef OLED_ENABLE | ||
| 52 | #include "bb-oled.h" | ||
| 53 | #endif // OLED_ENABLE | ||
| 54 | |||
| 55 | // Structure to keep runtime info on encoder state | ||
| 56 | typedef union { | ||
| 57 | uint32_t raw; | ||
| 58 | struct { | ||
| 59 | bool rgb_sleep; | ||
| 60 | }; | ||
| 61 | } userspace_runtime_t; | ||
| 62 | |||
| 63 | typedef union { | ||
| 64 | uint32_t raw; | ||
| 65 | struct { | ||
| 66 | uint8_t e0base :4; // ( 4:0) The encoder state on most layers; regular function | ||
| 67 | uint8_t e1base :4; // ( 8:1) 9 states for this; 4 bits | ||
| 68 | uint8_t e0point :2; // (10:1) The encoder state on mouse layer; moves pointer | ||
| 69 | uint8_t e1point :2; // (12:1) 4 states for this; 2 bits | ||
| 70 | uint8_t e0rgb :4; // (16:2) The encoder state on media layer; controls light | ||
| 71 | uint8_t e1rgb :4; // (20:2) 5 states for this; 3 bits but 4 is better | ||
| 72 | uint8_t layout :2; // (22:2) Stores keymap layout; 3 states is good on 2 bits | ||
| 73 | uint16_t :10; // (32:3) Padding here, free space for 10 more bits | ||
| 74 | }; | ||
| 75 | } userspace_config_t; | ||
| 76 | |||
| 77 | // Broadcast us to everyone else | ||
| 78 | extern userspace_runtime_t userspace_runtime; | ||
| 79 | extern userspace_config_t userspace_config; | ||
| 80 | |||
| 81 | // Function definitions that can be accessed through specific keymaps | ||
| 82 | // Runs before all initialization | ||
| 83 | void keyboard_pre_init_keymap(void); | ||
| 84 | // For code that launches once midway through initialization | ||
| 85 | void matrix_init_keymap(void); | ||
| 86 | // For code that launches after initialization is finished. | ||
| 87 | void keyboard_post_init_keymap(void); | ||
| 88 | // These will be delegated to keymap specific stuff (weak definition) | ||
| 89 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record); | ||
| 90 | // This code runs on every tick | ||
| 91 | void matrix_scan_keymap(void); | ||
| 92 | // This code runs after every layer change | ||
| 93 | layer_state_t layer_state_set_keymap(layer_state_t state); | ||
| 94 | // This code runs when the default layer changes | ||
| 95 | layer_state_t default_layer_state_set_keymap (layer_state_t state); | ||
| 96 | // Some code | ||
| 97 | void housekeeping_task_user(void); | ||
| 98 | // This code runs to set LED states | ||
| 99 | void led_set_keymap(uint8_t usb_led); | ||
| 100 | // For code that runs on suspend | ||
| 101 | void suspend_power_down_keymap(void); | ||
| 102 | void suspend_wakeup_init_keymap(void); | ||
| 103 | // For code that runs on powerdown | ||
| 104 | void shutdown_keymap(void); | ||
| 105 | |||
| 106 | // Make it so that keymaps can use KEYMAP_SAFE_RANGE for custom keycodes | ||
| 107 | #ifdef KEYMAP_SAFE_RANGE | ||
| 108 | #define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE | ||
| 109 | #else | ||
| 110 | #define PLACEHOLDER_SAFE_RANGE SAFE_RANGE | ||
| 111 | #endif | ||
| 112 | |||
| 113 | // Custom macro keycode ranges | ||
| 114 | enum userspace_custom_keycodes { | ||
| 115 | // Safe stuff | ||
| 116 | BB_SAFE = PLACEHOLDER_SAFE_RANGE, | ||
| 117 | // Double entry macros | ||
| 118 | DBL_ANG, | ||
| 119 | DBL_PAR, | ||
| 120 | DBL_CBR, | ||
| 121 | DBL_BRC, | ||
| 122 | // Macro key | ||
| 123 | BB_PGPK, | ||
| 124 | // Unicode strings | ||
| 125 | # ifdef UNICODEMAP_ENABLE | ||
| 126 | BB_LENY, | ||
| 127 | BB_TABL, | ||
| 128 | TR_FLAG, | ||
| 129 | # endif // UNICODEMAP_ENABLE | ||
| 130 | // Encoder buttons | ||
| 131 | # ifdef ENCODER_ENABLE | ||
| 132 | BB_ENC0, | ||
| 133 | BB_ENC1, | ||
| 134 | # endif // ENCODER_ENABLE | ||
| 135 | // Oled editor | ||
| 136 | # ifdef OLED_ENABLE | ||
| 137 | BB_OLED, | ||
| 138 | # endif // OLED_ENABLE | ||
| 139 | //use for keymap specific codes | ||
| 140 | KEYMAP_SAFE_RANGE | ||
| 141 | }; | ||
| 142 | // Mask these keycodes if required features are not enabled | ||
| 143 | #ifndef UNICODEMAP_ENABLE | ||
| 144 | #define BB_LENY KC_NO | ||
| 145 | #define BB_TABL KC_NO | ||
| 146 | #define TR_FLAG KC_NO | ||
| 147 | #endif // UNICODEMAP_ENABLE | ||
| 148 | #ifndef ENCODER_ENABLE | ||
| 149 | #define BB_ENC0 KC_NO | ||
| 150 | #define BB_ENC1 KC_NO | ||
| 151 | #endif // ENCODER_ENABLE | ||
| 152 | |||
| 153 | /// Enumerate of layers | ||
| 154 | enum userspace_layers { | ||
| 155 | _BASE = 0, // Base layer | ||
| 156 | _CHAR, // Characters layer | ||
| 157 | _GAME, // Game layer | ||
| 158 | _MEDI, // R3: Media layer | ||
| 159 | _NAVI, // R3: Navigation layer | ||
| 160 | _SYMB, // R1: Symbols layer | ||
| 161 | _NUMB, // L1: Numbers layer | ||
| 162 | _FUNC, // L2: Function keys layer | ||
| 163 | _MOUS, // L3: Mouse keys layer | ||
| 164 | _MUSI // Music overlay | ||
| 165 | }; | ||
| 166 | |||
| 167 | // Use 7 wide characters for keymaps, to keep things aligned with 4 tabs | ||
| 168 | #define _______ KC_TRNS | ||
| 169 | #define XXXXXXX KC_NO | ||
| 170 | |||
| 171 | // These defines allow multiple multi-parameter definitions to expand | ||
| 172 | // for these boards | ||
| 173 | #define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) | ||
| 174 | #define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) | ||
| 175 | #define LAYOUT_ortho_5x15_wrapper(...) LAYOUT_ortho_5x15(__VA_ARGS__) | ||
| 176 | #define LAYOUT_ortho_3x10_wrapper(...) LAYOUT_ortho_3x10(__VA_ARGS__) | ||
| 177 | #define LAYOUT_split_3x6_3_wrapper(...) LAYOUT_split_3x6_3(__VA_ARGS__) | ||
| 178 | #define LAYOUT_split_3x5_3_wrapper(...) LAYOUT_split_3x5_3(__VA_ARGS__) | ||
| 179 | |||
| 180 | // Masks | ||
| 181 | #define ___1___ _______ | ||
| 182 | #define ___2___ _______,_______ | ||
| 183 | #define ___3___ _______,_______,_______ | ||
| 184 | #define ___4___ _______,_______,_______,_______ | ||
| 185 | #define ___5___ _______,_______,_______,_______,_______ | ||
| 186 | #define ___6___ _______,_______,_______,_______,_______,_______ | ||
| 187 | #define xxx1xxx KC_NO | ||
| 188 | #define xxx2xxx KC_NO, KC_NO | ||
| 189 | #define xxx3xxx KC_NO, KC_NO, KC_NO | ||
| 190 | #define xxx4xxx KC_NO, KC_NO, KC_NO, KC_NO | ||
| 191 | #define xxx5xxx KC_NO, KC_NO, KC_NO, KC_NO, KC_NO | ||
| 192 | #define xxx6xxx KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO | ||
| 193 | #define xxx1xxx KC_NO | ||
| 194 | #define xxx3xxx KC_NO, KC_NO, KC_NO | ||
| 195 | #define xxx5xxx KC_NO, KC_NO, KC_NO, KC_NO, KC_NO | ||
| 196 | #define xxx6xxx KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO | ||
| 197 | |||
| 198 | // Quick macros: in dvorak | ||
| 199 | #define BB_UNDO LCTL(KC_SLSH) // Ctrl + Z | ||
| 200 | #define BB_REDO LCTL(KC_T) // Ctrl + Y | ||
| 201 | #define BB_YANK LCTL(KC_I) // Ctrl + C | ||
| 202 | #define BB_CUT LCTL(KC_B) // Ctrl + X | ||
| 203 | #define BB_PSTE LCTL(KC_DOT) // Ctrl + V | ||
| 204 | |||
| 205 | // Audio keys | ||
| 206 | #ifdef AUDIO_ENABLE | ||
| 207 | #define MU_REC KC_LCTL | ||
| 208 | #define MU_STOP KC_LALT | ||
| 209 | #define MU_PLAY KC_LGUI | ||
| 210 | #define MU_FAST KC_UP | ||
| 211 | #define MU_SLOW KC_DOWN | ||
| 212 | #define MU_MASK KC_A | ||
| 213 | #define BB_SND MU_ON | ||
| 214 | #ifdef TAP_DANCE_ENABLE | ||
| 215 | #define MU_TEMP TD(TD_AUDIO_TEMPO) | ||
| 216 | #else // TAP_DANCE_ENABLE | ||
| 217 | #define MU_TEMP KC_DOWN | ||
| 218 | #endif // TAP_DANCE_ENABLE | ||
| 219 | #else // AUDIO_ENABLE | ||
| 220 | #define MU_REC KC_NO | ||
| 221 | #define MU_STOP KC_NO | ||
| 222 | #define MU_PLAY KC_NO | ||
| 223 | #define MU_FAST KC_NO | ||
| 224 | #define MU_TEMP KC_NO | ||
| 225 | #define MU_SLOW KC_NO | ||
| 226 | #define MU_MASK KC_NO | ||
| 227 | #define BB_SND KC_MUTE | ||
| 228 | #endif // AUDIO_ENABLE | ||
| 229 | |||
| 230 | // Unicode keys | ||
| 231 | #ifdef UNICODEMAP_ENABLE | ||
| 232 | #define TR_ACIR XP(LOW_A_CIRC, UPC_A_CIRC ) | ||
| 233 | #define TR_CCED XP(LOW_C_CEDI, UPC_C_CEDI ) | ||
| 234 | #define TR_GBRE XP(LOW_G_BREV, LOW_G_BREV ) | ||
| 235 | #define TR_ICIR XP(LOW_I_CIRC, LOW_I_CIRC ) | ||
| 236 | #define TR_I_NO XP(LOW_I_DOTL, LOW_I_DOTL ) | ||
| 237 | #define TR_IDOT XP(LOW_I_DOTT, LOW_I_DOTT ) | ||
| 238 | #define TR_ODIA XP(LOW_O_DIAE, LOW_O_DIAE ) | ||
| 239 | #define TR_SCED XP(LOW_S_CEDI, LOW_S_CEDI ) | ||
| 240 | #define TR_UCIR XP(LOW_U_CIRC, LOW_U_CIRC ) | ||
| 241 | #define TR_UDIA XP(LOW_U_DIAE, LOW_U_DIAE ) | ||
| 242 | #define GR_ALP XP(LOW_ALPHA, UPC_ALPHA ) | ||
| 243 | #define GR_BET XP(LOW_BETA, UPC_BETA ) | ||
| 244 | #define GR_GAM XP(LOW_GAMMA, UPC_GAMMA ) | ||
| 245 | #define GR_DEL XP(LOW_DELTA, UPC_DELTA ) | ||
| 246 | #define GR_EPS XP(LOW_EPSILON,UPC_EPSILON) | ||
| 247 | #define GR_ZET XP(LOW_ZETA, UPC_ZETA ) | ||
| 248 | #define GR_ETA XP(LOW_ETA, UPC_ETA ) | ||
| 249 | #define GR_THE XP(LOW_THETA, UPC_THETA ) | ||
| 250 | #define GR_IOT XP(LOW_IOTA, UPC_IOTA ) | ||
| 251 | #define GR_KAP XP(LOW_KAPPA, UPC_KAPPA ) | ||
| 252 | #define GR_LAM XP(LOW_LAMBDA, UPC_LAMBDA ) | ||
| 253 | #define GR_MU XP(LOW_MU, UPC_MU ) | ||
| 254 | #define GR_NU XP(LOW_NU, UPC_NU ) | ||
| 255 | #define GR_XI XP(LOW_XI, UPC_XI ) | ||
| 256 | #define GR_OMI XP(LOW_OMICRON,UPC_OMICRON) | ||
| 257 | #define GR_PI XP(LOW_PI, UPC_PI ) | ||
| 258 | #define GR_RHO XP(LOW_RHO, UPC_RHO ) | ||
| 259 | #define GR_SIG XP(LOW_SIGMA, UPC_SIGMA ) | ||
| 260 | #define GR_TAU XP(LOW_TAU, UPC_TAU ) | ||
| 261 | #define GR_UPS XP(LOW_UPSILON,UPC_UPSILON) | ||
| 262 | #define GR_PHI XP(LOW_PHI, UPC_PHI ) | ||
| 263 | #define GR_CHI XP(LOW_CHI, UPC_CHI ) | ||
| 264 | #define GR_PSI XP(LOW_PSI, UPC_PSI ) | ||
| 265 | #define GR_OME XP(LOW_OMEGA, UPC_OMEGA ) | ||
| 266 | #define BB_ELLI X(ELLIPSIS) | ||
| 267 | #define BB_PLNK X(PLANCK_CON) | ||
| 268 | #define BB_ANGS X(ANGSTROM) | ||
| 269 | #define BB_BITC X(BITCOIN) | ||
| 270 | #else // UNICODEMAP_ENABLE | ||
| 271 | #define TR_ACIR KC_A | ||
| 272 | #define TR_CCED KC_C | ||
| 273 | #define TR_GBRE KC_G | ||
| 274 | #define TR_ICIR KC_I | ||
| 275 | #define TR_I_NO KC_I | ||
| 276 | #define TR_IDOT KC_I | ||
| 277 | #define TR_ODIA KC_O | ||
| 278 | #define TR_SCED KC_S | ||
| 279 | #define TR_UCIR KC_U | ||
| 280 | #define TR_UDIA KC_U | ||
| 281 | #define GR_ALP KC_NO | ||
| 282 | #define GR_BET KC_NO | ||
| 283 | #define GR_GAM KC_NO | ||
| 284 | #define GR_DEL KC_NO | ||
| 285 | #define GR_EPS KC_NO | ||
| 286 | #define GR_ZET KC_NO | ||
| 287 | #define GR_ETA KC_NO | ||
| 288 | #define GR_THE KC_NO | ||
| 289 | #define GR_IOT KC_NO | ||
| 290 | #define GR_KAP KC_NO | ||
| 291 | #define GR_LAM KC_NO | ||
| 292 | #define GR_MU KC_NO | ||
| 293 | #define GR_NU KC_NO | ||
| 294 | #define GR_XI KC_NO | ||
| 295 | #define GR_OMI KC_NO | ||
| 296 | #define GR_PI KC_NO | ||
| 297 | #define GR_RHO KC_NO | ||
| 298 | #define GR_SIG KC_NO | ||
| 299 | #define GR_TAU KC_NO | ||
| 300 | #define GR_UPS KC_NO | ||
| 301 | #define GR_PHI KC_NO | ||
| 302 | #define GR_CHI KC_NO | ||
| 303 | #define GR_PSI KC_NO | ||
| 304 | #define GR_OME KC_NO | ||
| 305 | #define BB_ELLI KC_NO | ||
| 306 | #define BB_PLNK KC_NO | ||
| 307 | #define BB_ANGS KC_NO | ||
| 308 | #define BB_BITC KC_NO | ||
| 309 | #endif // UNICODEMAP_ENABLE | ||
| 310 | |||
| 311 | // MOD-tap definitions | ||
| 312 | #define GUI_A MT(MOD_LGUI, DV_A) | ||
| 313 | #define ALT_O MT(MOD_LALT, DV_O) | ||
| 314 | #define CTRL_E MT(MOD_LCTL, DV_E) | ||
| 315 | #define SHIFT_U MT(MOD_LSFT, DV_U) | ||
| 316 | #define ALTGR_Q MT(MOD_RALT, DV_Q) | ||
| 317 | #define GUI_S MT(MOD_RGUI, DV_S) | ||
| 318 | #define ALT_N MT(MOD_LALT, DV_N) | ||
| 319 | #define CTRL_T MT(MOD_LCTL, DV_T) | ||
| 320 | #define SHIFT_H MT(MOD_LSFT, DV_H) | ||
| 321 | #define ALTGR_V MT(MOD_RALT, DV_V) | ||
| 322 | |||
| 323 | // Layer switches | ||
| 324 | #define MED_DEL LT(_MEDI, KC_DEL ) | ||
| 325 | #define NAV_TAB LT(_NAVI, KC_TAB ) | ||
| 326 | #define SYM_SPC LT(_SYMB, KC_SPC ) | ||
| 327 | #define NUM_ENT LT(_NUMB, KC_ENT ) | ||
| 328 | #define FUN_ESC LT(_FUNC, KC_ESC ) | ||
| 329 | #define MOU_BSP LT(_MOUS, KC_BSPC) | ||
| 330 | |||
| 331 | // Layer switches | ||
| 332 | #define BB_CHAR OSL(_CHAR) | ||
| 333 | #define BB_GAME TG(_GAME) | ||
| 334 | |||
| 335 | /* Depending on how the layouts change with language; the keys are shown as; | ||
| 336 | * ┌────────────────────────────────────────────────┐ | ||
| 337 | * │AltGr -none- Shift Shift+AltGr │ | ||
| 338 | * └────────────────────────────────────────────────┘ | ||
| 339 | * If there is an exclamation mark; it indicates a dead key on this map. | ||
| 340 | */ | ||
| 341 | |||
| 342 | /* Base layout | ||
| 343 | * DVORAK | ||
| 344 | * ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ | ||
| 345 | * ` ~ │ ' " │ , < │ . > │ p P │ y Y │ │ f F │ g G │ c C │ r R │ l L │ < > | ||
| 346 | * ├─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┤ | ||
| 347 | * \ | │ a A │ o O │ e E │ u U │ i I │ │ d D │ h H │ t T │ n N │ s S │ - _ | ||
| 348 | * ├─Gui─┼─Alt─┼─Ctr─┼─Sft─┼─────┤ ├─────┼─Sft─┼─Ctr─┼─Alt─┼─Gui─┤ | ||
| 349 | * / ? │ ; : │ q Q │ j J │ k K │ x X │ │ b B │ m M │ w W │ v V │ z Z │ = + | ||
| 350 | * └─────┴AltGr┴─────┼─────┼─────┼─────┐ ┌─────┼─────┼─────┼─────┴AltGr┴─────┘ | ||
| 351 | * │ Del │ Tab │Space│ │Enter│ Esc │BkSpc│ | ||
| 352 | * └─Med─┴─Nav─┴─Sym─┘ └─Num─┴─Fun─┴─Mou─┘ | ||
| 353 | * TURKISH F | ||
| 354 | * ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ | ||
| 355 | * ¬+ *±│@f F │ g G │ ğ Ğ │¶ı I │ôo OÔ│ │¥d D │®r R │ n N │°h H │£p P │|< >¦ | ||
| 356 | * !├─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼────!┤ ! | ||
| 357 | * `x Xà│ûu UÛ│îi İÎ│€e E │âa AÂ│ûü ÜÛ│ │₺t T │ k K │µm M │ l L │´y Yá│#ş Şǎ | ||
| 358 | * ! !├─Gui─┼─Alt─┼─Ctr─┼─Sft─┼─────┤ ├─────┼─Sft─┼─Ctr─┼─Alt!┼─Gui─┤ | ||
| 359 | * äq Qå│«j J<│»ö Ö>│“v V │¢c C©│”ç Ç │ │ z Z │§s S │×b B │÷. :ȧ│·, ; │~w W | ||
| 360 | * └─────┴AltGr┴─────┼─────┼─────┼─────┐ ┌─────┼─────┼─────┼─────┴AltGr┴─────┘ | ||
| 361 | * │ Del │ Tab │Space│ │Enter│ Esc │BkSpc│ | ||
| 362 | * └─Med─┴─Nav─┴─Sym─┘ └─Num─┴─Fun─┴─Mou─┘ | ||
| 363 | * The thing about this layout is that these will fit most boards I have. | ||
| 364 | */ | ||
| 365 | #define _BL1_5_ DV_QUOT,DV_COMM,DV_DOT, DV_P, DV_Y | ||
| 366 | #define _BR1_5_ DV_F, DV_G, DV_C, DV_R, DV_L | ||
| 367 | #define _BL2_5_ GUI_A, ALT_O, CTRL_E, SHIFT_U,DV_I | ||
| 368 | #define _BR2_5_ DV_D, SHIFT_H,CTRL_T, ALT_N, GUI_S | ||
| 369 | #define _BL3_5_ DV_SCLN,ALTGR_Q,DV_J, DV_K, DV_X | ||
| 370 | #define _BR3_5_ DV_B, DV_M, DV_W, ALTGR_V,DV_Z | ||
| 371 | #define _BL4_3_ MED_DEL,NAV_TAB,SYM_SPC | ||
| 372 | #define _BR4_3_ NUM_ENT,FUN_ESC,MOU_BSP | ||
| 373 | // The extra line for the 6th (or 0th) row | ||
| 374 | #define _BL1_1_ DV_GRV | ||
| 375 | #define _BR1_1_ KC_NUBS | ||
| 376 | #define _BL2_1_ DV_BSLS | ||
| 377 | #define _BR2_1_ DV_MINS | ||
| 378 | #define _BL3_1_ DV_SLSH | ||
| 379 | #define _BR3_1_ DV_EQL | ||
| 380 | |||
| 381 | /* Extra characters layer | ||
| 382 | * This is accessed using unicode; so IBus compatible apps only. | ||
| 383 | * ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ | ||
| 384 | * │TrFlg│Lenny│Table│ π │ υ │ │ φ │ γ │ χ │ ρ │ λ │ | ||
| 385 | * ├─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┤ | ||
| 386 | * │ α │ ο │ ε │ ψ │ ι │ │ δ │ η │ τ │ ν │ σ │ | ||
| 387 | * ├─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┤ | ||
| 388 | * │ ₿ │ θ │ ℏ │ κ │ ξ │ │ β │ μ │ ω │ Å │ ζ │ | ||
| 389 | * └─────┴─────┴─────┼─────┼─────┼─────┐ ┌─────┼─────┼─────┼─────┴─────┴─────┘ | ||
| 390 | * │ Shf │ ... │ GPG │ │ │ │ Shf │ | ||
| 391 | * └─────┴─────┴─────┘ └─────┴─────┴─────┘ | ||
| 392 | * | ||
| 393 | */ | ||
| 394 | #define _CL1_5_ TR_FLAG,BB_LENY,BB_TABL,GR_PI, GR_UPS | ||
| 395 | #define _CR1_5_ GR_PHI, GR_GAM, GR_CHI, GR_RHO, GR_LAM | ||
| 396 | #define _CL2_5_ GR_ALP, GR_OMI, GR_EPS, GR_PSI, GR_IOT | ||
| 397 | #define _CR2_5_ GR_DEL, GR_ETA, GR_TAU, GR_NU, GR_SIG | ||
| 398 | #define _CL3_5_ BB_BITC,GR_THE, BB_PLNK,GR_KAP, GR_XI | ||
| 399 | #define _CR3_5_ GR_BET, GR_MU, GR_OME, BB_ANGS,GR_ZET | ||
| 400 | #define _CL4_3_ KC_RSFT,BB_ELLI,BB_PGPK | ||
| 401 | #define _CR4_3_ XXXXXXX,XXXXXXX,KC_LSFT | ||
| 402 | |||
| 403 | /* Game layer | ||
| 404 | * This layer turns off the tap-hold keys for the left half. | ||
| 405 | * ┌─────┬─────┬─────┬─────┬─────┐ | ||
| 406 | * │ Q │ W │ E │ R │ T │ | ||
| 407 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 408 | * Tab │ A │ S │ D │ F │ G │ | ||
| 409 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 410 | * Shift│ Z │ X │ C │ V │ B │ | ||
| 411 | * └─────┴─────┴─────┼─────┼─────┼─────┐ | ||
| 412 | * │ Esc │Enter│Space│ | ||
| 413 | * └─────┴─────┴─────┘ | ||
| 414 | */ | ||
| 415 | #define _GA1_5_ KC_Q, KC_W, KC_E, KC_R, KC_T | ||
| 416 | #define _GA1_1_ _______ | ||
| 417 | #define _GA2_5_ KC_A, KC_S, KC_D, KC_F, KC_G | ||
| 418 | #define _GA2_1_ KC_TAB | ||
| 419 | #define _GA3_5_ KC_Z, KC_X, KC_C, KC_V, KC_B | ||
| 420 | #define _GA3_1_ KC_LSFT | ||
| 421 | #define _GA4_3_ KC_ESC, KC_ENT, KC_SPC | ||
| 422 | |||
| 423 | /* Media layer | ||
| 424 | * ┌─────┬─────┬─────┬─────┬─────┐ | ||
| 425 | * │Speed│ Mod │ Hue │ Sat │ Bri │ RGB light control | ||
| 426 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 427 | * │Togg.│Prev.│MuTog│MuStp│Next │ Media control | ||
| 428 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 429 | * │Sink │Vol -│ Mut │Eject│Vol +│ Volume control | ||
| 430 | * ┌─────┼─────┼─────┼─────┴─────┴─────┘ | ||
| 431 | * │OledL│Veloc│Music│ Feature control on keyboard | ||
| 432 | * └─────┴─────┴─────┘ | ||
| 433 | */ | ||
| 434 | #define _ME1_5_ RGB_SPI,RGB_MOD,RGB_HUI,RGB_SAI,RGB_VAI | ||
| 435 | #define _ME2_5_ RGB_TOG,KC_MPRV,KC_MPLY,KC_MSTP,KC_MNXT | ||
| 436 | #define _ME3_5_ KC_F13, KC_VOLD,KC_MUTE,KC_EJCT,KC_VOLU | ||
| 437 | #define _ME4_3_ BB_OLED,VLK_TOG,MU_TOG | ||
| 438 | |||
| 439 | /* Navigation layer | ||
| 440 | * ┌─────┬─────┬─────┬─────┬─────┐ | ||
| 441 | * │Redo │Paste│Yank │ Cut │PrScr│ | ||
| 442 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 443 | * │Undo │ < │ v │ ^ │ > │ | ||
| 444 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 445 | * │ Ins │Home │PgDwn│PgUp │ End │ | ||
| 446 | * ┌─────┼─────┼─────┼─────┴─────┴─────┘ | ||
| 447 | * │Enter│ Esc │BkSpc│ | ||
| 448 | * └─────┴─────┴─────┘ | ||
| 449 | */ | ||
| 450 | #define _NA1_5_ BB_REDO,BB_PSTE,BB_YANK,BB_CUT, KC_PSCR | ||
| 451 | #define _NA2_5_ BB_UNDO,KC_LEFT,KC_DOWN,KC_UP, KC_RGHT | ||
| 452 | #define _NA3_5_ KC_INS, KC_HOME,KC_PGDN,KC_PGUP,KC_END | ||
| 453 | #define _NA4_3_ KC_ENT, KC_ESC, KC_BSPC | ||
| 454 | |||
| 455 | /* Symbols layer | ||
| 456 | * This layer has the central columns shifted for convenience | ||
| 457 | * DVORAK | ||
| 458 | * ┌─────┬─────┬─────┬─────┬─────┐ | ||
| 459 | * │ ` │ { │ } │ / │ = │ | ||
| 460 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 461 | * │ ~ │ [ │ ] │ ? │ + │ | ||
| 462 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 463 | * │CapsL│ ( │ ) │ \ │ | │ | ||
| 464 | * ┌─────┼─────┼─────┼─────┴─────┴─────┘ | ||
| 465 | * │Enter│ Esc │BkSpc│ | ||
| 466 | * └─────┴─────┴─────┘ | ||
| 467 | * Turkish F | ||
| 468 | * (AltGr is right on the central column, red. keys on main layer are omitted) | ||
| 469 | * ┌─────┬─────┬─────┬─────┬─────┐ | ||
| 470 | * │ + ¬ │ / \ │ - | │ │ │ | ||
| 471 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 472 | * │ * ± │ ? ¿ │ _ │ │ │ | ||
| 473 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 474 | * │CapsL│ │ │ │ │ | ||
| 475 | * ┌─────┼─────┼─────┼─────┴─────┴─────┘ | ||
| 476 | * │Enter│ Esc │BkSpc│ | ||
| 477 | * └─────┴─────┴─────┘ | ||
| 478 | * QWERTY | ||
| 479 | * ┌─────┬─────┬─────┬─────┬─────┐ | ||
| 480 | * │ ` │ - │ = │ { │ } │ | ||
| 481 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 482 | * │ ~ │ _ │ + │ [ │ ] │ | ||
| 483 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 484 | * │CapsL│ ( │ ) │ \ │ | │ | ||
| 485 | * ┌─────┼─────┼─────┼─────┴─────┴─────┘ | ||
| 486 | * │Enter│ Esc │BkSpc│ | ||
| 487 | * └─────┴─────┴─────┘ | ||
| 488 | */ | ||
| 489 | #define _SY1_5_ DV_GRV, DV_LCBR,DV_RCBR,DV_SLSH,DV_EQL | ||
| 490 | #define _SY2_5_ DV_TILD,DV_LBRC,DV_RBRC,DV_QUES,DV_PLUS | ||
| 491 | #define _SY3_5_ KC_CAPS,DV_LPRN,DV_RPRN,DV_BSLS,DV_PIPE | ||
| 492 | #define _SY4_3_ KC_ENT, KC_ESC, KC_BSPC | ||
| 493 | |||
| 494 | /* Numbers layer | ||
| 495 | * This layer contains numbers and the associated symbols. | ||
| 496 | * DVORAK | ||
| 497 | * ┌─────┬─────┬─────┬─────┬─────┐ | ||
| 498 | * │ < │ 7 & │ 8 * │ 9 ( │ 0 ) │ | ||
| 499 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 500 | * │ _ │ 4 $ │ 5 % │ 6 ^ │ - │ | ||
| 501 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 502 | * │ > │ 1 ! │ 2 @ │ 3 # │Char.│ | ||
| 503 | * └─────┴─────┴─────┼─────┼─────┼─────┐ | ||
| 504 | * │ Del │ Tab │Space│ | ||
| 505 | * └─────┴─────┴─────┘ | ||
| 506 | * Turkish F | ||
| 507 | * ┌─────┬─────┬─────┬─────┬─────┐ | ||
| 508 | * │ < | │{7 ' │[8 ( │]9 )±│}0 =°│ | ||
| 509 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 510 | * │ │¼4 $ │½5 %⅜│¾6 & │ │ | ||
| 511 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 512 | * │ > ¦ │¹1 !¡│²2 " │#3 ^³│Char.│ | ||
| 513 | * └─────┴─────┴─────┼─────┼─────┼─────┐ | ||
| 514 | * │ Del │ Tab │Space│ | ||
| 515 | * └─────┴─────┴─────┘ | ||
| 516 | */ | ||
| 517 | #define _NU1_5_ KC_NUBS,KC_7, KC_8, KC_9, KC_0 | ||
| 518 | #define _NU2_5_ DV_UNDS,KC_4, KC_5, KC_6, DV_MINS | ||
| 519 | #define _NU3_5_ LSFT(KC_NUBS), KC_1, KC_2, KC_3, BB_CHAR | ||
| 520 | #define _NU4_3_ KC_DEL, KC_TAB, KC_SPC | ||
| 521 | |||
| 522 | /* Function layer | ||
| 523 | * ┌─────┬─────┬─────┬─────┬─────┐ | ||
| 524 | * │ F01 │ F02 │ F03 │ F04 │EEPRM│ | ||
| 525 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 526 | * │ F05 │ F06 │ F07 │ F08 │EEPRM│ | ||
| 527 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 528 | * │ F09 │ F10 │ F11 │ F12 │GameL│ | ||
| 529 | * └─────┴─────┴─────┼─────┼─────┼─────┐ | ||
| 530 | * │ Del │ Tab │Space│ | ||
| 531 | * └─────┴─────┴─────┘ | ||
| 532 | */ | ||
| 533 | #define _FU1_5_ KC_F1, KC_F2, KC_F3, KC_F4, RESET | ||
| 534 | #define _FU2_5_ KC_F5, KC_F6, KC_F7, KC_F8, EE_CLR | ||
| 535 | #define _FU3_5_ KC_F9, KC_F10, KC_F11, KC_F12, BB_GAME | ||
| 536 | #define _FU4_3_ KC_DEL, KC_TAB, KC_SPC | ||
| 537 | |||
| 538 | /* Mouse layer | ||
| 539 | * ┌─────┬─────┬─────┬─────┬─────┐ | ||
| 540 | * │Slow │Right│ Mid │ Lft │Fast │ | ||
| 541 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 542 | * │ |<| │ |v| │ |^| │ |>| │ Bt4 │ | ||
| 543 | * ├─────┼─────┼─────┼─────┼─────┤ | ||
| 544 | * │ <<< │ vvv │ ^^^ │ >>> │ Bt5 │ | ||
| 545 | * └─────┴─────┴─────┼─────┼─────┼─────┐ | ||
| 546 | * │ Del │ Tab │Space│ | ||
| 547 | * └─────┴─────┴─────┘ | ||
| 548 | */ | ||
| 549 | #define _MO1_5_ KC_ACL0,KC_BTN1,KC_BTN2,KC_BTN3,KC_ACL2 | ||
| 550 | #define _MO2_5_ KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R,KC_BTN4 | ||
| 551 | #define _MO3_5_ KC_WH_L,KC_WH_D,KC_WH_U,KC_WH_R,KC_BTN5 | ||
| 552 | #define _MO4_3_ KC_DEL, KC_TAB, KC_SPC | ||
| 553 | |||
| 554 | /* Music layer | ||
| 555 | * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ | ||
| 556 | * │ │ │ │ │ │ │ │ │ │ │ │ │ | ||
| 557 | * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ | ||
| 558 | * │ │ │ │ │ │ │ │ │ │ │ │ │ | ||
| 559 | * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ | ||
| 560 | * │ │ │ │ │ │ │ │ │ │ │ │ │ | ||
| 561 | * └───┴───┴───┼───┼───┼───┼───┼───┼───┼───┴───┴───┘ | ||
| 562 | * │Rec│Stp│Ply│Tmp│Mod│Off│ | ||
| 563 | * └───┴───┴───┴───┴───┴───┘ | ||
| 564 | */ | ||
| 565 | #define _MUL_3_ MU_REC, MU_STOP,MU_PLAY | ||
| 566 | #define _MUR_3_ MU_TEMP,MU_MOD, MU_TOG | ||
| 567 | #define _MU_01_ MU_MASK | ||
| 568 | #define _MU_02_ MU_MASK,MU_MASK | ||
| 569 | #define _MU_03_ MU_MASK,MU_MASK,MU_MASK | ||
| 570 | #define _MU_06_ MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK | ||
| 571 | #define _MU_08_ MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK | ||
| 572 | #define _MU_10_ MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK | ||
| 573 | #define _MU_12_ MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK | ||
diff --git a/users/bbaserdem/config.h b/users/bbaserdem/config.h deleted file mode 100644 index 3c467d5e7d..0000000000 --- a/users/bbaserdem/config.h +++ /dev/null | |||
| @@ -1,134 +0,0 @@ | |||
| 1 | /* Copyright 2021 Batuhan Başerdem | ||
| 2 | * <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #pragma once | ||
| 18 | |||
| 19 | /* CONFIG | ||
| 20 | * Common hardware configuration accross my boards | ||
| 21 | */ | ||
| 22 | // Space saving | ||
| 23 | #ifdef LOCKING_SUPPORT_ENABLE | ||
| 24 | # undef LOCKING_SUPPORT_ENABLE | ||
| 25 | #endif | ||
| 26 | #ifdef LOCKING_RESYNC_ENABLE | ||
| 27 | # undef LOCKING_RESYNC_ENABLE | ||
| 28 | #endif | ||
| 29 | #ifndef NO_DEBUG | ||
| 30 | # define NO_DEBUG | ||
| 31 | #endif | ||
| 32 | |||
| 33 | #if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) | ||
| 34 | # define NO_PRINT | ||
| 35 | #endif | ||
| 36 | |||
| 37 | // Some of my own settings | ||
| 38 | # define HOUSEKEEPING_THROTTLE_INTERVAL_MS 250 | ||
| 39 | |||
| 40 | // Split transport settings | ||
| 41 | #ifdef SPLIT_KEYBOARD | ||
| 42 | # define SPLIT_TRANSPORT_MIRROR | ||
| 43 | # define SPLIT_LAYER_STATE_ENABLE | ||
| 44 | # define SPLIT_MODS_ENABLE | ||
| 45 | # define SPLIT_TRANSACTION_IDS_USER RPC_ID_CONFIG_SYNC, RPC_ID_RUNTIME_SYNC, RPC_ID_KEYMAP_SYNC | ||
| 46 | # define SPLIT_LED_STATE_ENABLE | ||
| 47 | # ifdef WPM_ENABLE | ||
| 48 | # define SPLIT_WPM_ENABLE | ||
| 49 | # endif // WPM_ENABLE | ||
| 50 | # ifdef OLED_ENABLE | ||
| 51 | # define SPLIT_OLED_ENABLE | ||
| 52 | # endif // OLED_ENABLE | ||
| 53 | #endif // SPLIT_KEYBOARD | ||
| 54 | |||
| 55 | // Unicode entry mode | ||
| 56 | #ifdef UNICODEMAP_ENABLE | ||
| 57 | # define UNICODE_SELECTED_MODES UC_LNX | ||
| 58 | // Adapt the unicode entry mode to dvorak | ||
| 59 | # ifdef UNICODE_KEY_LNX | ||
| 60 | # undef UNICODE_KEY_LNX | ||
| 61 | # endif | ||
| 62 | # define UNICODE_KEY_LNX LCTL(LSFT(KC_F)) | ||
| 63 | #endif // UNICODEMAP_ENABLE | ||
| 64 | |||
| 65 | // Mousekey mode | ||
| 66 | #ifdef MOUSEKEY_ENABLE | ||
| 67 | # define MK_COMBINED | ||
| 68 | #endif // MOUSEKEY_ENABLE | ||
| 69 | |||
| 70 | // Tap-hold settings | ||
| 71 | #define TAPPING_TERM 200 | ||
| 72 | #define TAP_CODE_DELAY 20 | ||
| 73 | #define IGNORE_MOD_TAP_INTERRUPT | ||
| 74 | #define PERMISSIVE_HOLD | ||
| 75 | #define TAPPING_FORCE_HOLD | ||
| 76 | |||
| 77 | // Backlight settings | ||
| 78 | #ifdef BACKLIGHT_ENABLE | ||
| 79 | # define BACKLIGHT_BREATHING | ||
| 80 | # define BREATHING_PERIOD 5 | ||
| 81 | #endif // BACKLIGHT_ENABLE | ||
| 82 | |||
| 83 | // Audio definitions | ||
| 84 | #ifdef AUDIO_ENABLE | ||
| 85 | //# define AUDIO_ENABLE_TONE_MULTIPLEXING | ||
| 86 | // Make findable songs as defaults | ||
| 87 | # ifdef HOROLOGY | ||
| 88 | # define STARTUP_SONG SONG(HOROLOGY) | ||
| 89 | # endif | ||
| 90 | # ifdef PEOPLE_VULTURES | ||
| 91 | # define GOODBYE_SONG SONG(PEOPLE_VULTURES) | ||
| 92 | # endif | ||
| 93 | # ifdef NONAGON_INFINITY | ||
| 94 | # define MUSIC_ON_SONG SONG(NONAGON_INFINITY) | ||
| 95 | # endif | ||
| 96 | # ifdef WAH_WAH | ||
| 97 | # define MUSIC_OFF_SONG SONG(WAH_WAH) | ||
| 98 | # endif | ||
| 99 | // Audio code expects these to be defined | ||
| 100 | # ifdef BIG_FIG_WASP | ||
| 101 | # define GAME_ON_SONG SONG(BIG_FIG_WASP) | ||
| 102 | # else | ||
| 103 | # define GAME_ON_SONG SONG(USSR_ANTHEM) | ||
| 104 | # endif | ||
| 105 | # ifdef POLYGONDWANALAND | ||
| 106 | # define GAME_OFF_SONG SONG(POLYGONDWANALAND) | ||
| 107 | # else | ||
| 108 | # define GAME_OFF_SONG SONG(NOCTURNE_OP_9_NO_1) | ||
| 109 | # endif | ||
| 110 | #endif // AUDIO_ENABLE | ||
| 111 | |||
| 112 | // OLED definitions | ||
| 113 | #ifdef OLED_ENABLE | ||
| 114 | // Timeout does not work for split secondary board; i implemented it myself | ||
| 115 | # define OLED_TIMEOUT 30000 | ||
| 116 | // Fade out the screen when timing out | ||
| 117 | # define OLED_FADE_OUT | ||
| 118 | # define OLED_FADE_OUT_INTERVAL 15 | ||
| 119 | #endif // OLED_ENABLE | ||
| 120 | |||
| 121 | // For perkey leds | ||
| 122 | #ifdef RGB_MATRIX_ENABLE | ||
| 123 | // This is not working | ||
| 124 | //# define RGB_MATRIX_TIMEOUT 1800000 | ||
| 125 | # define RGB_DISABLE_WHEN_USB_SUSPENDED true | ||
| 126 | // Start using this mode | ||
| 127 | # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_RAINBOW_BEACON | ||
| 128 | # define RGB_MATRIX_STARTUP_HUE 100 | ||
| 129 | # define RGB_MATRIX_STARTUP_SAT 255 | ||
| 130 | # define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS | ||
| 131 | // Some config options | ||
| 132 | # define RGB_MATRIX_KEYRELEASES | ||
| 133 | # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // Enable framebuffer effects | ||
| 134 | #endif // RGB_MATRIX_ENABLE | ||
diff --git a/users/bbaserdem/keymap-bitmaps/.gitignore b/users/bbaserdem/keymap-bitmaps/.gitignore deleted file mode 100644 index 6448f593d6..0000000000 --- a/users/bbaserdem/keymap-bitmaps/.gitignore +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | *.bmp | ||
| 2 | splitImages | ||
| 3 | templates | ||
| 4 | !.gitignore | ||
diff --git a/users/bbaserdem/keymap-bitmaps/cropBmp b/users/bbaserdem/keymap-bitmaps/cropBmp deleted file mode 100755 index 4a322b4175..0000000000 --- a/users/bbaserdem/keymap-bitmaps/cropBmp +++ /dev/null | |||
| @@ -1,38 +0,0 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | # Copyright 2021 Batuhan Başerdem | ||
| 4 | # <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 5 | # | ||
| 6 | # This program is free software: you can redistribute it and/or modify | ||
| 7 | # it under the terms of the GNU General Public License as published by | ||
| 8 | # the Free Software Foundation, either version 2 of the License, or | ||
| 9 | # (at your option) any later version. | ||
| 10 | # | ||
| 11 | # This program is distributed in the hope that it will be useful, | ||
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | # GNU General Public License for more details. | ||
| 15 | # | ||
| 16 | # You should have received a copy of the GNU General Public License | ||
| 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | |||
| 19 | # Goes through all the files and turns them into strips in their respective folder | ||
| 20 | if [ -z "${1}" ] ; then | ||
| 21 | echo 'No argument; defaulting to script directory.' | ||
| 22 | target_dir="$(dirname "${0}")" | ||
| 23 | elif [ -d "${1}" ] ; then | ||
| 24 | echo "Targeting files in '${1}'." | ||
| 25 | target_dir="${1}" | ||
| 26 | else | ||
| 27 | echo 'Argument is not directory.' | ||
| 28 | exit 1 | ||
| 29 | fi | ||
| 30 | |||
| 31 | output_dir="${target_dir}/splitImages" | ||
| 32 | mkdir -p "${output_dir}" | ||
| 33 | |||
| 34 | for this_image in "${target_dir}/"*.bmp ; do | ||
| 35 | echo "Found '${this_image}'." | ||
| 36 | this_name="$(basename "${this_image%%.bmp}")" | ||
| 37 | convert "${this_image}" -crop 'x8' "${output_dir}/${this_name}"_%d.bmp | ||
| 38 | done | ||
diff --git a/users/bbaserdem/readme.md b/users/bbaserdem/readme.md deleted file mode 100644 index 0a1b80cc74..0000000000 --- a/users/bbaserdem/readme.md +++ /dev/null | |||
| @@ -1,131 +0,0 @@ | |||
| 1 | # BBASERDEM userspace code for qmk | ||
| 2 | |||
| 3 | My userspace code for my various keyboards; available here. | ||
| 4 | |||
| 5 | ## Builds | ||
| 6 | |||
| 7 | These are my keyboard builds and info, it allows me to plan out my builds. | ||
| 8 | |||
| 9 | ### Planck SERVER | ||
| 10 | |||
| 11 | * Board: `kprepublic/jj40` | ||
| 12 | * Microcontroller: Embedded | ||
| 13 | * Layout: `ortho_4x12` | ||
| 14 | * Functionality: Underglow RGB Lighting, LED diode lighting. | ||
| 15 | * Case: Clear Acrylic Top and Bottow, with Frosted Acrylic Diffuser (Smashing Acrylics) | ||
| 16 | * Switches: BOX Navy | ||
| 17 | * Keycaps: Datamancer Tall Deco Typewriter Keycaps | ||
| 18 | |||
| 19 | Just a decorative planck replacement (for my rev4 PCB that died.) | ||
| 20 | |||
| 21 | ### Planck Light | ||
| 22 | |||
| 23 | * Board: `planck/light` | ||
| 24 | * Microcontroller: Embedded | ||
| 25 | * Layout: `ortho_4x12` | ||
| 26 | * Functionality: Per-key RGB Lighting, Audio. | ||
| 27 | * Case: Clear Acrylic Top and Bottow, with Frosted Acrylic Diffuser (Smashing Acrylics) | ||
| 28 | * Switches: BOX Navy | ||
| 29 | * Keycaps: Datamancer Tall Deco Typewriter Keycaps | ||
| 30 | |||
| 31 | Just a decorative planck replacement (for my rev4 PCB that died.) | ||
| 32 | |||
| 33 | ### Corne ARM | ||
| 34 | |||
| 35 | * Board: `crkbd/rev1` | ||
| 36 | * Microcontroller: Proton C (x2) | ||
| 37 | * Layout: `split_3x6_3` | ||
| 38 | * Functionality: OLED, Audio, Per-key RGB Lighting, Rotary Encoder (x2) | ||
| 39 | * Case: IMK Corne Case v2 Polycarbonate | ||
| 40 | * Switches: Healios V2 | ||
| 41 | * Keycaps: POM Jelly | ||
| 42 | |||
| 43 | PCB is actually [Proton-C Compatible crkbd PCB](https://github.com/ItsWaffIe/waffle_corne). | ||
| 44 | |||
| 45 | ### Corne Lite | ||
| 46 | |||
| 47 | * Board: `crkbd/rev1` | ||
| 48 | * Microcontroller: Pro Micro (x2) | ||
| 49 | * Layout: `split_3x5_3` | ||
| 50 | * Functionality: Per-key RGB Lighting, OLED (No firmware space) | ||
| 51 | * Case: Custom | ||
| 52 | * Switches: Choc Low Burnt Orange | ||
| 53 | * Keycaps: [Scooped Choc Keycaps](https://mkultra.click/collections/keycaps/products/scooped-choc-keycaps?variant=31223543365730) | ||
| 54 | |||
| 55 | Maybe try adding a trackpad for this, as detailed | ||
| 56 | [here](https://github.com/manna-harbour/crkbd/blob/master/trackpoint/readme.org). | ||
| 57 | |||
| 58 | ### Kyria | ||
| 59 | |||
| 60 | * Board: `splitkb/kyria/rev1` | ||
| 61 | * Microcontroller: Pro Micro (x2) | ||
| 62 | * Layout: `split_3x6_6` | ||
| 63 | * Functionality: OLED, Underglow RGB Lighting (No firmware space), Rotary Encoder (x2) | ||
| 64 | * Case: Matte Black Acrylic High-Profile case | ||
| 65 | * Switches: Gateron Ink Silent Black | ||
| 66 | * Keycaps: Oblotzky SA Oblivion | ||
| 67 | |||
| 68 | Main driver at work currently; love the switches and the board layout. | ||
| 69 | |||
| 70 | # Firmware building | ||
| 71 | |||
| 72 | ## Archlinux | ||
| 73 | |||
| 74 | On archlinux, the package *arm-none-eabi-gcc* is too new. | ||
| 75 | To fix; add to the environment `CFLAGS="-Wno-error=deprecated"` to compilation commands. | ||
| 76 | Also; says to run `avr-gcc` version `8.4.0` for smaller firmware, | ||
| 77 | but I find that it only saves a few bytes. | ||
| 78 | |||
| 79 | ## Bootloader | ||
| 80 | |||
| 81 | Needed to type this out from the QMK website. | ||
| 82 | If I want to flash a new bootloader for a machine; here are steps; | ||
| 83 | |||
| 84 | 1. Flash the util/pro_micro_ISP_B6_10.hex to a spare promicro using; | ||
| 85 | `avrdude -p atmega32u4 -P "$(ls /dev/ttyACM*)" -c avr109 -D -U flash:w:pro_micro_ISP_B6_10.hex` | ||
| 86 | 2. Wire the pins; (first is the ISP pro micro; second is the target) | ||
| 87 | ``` | ||
| 88 | Pro Micro 10 (B6) <-> Keyboard RESET | ||
| 89 | Pro Micro 15 (B1) <-> Keyboard B1 (SCLK) | ||
| 90 | Pro Micro 16 (B2) <-> Keyboard B2 (MOSI) | ||
| 91 | Pro Micro 14 (B3) <-> Keyboard B3 (MISO) | ||
| 92 | Pro Micro VCC <-> Keyboard VCC | ||
| 93 | Pro Micro GND <-> Keyboard GND | ||
| 94 | ``` | ||
| 95 | I do have this on hand I believe; from massdrop's planck light firmware updater. | ||
| 96 | 3. Connect the flashed pro micro to my computer and run | ||
| 97 | `avrdude -c avrisp -P "$(ls /dev/ttyACM*)" -p atmega32u4 -U flash:w:bootloader_atmega32u4_1.0.0.hex:i -U lfuse:w:0x5E:m -U hfuse:w:0xD9:m -U efuse:w:0xC3:m` | ||
| 98 | |||
| 99 | The avrisp here refers to the firmware on the ISP flasher pro micro. | ||
| 100 | The `atmega32u4` refers to the CPU used in the respective breakout boards. | ||
| 101 | The `avrdude` command interacts with catalina bootloader. | ||
| 102 | The shell call after the `-P` flag auto finds the port that the pro micro connects to. | ||
| 103 | The last few arguments are some jumpers apparently. | ||
| 104 | |||
| 105 | # Features | ||
| 106 | |||
| 107 | My userspace has a lot of shared code between different keyboards. | ||
| 108 | These files are prefixed with `sbp-` to remove any naming clash. | ||
| 109 | |||
| 110 | * [bb-audio](bb-audio.c): Code dealing with audio playback using onboard sound. | ||
| 111 | * [bb-encoder](bb-encoder.c): Rotary encoder sutff. | ||
| 112 | * [bb-macro](bb-macro.c): My custom keycodes; macros, tap dances, etc. | ||
| 113 | * [bb-oled](bb-oled.c): Controls OLED displays. For higher memory; there is also [bb-oled-extra](bb-oled-extra.c). | ||
| 114 | * [bb-rgb](bb-rgb.c): Controls per-key RGB LED matrix stuff, and layer indication. Uses `RGB_MATRIX`. | ||
| 115 | * [bb-underglaw](bb-underglow.c): Controls RGB LED strip, and layer indication. Uses `RGBLIGHT`. | ||
| 116 | |||
| 117 | # Layout | ||
| 118 | |||
| 119 | My personal layout is mostly inspired by the | ||
| 120 | [Miryoku layout](../manna-harbour_miryoku/miryoku.org). | ||
| 121 | There are some changes to make it friendlier to international keyboards. | ||
| 122 | My board is compatible with software implementation of Dvorak and Turkish F. | ||
| 123 | |||
| 124 | ## Base | ||
| 125 | |||
| 126 | Base layer uses tap-hold functionality to have access to modifiers. | ||
| 127 | The modifiers are mirrored on each half of the layout; | ||
| 128 | as to make those modifiers accessible to the keys that overlap them. | ||
| 129 | Besides the Alt key; each side has the proper L/R version of the modifier. | ||
| 130 | Since Right Alt key functions as AltGr key; | ||
| 131 | both the L and R versions are available on each side. | ||
diff --git a/users/bbaserdem/rules.mk b/users/bbaserdem/rules.mk deleted file mode 100644 index 58f72bb110..0000000000 --- a/users/bbaserdem/rules.mk +++ /dev/null | |||
| @@ -1,87 +0,0 @@ | |||
| 1 | # Copyright 2021 Batuhan Başerdem | ||
| 2 | # <baserdem.batuhan@gmail.com> @bbaserdem | ||
| 3 | # | ||
| 4 | # This program is free software: you can redistribute it and/or modify | ||
| 5 | # it under the terms of the GNU General Public License as published by | ||
| 6 | # the Free Software Foundation, either version 2 of the License, or | ||
| 7 | # (at your option) any later version. | ||
| 8 | # | ||
| 9 | # This program is distributed in the hope that it will be useful, | ||
| 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | # GNU General Public License for more details. | ||
| 13 | # | ||
| 14 | # You should have received a copy of the GNU General Public License | ||
| 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | |||
| 17 | # Common compilation flags | ||
| 18 | LTO_ENABLE = yes | ||
| 19 | |||
| 20 | # These should be enabled in all boards | ||
| 21 | MOUSEKEY_ENABLE = yes # Mouse emulation keys | ||
| 22 | EXTRAKEY_ENABLE = yes # OS signals like volume control | ||
| 23 | UNICODEMAP_ENABLE = yes # Used for unicode character emulation | ||
| 24 | |||
| 25 | # These should be disabled in all boards | ||
| 26 | BOOTMAGIC_ENABLE = no # Access to EEPROM settings, not needed | ||
| 27 | CONSOLE_ENABLE = no # Allows console output with a command | ||
| 28 | COMMAND_ENABLE = no # Some bootmagic thing i dont use | ||
| 29 | SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested. | ||
| 30 | MIDI_ENABLE = no # Midi driver (untested) | ||
| 31 | UNICODE_ENABLE = no # We use unicodemap, not unicode | ||
| 32 | UCIS_ENABLE = no # We use unicodemap, not ucis | ||
| 33 | VARIABLE_TRACE = no # Allows debugging variables | ||
| 34 | KEY_LOCK_ENABLE = no # Allows locking any key. Not used in general | ||
| 35 | RGBLIGHT_ENABLE = no # LED strip, but there is RGB_MATRIX instead | ||
| 36 | TAP_DANCE_ENABLE = no # Tap dance keys; i don't use tap dance | ||
| 37 | |||
| 38 | # These features can be disabled at whim | ||
| 39 | NKRO_ENABLE ?= yes # Default is 6KRO | ||
| 40 | VELOCIKEY_ENABLE ?= yes # Speed effects change with typing speed | ||
| 41 | WPM_ENABLE ?= yes # Get WPM reports as you type | ||
| 42 | |||
| 43 | # Manually configure these on each keyboard individually | ||
| 44 | # AUDIO_ENABLE # Audio stuff | ||
| 45 | # BACKLIGHT_ENABLE # Switch LEDs | ||
| 46 | # ENCODER_ENABLE # Rotary encoder | ||
| 47 | # RGB_MATRIX_ENABLE # RGB LEDs | ||
| 48 | # OLED_ENABLE # For OLED | ||
| 49 | |||
| 50 | # Userspace code | ||
| 51 | SRC += bbaserdem.c | ||
| 52 | |||
| 53 | # Macros | ||
| 54 | SRC += bb-macro.c | ||
| 55 | |||
| 56 | # Audio code | ||
| 57 | ifeq ($(strip $(AUDIO_ENABLE)), yes) | ||
| 58 | SRC += bb-audio.c | ||
| 59 | endif | ||
| 60 | |||
| 61 | # Rotary encoder stuff | ||
| 62 | ifeq ($(strip $(ENCODER_ENABLE)), yes) | ||
| 63 | SRC += bb-encoder.c | ||
| 64 | endif | ||
| 65 | |||
| 66 | # RGB LED (Underglow) code | ||
| 67 | ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) | ||
| 68 | SRC += bb-underglow.c | ||
| 69 | endif | ||
| 70 | |||
| 71 | # RGB LED (Perkey) code | ||
| 72 | ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) | ||
| 73 | SRC += bb-rgb.c | ||
| 74 | endif | ||
| 75 | |||
| 76 | # Backlight code | ||
| 77 | ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) | ||
| 78 | SRC += bb-backlight.c | ||
| 79 | endif | ||
| 80 | |||
| 81 | # OLED code | ||
| 82 | ifeq ($(strip $(OLED_ENABLE)), yes) | ||
| 83 | SRC += bb-oled.c | ||
| 84 | ifeq ($(strip $(CTPC)), yes) | ||
| 85 | SRC += bb-oled-extra.c | ||
| 86 | endif | ||
| 87 | endif | ||
