diff options
| author | artjomsR <artjomsR@users.noreply.github.com> | 2020-05-19 22:05:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-19 22:05:32 +0100 |
| commit | 209942366b7da264d349c37ac6f4f69a3484b526 (patch) | |
| tree | 03be56be116ef5fde2a82c1da70efb09dccf5cb7 /users/art | |
| parent | 494b34b63f84617ddc56ff6dc0395505a33eb24e (diff) | |
| download | qmk_firmware-209942366b7da264d349c37ac6f4f69a3484b526.tar.gz qmk_firmware-209942366b7da264d349c37ac6f4f69a3484b526.zip | |
Art userspace (#9068)
* added git codes
* started git layer
* finished structure for git layer. MOD: replaced mouse with mod keys on right hand
* layout changing layer
* mod enter. default qwerty layer. removed mods on number layer
* workman layout. git log, show. blank enter and bsspace
* config layer. toggleable ctrl/alt for OS
* removed keymap comments
* strings and combos layers. sarcasm and ctrl_ctv. RGB configs
* reintroduced enter and bspace. delete backspace as a function. git push -u and checkout -b
* string macros
* OS specific home/end
* OS mac & win keys. N delete global backspace
* refactored backspace functions
* ctrl lctv macro
* base layer toggle fix
* whitespace
* BS + L for FF and chrome
* replaced 1 keycode with userspace
* added userspace config
* remove comments
* add another keycode with a variable
* moved all keymaps and codes to common file
* ctrl z mod
* removed ctrl z
* sipmlified OS functions
* moved is_win to keyboard level
* added mac alt tab
* added ctrl tab in mac + clean up variables in art.h
* tild string macro. added mac left/right + home/end
* mac ctrl backspace
* enum layers for default layout
* added ergodone keymap
* ergodone compiles
* clean up
* clean up
* removed obsolete OS_HOME/END
* removed var
* added ctrl nav to split75
* ergodone clean up + caps lock fix 75
* fix mac ctrl alt on right handside. added mac alt tab left right
* fix ergodone config override
* fixed alt left right not working on mac
* added OS ctr_alt
* mac ctrl del. fix tild
* simplified tild macro
* git stash apply
* send_string_remembering_lenght
* shifted strings print
* restored KC_BSPACE functionality
* moved KC_BSPC
* numpad layer on Fn
* media lights
* ergodone final clean up
* ergodone GIT AND MEDIA layers
* ergodone GIT LAYER switch
* default behaviour for all modified keys on BASE layer
* refactored logic for default keycodes
* ergodone final layers
* ctrl_cav for translation and ctrl_l fix
* toggleable layer with numpad
* comments
* numpad layer
* Update users/art/config.h
Co-authored-by: Joel Challis <git@zvecr.com>
* enable dynamic macros for split75
* git branch and develop/master
* removed esc from Nav
* ergodone: ctrl alt for shift layer
* macros and right alt for ergodone
* fix ergodone N_backspace not working on git layers
* mac language switch with alt+shift
* Update users/art/art.c
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update users/art/art.c
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update users/art/art.c
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/ergodone/keymaps/art/keymap.c
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update users/art/art.h
Co-authored-by: Ryan <fauxpark@gmail.com>
* flashing leds to indicate current os
* using rshift on shifted layers
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'users/art')
| -rw-r--r-- | users/art/art.c | 464 | ||||
| -rw-r--r-- | users/art/art.h | 69 | ||||
| -rw-r--r-- | users/art/config.h | 4 | ||||
| -rw-r--r-- | users/art/rules.mk | 1 |
4 files changed, 538 insertions, 0 deletions
diff --git a/users/art/art.c b/users/art/art.c new file mode 100644 index 000000000..5596e237f --- /dev/null +++ b/users/art/art.c | |||
| @@ -0,0 +1,464 @@ | |||
| 1 | #include "art.h" | ||
| 2 | #include "string.h" | ||
| 3 | |||
| 4 | __attribute__ ((weak)) | ||
| 5 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
| 6 | return true; | ||
| 7 | } | ||
| 8 | |||
| 9 | __attribute__ ((weak)) | ||
| 10 | void led_show_current_os(void) { | ||
| 11 | } | ||
| 12 | |||
| 13 | static bool mac_ctrl_on = false; //for switching tabs | ||
| 14 | static bool mac_gui_on = false; //for switching languages | ||
| 15 | static bool mac_alt_tab_on = false; //for switching windows | ||
| 16 | |||
| 17 | static const char *key_up[2] = {SS_UP(X_LALT), SS_UP(X_LCTL)}; | ||
| 18 | static const char *key_down[2] = {SS_DOWN(X_LALT), SS_DOWN(X_LCTL)}; | ||
| 19 | |||
| 20 | int char_to_del = 1; | ||
| 21 | static bool sarcasm_on = false; | ||
| 22 | static bool sarcasm_key = false; | ||
| 23 | |||
| 24 | void backspace_n_times(int times) { | ||
| 25 | for (int i=0; i<times; i++) { | ||
| 26 | SEND_STRING(SS_TAP(X_BSPC)); | ||
| 27 | } | ||
| 28 | } | ||
| 29 | |||
| 30 | void send_string_remembering_length(char *string) { | ||
| 31 | send_string(string); | ||
| 32 | char_to_del = strlen(string); | ||
| 33 | } | ||
| 34 | |||
| 35 | void send_shifted_strings(char *string1, char *string2) { | ||
| 36 | if ( get_mods() & MOD_MASK_SHIFT ) { | ||
| 37 | clear_mods(); | ||
| 38 | send_string_remembering_length(string2); | ||
| 39 | } else { | ||
| 40 | send_string_remembering_length(string1); | ||
| 41 | } | ||
| 42 | } | ||
| 43 | |||
| 44 | void send_shifted_strings_add(char *string1, char *string2) { | ||
| 45 | bool shifted = get_mods() & MOD_MASK_SHIFT; | ||
| 46 | clear_mods(); | ||
| 47 | |||
| 48 | send_string_remembering_length(string1); | ||
| 49 | |||
| 50 | if (shifted) { | ||
| 51 | send_string(string2); | ||
| 52 | char_to_del = strlen(string1) + strlen(string2); | ||
| 53 | } | ||
| 54 | } | ||
| 55 | |||
| 56 | bool is_mac_with_base_layer_off(void) { | ||
| 57 | return !is_win && !layer_state_is(BASE); | ||
| 58 | } | ||
| 59 | |||
| 60 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 61 | if (sarcasm_on) { | ||
| 62 | sarcasm_key = ! sarcasm_key; | ||
| 63 | if (sarcasm_key) { | ||
| 64 | SEND_STRING(SS_TAP(X_CAPS)); | ||
| 65 | } | ||
| 66 | } | ||
| 67 | |||
| 68 | //Checking all other non-backspace keys to clear the backspace buffer. This is to prevent the bug of deleting N chars sometime after using a macro | ||
| 69 | if (record->event.pressed && (keycode != KC_BSPACE && keycode != XXXXXXX)) { | ||
| 70 | char_to_del = 1; | ||
| 71 | } | ||
| 72 | |||
| 73 | switch (keycode) { | ||
| 74 | case KC_TAB: | ||
| 75 | if (record->event.pressed && is_mac_with_base_layer_off()) { | ||
| 76 | uint8_t mods = get_mods(); | ||
| 77 | uint8_t mod_state = mods & MOD_MASK_ALT; | ||
| 78 | if (get_mods() & mod_state) { | ||
| 79 | del_mods(mod_state); | ||
| 80 | add_mods(MOD_LCTL); | ||
| 81 | mac_alt_tab_on = true; | ||
| 82 | } | ||
| 83 | |||
| 84 | mod_state = mods & MOD_MASK_CTRL; | ||
| 85 | if (get_mods() & mod_state && !mac_alt_tab_on) { | ||
| 86 | del_mods(mod_state); | ||
| 87 | add_mods(MOD_LGUI); | ||
| 88 | mac_ctrl_on = true; | ||
| 89 | } | ||
| 90 | } | ||
| 91 | break; | ||
| 92 | case KC_LSFT: | ||
| 93 | if (record->event.pressed && is_mac_with_base_layer_off()) { | ||
| 94 | uint8_t mods = get_mods(); | ||
| 95 | uint8_t mod_state = mods & MOD_MASK_AG; | ||
| 96 | if (get_mods() & mod_state) { | ||
| 97 | del_mods(mod_state); | ||
| 98 | add_mods(MOD_LGUI); | ||
| 99 | mac_gui_on = true; | ||
| 100 | SEND_STRING(SS_TAP(X_SPACE)); | ||
| 101 | return false; | ||
| 102 | } else { | ||
| 103 | return true; | ||
| 104 | } | ||
| 105 | } | ||
| 106 | break; | ||
| 107 | case KC_LEFT: | ||
| 108 | case KC_RIGHT: | ||
| 109 | if (record->event.pressed && is_mac_with_base_layer_off()) { | ||
| 110 | /* && !mac_ctrl_on/!mac_alt_tab_on are required since setting the state while holding the key changes | ||
| 111 | the modifier from OS's perspective. As a result, just the pressed key cannot be the single source | ||
| 112 | of truth to determine which state we're in, and a separate bool is required */ | ||
| 113 | uint8_t mods = get_mods(); | ||
| 114 | uint8_t mod_state = mods & MOD_MASK_ALT; | ||
| 115 | //Allows Ctrl <-/-> on Mac if Ctrl Tab is already pressed | ||
| 116 | if (get_mods() & mod_state && mac_alt_tab_on && !mac_ctrl_on) { | ||
| 117 | del_mods(mod_state); | ||
| 118 | add_mods(MOD_LCTL); | ||
| 119 | } | ||
| 120 | |||
| 121 | mod_state = mods & MOD_MASK_CTRL; | ||
| 122 | if (get_mods() & mod_state && !mac_alt_tab_on) { | ||
| 123 | del_mods(mod_state); | ||
| 124 | add_mods(MOD_LALT); | ||
| 125 | mac_ctrl_on = true; | ||
| 126 | } | ||
| 127 | } | ||
| 128 | break; | ||
| 129 | case KC_DEL: | ||
| 130 | if (record->event.pressed && is_mac_with_base_layer_off()) { | ||
| 131 | uint8_t mod_state = get_mods() & MOD_MASK_CTRL; | ||
| 132 | if (get_mods() & mod_state) { | ||
| 133 | del_mods(mod_state); | ||
| 134 | add_mods(MOD_LALT); | ||
| 135 | mac_ctrl_on = true; | ||
| 136 | } | ||
| 137 | } | ||
| 138 | break; | ||
| 139 | case KC_LALT: | ||
| 140 | if (!record->event.pressed && is_mac_with_base_layer_off()) { | ||
| 141 | if (mac_alt_tab_on) { | ||
| 142 | unregister_mods(MOD_LCTL); | ||
| 143 | mac_alt_tab_on = false; | ||
| 144 | return false; | ||
| 145 | } else if (mac_gui_on) { | ||
| 146 | SEND_STRING(SS_UP(X_LGUI)); | ||
| 147 | mac_gui_on = false; | ||
| 148 | return false; | ||
| 149 | } | ||
| 150 | } | ||
| 151 | break; | ||
| 152 | case KC_RALT: | ||
| 153 | if (!record->event.pressed && mac_alt_tab_on && is_mac_with_base_layer_off()) { | ||
| 154 | unregister_mods(MOD_LCTL); | ||
| 155 | mac_alt_tab_on = false; | ||
| 156 | return false; | ||
| 157 | } | ||
| 158 | break; | ||
| 159 | case KC_LCTL: | ||
| 160 | case KC_RCTL: | ||
| 161 | if (!record->event.pressed && mac_ctrl_on && is_mac_with_base_layer_off()) { | ||
| 162 | SEND_STRING(SS_UP(X_LGUI) SS_UP(X_LALT)); | ||
| 163 | mac_ctrl_on = false; | ||
| 164 | return false; | ||
| 165 | } | ||
| 166 | break; | ||
| 167 | |||
| 168 | case KC_HOME: | ||
| 169 | if (record->event.pressed && is_mac_with_base_layer_off()) { | ||
| 170 | SEND_STRING(SS_LCTL(SS_TAP(X_LEFT))); | ||
| 171 | return false; | ||
| 172 | } | ||
| 173 | break; | ||
| 174 | case KC_END: | ||
| 175 | if (record->event.pressed && is_mac_with_base_layer_off()) { | ||
| 176 | SEND_STRING(SS_LCTL(SS_TAP(X_RIGHT))); | ||
| 177 | return false; | ||
| 178 | } | ||
| 179 | break; | ||
| 180 | case KC_BSPC: | ||
| 181 | if (record->event.pressed) { | ||
| 182 | if (char_to_del > 1) { | ||
| 183 | layer_off(GIT_C); | ||
| 184 | layer_off(GIT_S); | ||
| 185 | backspace_n_times(char_to_del); | ||
| 186 | char_to_del = 1; | ||
| 187 | return false; | ||
| 188 | } | ||
| 189 | |||
| 190 | if (is_mac_with_base_layer_off()) { | ||
| 191 | uint8_t mod_state = get_mods() & MOD_MASK_CTRL; | ||
| 192 | if (get_mods() & mod_state) { | ||
| 193 | del_mods(mod_state); | ||
| 194 | add_mods(MOD_LALT); | ||
| 195 | mac_ctrl_on = true; | ||
| 196 | } | ||
| 197 | } | ||
| 198 | } | ||
| 199 | break; | ||
| 200 | |||
| 201 | /* ------------------------------------------------------------------------- | ||
| 202 | * CUSTOM MACROS | ||
| 203 | * ------------------------------------------------------------------------ */ | ||
| 204 | case CTRL_CTV: | ||
| 205 | if (record->event.pressed) { | ||
| 206 | if ( get_mods() & MOD_MASK_SHIFT ) { | ||
| 207 | clear_mods(); | ||
| 208 | SEND_STRING(SS_LCTL("ctv")); | ||
| 209 | } else { | ||
| 210 | SEND_STRING(SS_LCTL("ctv") SS_TAP(X_ENTER)); | ||
| 211 | } | ||
| 212 | } | ||
| 213 | break; | ||
| 214 | case CTRL_LCTV: | ||
| 215 | if (record->event.pressed) { | ||
| 216 | if ( get_mods() & MOD_MASK_SHIFT ) { | ||
| 217 | //Firefox | ||
| 218 | clear_mods(); | ||
| 219 | SEND_STRING(SS_LCTL("lcP")); | ||
| 220 | wait_ms(200); | ||
| 221 | SEND_STRING(SS_LCTL("v") SS_TAP(X_ENTER)); | ||
| 222 | } else if ( get_mods() & MOD_MASK_CTRL ) { | ||
| 223 | //Chrome | ||
| 224 | clear_mods(); | ||
| 225 | SEND_STRING(SS_LCTL("lcNv") SS_TAP(X_ENTER)); | ||
| 226 | } else { | ||
| 227 | SEND_STRING(SS_LCTL("lctv")); | ||
| 228 | } | ||
| 229 | } | ||
| 230 | break; | ||
| 231 | case CTRL_CAV: | ||
| 232 | if (record->event.pressed) { | ||
| 233 | SEND_STRING(SS_LCTL("c" SS_TAP(X_TAB))); | ||
| 234 | wait_ms(50); | ||
| 235 | SEND_STRING(SS_LCTL("av")); | ||
| 236 | } | ||
| 237 | break; | ||
| 238 | case SARCASM: | ||
| 239 | if (record->event.pressed) { | ||
| 240 | sarcasm_on = !sarcasm_on; | ||
| 241 | } | ||
| 242 | break; | ||
| 243 | |||
| 244 | /* ------------------------------------------------------------------------- | ||
| 245 | * OS TOGGLING | ||
| 246 | * ------------------------------------------------------------------------ */ | ||
| 247 | case TOG_OS: | ||
| 248 | if (record->event.pressed) { | ||
| 249 | is_win = ! is_win; | ||
| 250 | led_show_current_os(); | ||
| 251 | } | ||
| 252 | break; | ||
| 253 | case CTR_ALT: | ||
| 254 | if (record->event.pressed) { | ||
| 255 | send_string(key_down[is_win]); | ||
| 256 | } else { | ||
| 257 | send_string(key_up[is_win]); | ||
| 258 | } | ||
| 259 | break; | ||
| 260 | case OS_CTRL: | ||
| 261 | if (is_win) { | ||
| 262 | if (record->event.pressed) { | ||
| 263 | SEND_STRING(SS_DOWN(X_LCTL)); | ||
| 264 | } else { | ||
| 265 | SEND_STRING(SS_UP(X_LCTL)); | ||
| 266 | } | ||
| 267 | } else { | ||
| 268 | if (record->event.pressed) { | ||
| 269 | SEND_STRING(SS_DOWN(X_LGUI)); | ||
| 270 | } else { | ||
| 271 | SEND_STRING(SS_UP(X_LGUI)); | ||
| 272 | } | ||
| 273 | } | ||
| 274 | break; | ||
| 275 | case OS_WIN: | ||
| 276 | if (is_win) { | ||
| 277 | if (record->event.pressed) { | ||
| 278 | SEND_STRING(SS_DOWN(X_LGUI)); | ||
| 279 | } else { | ||
| 280 | SEND_STRING(SS_UP(X_LGUI)); | ||
| 281 | } | ||
| 282 | } else { | ||
| 283 | if (record->event.pressed) { | ||
| 284 | SEND_STRING(SS_DOWN(X_LCTL)); | ||
| 285 | } else { | ||
| 286 | SEND_STRING(SS_UP(X_LCTL)); | ||
| 287 | } | ||
| 288 | } | ||
| 289 | break; | ||
| 290 | |||
| 291 | /* ------------------------------------------------------------------------- | ||
| 292 | * STRING MACROS | ||
| 293 | * ------------------------------------------------------------------------ */ | ||
| 294 | // case : | ||
| 295 | // if (record->event.pressed) { | ||
| 296 | // send_string_remembering_length(""); | ||
| 297 | // } | ||
| 298 | // break; | ||
| 299 | // case : | ||
| 300 | // if (record->event.pressed) { | ||
| 301 | // send_string_remembering_length("", ""); | ||
| 302 | // } | ||
| 303 | // break; | ||
| 304 | case TILD_BLOCK: | ||
| 305 | if (record->event.pressed) { | ||
| 306 | SEND_STRING("```" SS_LSFT(SS_TAP(X_ENTER) SS_TAP(X_ENTER)) "```" SS_TAP(X_UP)); | ||
| 307 | char_to_del = 4; | ||
| 308 | } | ||
| 309 | break; | ||
| 310 | case ADMINS: | ||
| 311 | if (record->event.pressed) { | ||
| 312 | send_shifted_strings_add("admin", "/aurora/status"); | ||
| 313 | } | ||
| 314 | break; | ||
| 315 | case PRESCRIPTION: | ||
| 316 | if (record->event.pressed) { | ||
| 317 | SEND_STRING("55\t12122019\t"); | ||
| 318 | char_to_del = 8; | ||
| 319 | } | ||
| 320 | break; | ||
| 321 | case FOURS: | ||
| 322 | if (record->event.pressed) { | ||
| 323 | SEND_STRING("4444333322221111\t1\t12\t21\t123\n"); | ||
| 324 | char_to_del = 16; | ||
| 325 | } | ||
| 326 | break; | ||
| 327 | |||
| 328 | case G_ADD: | ||
| 329 | if (record->event.pressed) { | ||
| 330 | send_string_remembering_length("git add "); | ||
| 331 | } | ||
| 332 | break; | ||
| 333 | case G_BRCH: | ||
| 334 | if (record->event.pressed) { | ||
| 335 | send_shifted_strings_add("git branch ", "-d "); | ||
| 336 | } | ||
| 337 | break; | ||
| 338 | case G_C: | ||
| 339 | if (record->event.pressed) { | ||
| 340 | send_string_remembering_length("git c[Heckout/Ommit]"); | ||
| 341 | layer_on(GIT_C); | ||
| 342 | } | ||
| 343 | break; | ||
| 344 | case G_CHEC: | ||
| 345 | if (!record->event.pressed) { | ||
| 346 | bool shifted = get_mods() & MOD_MASK_SHIFT; | ||
| 347 | clear_mods(); | ||
| 348 | |||
| 349 | backspace_n_times(15); | ||
| 350 | SEND_STRING("heckout "); | ||
| 351 | char_to_del = 13; | ||
| 352 | if (shifted) { | ||
| 353 | SEND_STRING("-b "); | ||
| 354 | char_to_del = 16; | ||
| 355 | } | ||
| 356 | layer_off(GIT_C); | ||
| 357 | } | ||
| 358 | break; | ||
| 359 | case G_COMM: | ||
| 360 | if (!record->event.pressed) { | ||
| 361 | bool shifted = get_mods() & MOD_MASK_SHIFT; | ||
| 362 | clear_mods(); | ||
| 363 | |||
| 364 | backspace_n_times(15); | ||
| 365 | SEND_STRING("ommit -"); | ||
| 366 | char_to_del = 15; | ||
| 367 | if (shifted) { | ||
| 368 | SEND_STRING("a"); | ||
| 369 | char_to_del = 16; | ||
| 370 | } | ||
| 371 | SEND_STRING("m \"\"" SS_TAP(X_LEFT)); | ||
| 372 | layer_off(GIT_C); | ||
| 373 | } | ||
| 374 | break; | ||
| 375 | case G_DEV: | ||
| 376 | if (record->event.pressed) { | ||
| 377 | send_shifted_strings("develop", "master"); | ||
| 378 | } | ||
| 379 | break; | ||
| 380 | case G_DIFF: | ||
| 381 | if (record->event.pressed) { | ||
| 382 | send_string_remembering_length("git diff "); | ||
| 383 | } | ||
| 384 | break; | ||
| 385 | case G_FTCH: | ||
| 386 | if (record->event.pressed) { | ||
| 387 | send_string_remembering_length("git fetch "); | ||
| 388 | } | ||
| 389 | break; | ||
| 390 | case G_LOG: | ||
| 391 | if (record->event.pressed) { | ||
| 392 | send_string_remembering_length("git log "); | ||
| 393 | } | ||
| 394 | break; | ||
| 395 | case G_MERG: | ||
| 396 | if (record->event.pressed) { | ||
| 397 | send_string_remembering_length("git merge "); | ||
| 398 | } | ||
| 399 | break; | ||
| 400 | case G_P: | ||
| 401 | if (record->event.pressed) { | ||
| 402 | send_shifted_strings_add("git pu", "sh -u "); | ||
| 403 | } | ||
| 404 | break; | ||
| 405 | case G_RST: | ||
| 406 | if (record->event.pressed) { | ||
| 407 | send_string_remembering_length("git reset "); | ||
| 408 | } | ||
| 409 | break; | ||
| 410 | case G_S: | ||
| 411 | if (!record->event.pressed) { | ||
| 412 | send_string_remembering_length("git s[taSh/How/taTus]"); | ||
| 413 | layer_on(GIT_S); | ||
| 414 | } | ||
| 415 | break; | ||
| 416 | case G_SHOW: | ||
| 417 | if (!record->event.pressed) { | ||
| 418 | backspace_n_times(16); | ||
| 419 | SEND_STRING("how "); | ||
| 420 | char_to_del = 9; | ||
| 421 | layer_off(GIT_S); | ||
| 422 | } | ||
| 423 | break; | ||
| 424 | case G_STSH: | ||
| 425 | if (!record->event.pressed) { | ||
| 426 | bool shifted = get_mods() & MOD_MASK_SHIFT; | ||
| 427 | clear_mods(); | ||
| 428 | |||
| 429 | backspace_n_times(16); | ||
| 430 | SEND_STRING("tash "); | ||
| 431 | char_to_del = 10; | ||
| 432 | |||
| 433 | if (shifted) { | ||
| 434 | clear_mods(); | ||
| 435 | SEND_STRING("apply "); | ||
| 436 | |||
| 437 | char_to_del = 16; | ||
| 438 | } | ||
| 439 | |||
| 440 | layer_off(GIT_S); | ||
| 441 | } | ||
| 442 | break; | ||
| 443 | case G_STAT: | ||
| 444 | if (!record->event.pressed) { | ||
| 445 | backspace_n_times(16); | ||
| 446 | SEND_STRING("tatus "); | ||
| 447 | char_to_del = 11; | ||
| 448 | layer_off(GIT_S); | ||
| 449 | } | ||
| 450 | break; | ||
| 451 | |||
| 452 | case CTL_ALT_START ... CTL_ALT_END: | ||
| 453 | if (record->event.pressed) { | ||
| 454 | if (is_win) { | ||
| 455 | tap_code16(LCTL(keycode - CTL_ALT_START)); | ||
| 456 | } else { | ||
| 457 | tap_code16(LALT(keycode - CTL_ALT_START)); | ||
| 458 | } | ||
| 459 | } | ||
| 460 | break; | ||
| 461 | } | ||
| 462 | |||
| 463 | return process_record_keymap(keycode, record); | ||
| 464 | } | ||
diff --git a/users/art/art.h b/users/art/art.h new file mode 100644 index 000000000..58b005b93 --- /dev/null +++ b/users/art/art.h | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | #pragma once | ||
| 2 | #include QMK_KEYBOARD_H | ||
| 3 | |||
| 4 | #define CTL_ALT(kc) (CTL_ALT_START + ((kc) & 0xff)) | ||
| 5 | |||
| 6 | extern bool is_win; | ||
| 7 | |||
| 8 | enum layer_names { | ||
| 9 | QWERTY, | ||
| 10 | WORKMAN, | ||
| 11 | BASE, //only specific for split75 | ||
| 12 | #if defined(KEYBOARD_wheatfield_split75) | ||
| 13 | QWERTY_MOD, | ||
| 14 | LAYOUT_CHG, | ||
| 15 | #elif defined(KEYBOARD_ergodone) | ||
| 16 | FKEYS, | ||
| 17 | CTRL_NAV, | ||
| 18 | SHIFT_NAV, | ||
| 19 | #endif | ||
| 20 | |||
| 21 | MEDIA, | ||
| 22 | COMBOS, | ||
| 23 | STRINGS, | ||
| 24 | CONFIG, | ||
| 25 | NAV, | ||
| 26 | NUMPAD, | ||
| 27 | GIT, | ||
| 28 | GIT_C, | ||
| 29 | GIT_S | ||
| 30 | }; | ||
| 31 | |||
| 32 | enum custom_keycodes_art { | ||
| 33 | CTRL_CTV = SAFE_RANGE, | ||
| 34 | CTRL_LCTV, | ||
| 35 | CTRL_CAV, | ||
| 36 | SARCASM, | ||
| 37 | |||
| 38 | TOG_OS, | ||
| 39 | CTR_ALT, | ||
| 40 | OS_CTRL, | ||
| 41 | OS_WIN, | ||
| 42 | |||
| 43 | TILD_BLOCK, | ||
| 44 | ADMINS, | ||
| 45 | PRESCRIPTION, | ||
| 46 | FOURS, | ||
| 47 | |||
| 48 | G_ADD, | ||
| 49 | G_BRCH, | ||
| 50 | G_C, | ||
| 51 | G_CHEC, | ||
| 52 | G_COMM, | ||
| 53 | G_DEV, | ||
| 54 | G_DIFF, | ||
| 55 | G_FTCH, | ||
| 56 | G_LOG, | ||
| 57 | G_MERG, | ||
| 58 | G_P, | ||
| 59 | G_RST, | ||
| 60 | G_S, | ||
| 61 | G_STAT, | ||
| 62 | G_STSH, | ||
| 63 | G_SHOW, | ||
| 64 | |||
| 65 | CTL_ALT_START, | ||
| 66 | CTL_ALT_END = CTL_ALT_START + 0xff, | ||
| 67 | |||
| 68 | NEW_SAFE_RANGE //for keymap specific codes | ||
| 69 | }; | ||
diff --git a/users/art/config.h b/users/art/config.h new file mode 100644 index 000000000..72419ff37 --- /dev/null +++ b/users/art/config.h | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #undef TAPPING_TOGGLE | ||
| 4 | #define TAPPING_TOGGLE 2 | ||
diff --git a/users/art/rules.mk b/users/art/rules.mk new file mode 100644 index 000000000..2b701eb94 --- /dev/null +++ b/users/art/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| SRC += art.c \ No newline at end of file | |||
