diff options
| author | Batuhan Baserdem <bbaserdem@users.noreply.github.com> | 2018-05-31 21:55:45 -0400 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2018-05-31 18:55:45 -0700 |
| commit | 8eaf23ae8146766615cc1cec3fc8e04111e8ef49 (patch) | |
| tree | d33b9b4609b5df899c243a1f9525eed1c049098f /users/bbaserdem | |
| parent | abce980b8bbc6d1bae16513a50662a549b196c1b (diff) | |
| download | qmk_firmware-8eaf23ae8146766615cc1cec3fc8e04111e8ef49.tar.gz qmk_firmware-8eaf23ae8146766615cc1cec3fc8e04111e8ef49.zip | |
User space fixed (#3095)
* Put in my keymaps
* Fixed all but weird lets split issue
* Organized and tried to trobleshoot lets split
* Organized and tried to trobleshoot lets split
* Added bbaserdem keymaps
* Added bbaserdem keymaps
* Fixed stuff
* FIxed a filename error
Diffstat (limited to 'users/bbaserdem')
| -rw-r--r-- | users/bbaserdem/README.md | 49 | ||||
| -rw-r--r-- | users/bbaserdem/bbaserdem.c | 651 | ||||
| -rw-r--r-- | users/bbaserdem/bbaserdem.h | 279 | ||||
| -rw-r--r-- | users/bbaserdem/rules.mk | 22 |
4 files changed, 1001 insertions, 0 deletions
diff --git a/users/bbaserdem/README.md b/users/bbaserdem/README.md new file mode 100644 index 000000000..2011e74b6 --- /dev/null +++ b/users/bbaserdem/README.md | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | # Overview | ||
| 2 | |||
| 3 | I have mostly ortholinear keyboards, which share a lot of functions. | ||
| 4 | For this purpose, I collected them here. | ||
| 5 | |||
| 6 | I have the following keymaps: | ||
| 7 | |||
| 8 | * Gherkin (Does not use the user space) | ||
| 9 | * Let's Split | ||
| 10 | * Let's Split It Up | ||
| 11 | * Planck | ||
| 12 | |||
| 13 | # Layout | ||
| 14 | |||
| 15 | I use DVORAK with an unorthodox Turkish layout. | ||
| 16 | If you wanna grab my code, andused a previous layout with a persistent base | ||
| 17 | layer change, change it to layer 0 before proceeding. | ||
| 18 | |||
| 19 | # Layers | ||
| 20 | |||
| 21 | * **Dvorak**: Base layer,withdvorak layout. | ||
| 22 | * **Alternative**: Has alternate characters. | ||
| 23 | * **Game**: Toggled from *Function*, comfortable for gaming use. | ||
| 24 | * **Numeric**: Has numericals and symbols. Can be locked. | ||
| 25 | * **Function**: Layer has media and function keys. | ||
| 26 | * **Mouse**: Manipulates mouse. Can be locked. | ||
| 27 | * **Music** Allows playing sounds like a keyboard. | ||
| 28 | |||
| 29 | # Functionality | ||
| 30 | |||
| 31 | * **RGB Backlight**: With layer indication, and ability to change base layer lighting mode. | ||
| 32 | * **Secrets**: By placing a secrets.h, and not tracking it, you can store passwords etc. | ||
| 33 | * **Mouse**: Mouse emulation, complete with diagonal keys. | ||
| 34 | * **Turkish**: An AltGr-like overlay that allows some non-common letters, in unicode. | ||
| 35 | |||
| 36 | I suggest checking out how I enabled shifting for Turkish layer, | ||
| 37 | how I planned out RGB lighting, and my mouse implementation; they might offer | ||
| 38 | some insight into fringe user cases. | ||
| 39 | |||
| 40 | # Issues | ||
| 41 | |||
| 42 | All features are too big for the 32kB bootloader. | ||
| 43 | Offenders are audio and rgb lights; it comes down to one or the other. | ||
| 44 | ~The Proton board, and rev 6 should fix that.~ | ||
| 45 | |||
| 46 | # Credits | ||
| 47 | |||
| 48 | I have previously written my keymap by myself before, but I rewrote it here, | ||
| 49 | heavily inspired by @drashna's user folder. | ||
diff --git a/users/bbaserdem/bbaserdem.c b/users/bbaserdem/bbaserdem.c new file mode 100644 index 000000000..59e5d4ba7 --- /dev/null +++ b/users/bbaserdem/bbaserdem.c | |||
| @@ -0,0 +1,651 @@ | |||
| 1 | #include "bbaserdem.h" | ||
| 2 | |||
| 3 | /*---------------*\ | ||
| 4 | |*-----MOUSE-----*| | ||
| 5 | \*---------------*/ | ||
| 6 | #ifdef MOUSEKEY_ENABLE | ||
| 7 | #include "mousekey.h" | ||
| 8 | #endif | ||
| 9 | |||
| 10 | /*-------------*\ | ||
| 11 | |*-----RGB-----*| | ||
| 12 | \*-------------*/ | ||
| 13 | #ifdef RGBLIGHT_ENABLE | ||
| 14 | #include "rgblight.h" | ||
| 15 | #endif | ||
| 16 | |||
| 17 | /*-----------------*\ | ||
| 18 | |*-----SECRETS-----*| | ||
| 19 | \*-----------------*/ | ||
| 20 | // Enabled by adding a non-tracked secrets.h to this dir. | ||
| 21 | #if (__has_include("secrets.h")) | ||
| 22 | #include "secrets.h" | ||
| 23 | #endif | ||
| 24 | |||
| 25 | /*---------------*\ | ||
| 26 | |*-----MUSIC-----*| | ||
| 27 | \*---------------*/ | ||
| 28 | #ifdef AUDIO_ENABLE | ||
| 29 | float tone_game[][2] = SONG(ZELDA_PUZZLE); | ||
| 30 | float tone_return[][2] = SONG(ZELDA_TREASURE); | ||
| 31 | float tone_linux[][2] = SONG(UNICODE_LINUX); | ||
| 32 | float tone_windows[][2] = SONG(UNICODE_WINDOWS); | ||
| 33 | #endif | ||
| 34 | |||
| 35 | /*-------------------*\ | ||
| 36 | |*-----TAP-DANCE-----*| | ||
| 37 | \*-------------------*/ | ||
| 38 | #ifdef TAP_DANCE_ENABLE | ||
| 39 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
| 40 | // Shift on double tap of semicolon | ||
| 41 | [SCL] = ACTION_TAP_DANCE_DOUBLE( KC_SCLN, KC_COLN ) | ||
| 42 | }; | ||
| 43 | #endif | ||
| 44 | |||
| 45 | /* In keymaps, instead of writing _user functions, write _keymap functions | ||
| 46 | * The __attribute__((weak)) allows for empty definitions here, and during | ||
| 47 | * compilation, if these functions are defined elsewhere, they are written | ||
| 48 | * over. This allows to include custom code from keymaps in the generic code | ||
| 49 | * in this file. | ||
| 50 | */ | ||
| 51 | __attribute__ ((weak)) void matrix_init_keymap(void) { } | ||
| 52 | __attribute__ ((weak)) void matrix_scan_keymap(void) { } | ||
| 53 | __attribute__ ((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
| 54 | return true; | ||
| 55 | } | ||
| 56 | __attribute__ ((weak)) uint32_t layer_state_set_keymap (uint32_t state) { | ||
| 57 | return state; | ||
| 58 | } | ||
| 59 | __attribute__ ((weak)) void led_set_keymap(uint8_t usb_led) { } | ||
| 60 | |||
| 61 | /* ----------------------- *\ | ||
| 62 | * -----RGB Functions----- * | ||
| 63 | \* ----------------------- */ | ||
| 64 | |||
| 65 | |||
| 66 | #ifdef RGBLIGHT_ENABLE | ||
| 67 | // Storage variables | ||
| 68 | extern rgblight_config_t rgblight_config; | ||
| 69 | bool base_sta; // Keeps track if in saveable state | ||
| 70 | bool base_tog; // Whether base state is active or not | ||
| 71 | int base_hue; // Hue value of base state | ||
| 72 | int base_sat; // Saturation value of base state | ||
| 73 | int base_val; // Brightness value of base state | ||
| 74 | uint8_t base_mod; // Animation mode of the base state | ||
| 75 | |||
| 76 | // Save the current state of the rgb mode | ||
| 77 | void rgblight_saveBase(void) { | ||
| 78 | base_hue = rgblight_config.hue; | ||
| 79 | base_sat = rgblight_config.sat; | ||
| 80 | base_val = rgblight_config.val; | ||
| 81 | base_mod = rgblight_config.mode; | ||
| 82 | base_tog = rgblight_config.enable; | ||
| 83 | base_sta = false; // If saving, that means base layer is being left | ||
| 84 | } | ||
| 85 | |||
| 86 | // Load the base state back | ||
| 87 | void rgblight_loadBase(void) { | ||
| 88 | // Don't do anything if not enabled | ||
| 89 | if ( !base_sta ) { | ||
| 90 | if ( base_tog ) { | ||
| 91 | rgblight_enable(); | ||
| 92 | rgblight_mode( base_mod ); | ||
| 93 | rgblight_sethsv( base_hue, base_sat, base_val ); | ||
| 94 | } else { | ||
| 95 | rgblight_disable(); | ||
| 96 | } | ||
| 97 | } | ||
| 98 | // Mark that base is loaded, and to be saved before leaving | ||
| 99 | base_sta = true; | ||
| 100 | } | ||
| 101 | |||
| 102 | // Set to plain HSV color | ||
| 103 | void rgblight_colorStatic( int hu, int sa, int va ) { | ||
| 104 | // First, it must be enabled or color change is not written | ||
| 105 | rgblight_enable(); | ||
| 106 | rgblight_mode(1); | ||
| 107 | rgblight_sethsv(hu,sa,va); | ||
| 108 | } | ||
| 109 | /* HSV values, thank you @drashna! | ||
| 110 | * white ( 0, 0, 255) | ||
| 111 | * red ( 0, 255, 255) | ||
| 112 | * coral ( 16, 176, 255) | ||
| 113 | * orange ( 39, 255, 255) | ||
| 114 | * goldenrod ( 43, 218, 218) | ||
| 115 | * gold ( 51, 255, 255) | ||
| 116 | * yellow ( 60, 255, 255) | ||
| 117 | * chartreuse ( 90, 255, 255) | ||
| 118 | * green (120, 255, 255) | ||
| 119 | * springgreen (150, 255, 255) | ||
| 120 | * turquoise (174, 90, 112) | ||
| 121 | * teal (180, 255, 128) | ||
| 122 | * cyan (180, 255, 255) | ||
| 123 | * azure (186, 102, 255) | ||
| 124 | * blue (240, 255, 255) | ||
| 125 | * purple (270, 255, 255) | ||
| 126 | * magenta (300, 255, 255) | ||
| 127 | * pink (330, 128, 255) | ||
| 128 | */ | ||
| 129 | // Set RGBLIGHT state depending on layer | ||
| 130 | void rgblight_change( uint8_t last_layer ) { | ||
| 131 | // Save state, if saving is requested | ||
| 132 | /* | ||
| 133 | if ( base_sta ) { | ||
| 134 | rgblight_saveBase(); | ||
| 135 | } | ||
| 136 | */ | ||
| 137 | // Change RGB light | ||
| 138 | switch ( last_layer ) { | ||
| 139 | case _DV: | ||
| 140 | // Load base layer | ||
| 141 | rgblight_loadBase(); | ||
| 142 | break; | ||
| 143 | case _AL: | ||
| 144 | // Do yellow for alternate | ||
| 145 | rgblight_colorStatic( 60,255,255); | ||
| 146 | break; | ||
| 147 | case _GA: | ||
| 148 | // Do purple for game | ||
| 149 | rgblight_colorStatic(285,255,255); | ||
| 150 | break; | ||
| 151 | case _NU: | ||
| 152 | // Do azure for number | ||
| 153 | rgblight_colorStatic(186,200,255); | ||
| 154 | break; | ||
| 155 | case _SE: | ||
| 156 | // Do red for settings | ||
| 157 | rgblight_colorStatic( 16,255,255); | ||
| 158 | break; | ||
| 159 | case _MO: | ||
| 160 | // Do green for mouse | ||
| 161 | rgblight_colorStatic(120,255,255); | ||
| 162 | break; | ||
| 163 | #ifdef AUDIO_ENABLE | ||
| 164 | case _MU: | ||
| 165 | // Do orange for music | ||
| 166 | rgblight_colorStatic( 39,255,255); | ||
| 167 | break; | ||
| 168 | #endif | ||
| 169 | default: | ||
| 170 | // Something went wrong | ||
| 171 | rgblight_colorStatic( 0,255,255); | ||
| 172 | break; | ||
| 173 | } | ||
| 174 | } | ||
| 175 | |||
| 176 | #endif | ||
| 177 | |||
| 178 | /*---------------------*\ | ||
| 179 | |*-----MATRIX INIT-----*| | ||
| 180 | \*---------------------*/ | ||
| 181 | void matrix_init_user (void) { | ||
| 182 | |||
| 183 | // Keymap specific things, do it first thing to allow for delays etc | ||
| 184 | matrix_init_keymap(); | ||
| 185 | |||
| 186 | // Correct unicode | ||
| 187 | set_unicode_input_mode(UC_LNX); | ||
| 188 | |||
| 189 | // Make beginning layer DVORAK | ||
| 190 | set_single_persistent_default_layer(_DV); | ||
| 191 | |||
| 192 | //--RGB light initialize base layer | ||
| 193 | #ifdef RGBLIGHT_ENABLE | ||
| 194 | // Base hue is white, and RGB disabled | ||
| 195 | base_hue = 100; | ||
| 196 | base_sat = 0; | ||
| 197 | base_val = 255; | ||
| 198 | base_mod = 2; | ||
| 199 | base_tog = false; | ||
| 200 | rgblight_enable(); | ||
| 201 | rgblight_mode(base_mod); | ||
| 202 | rgblight_sethsv(base_hue,base_sat,base_val); | ||
| 203 | rgblight_disable(); | ||
| 204 | rgblight_loadBase(); | ||
| 205 | #endif | ||
| 206 | |||
| 207 | } | ||
| 208 | |||
| 209 | /*---------------------*\ | ||
| 210 | |*-----MATRIX SCAN-----*| | ||
| 211 | \*---------------------*/ | ||
| 212 | void matrix_scan_user (void) { | ||
| 213 | // Keymap specific, do it first | ||
| 214 | matrix_scan_keymap(); | ||
| 215 | // Moved RGB check to layer_state_set_user | ||
| 216 | } | ||
| 217 | |||
| 218 | /*------------------*\ | ||
| 219 | |*-----KEYCODES-----*| | ||
| 220 | \*------------------*/ | ||
| 221 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 222 | |||
| 223 | // Shift check | ||
| 224 | bool is_capital = ( keyboard_report->mods & (MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)) ); | ||
| 225 | static bool lock_flag = false; | ||
| 226 | uint8_t layer = biton32 (layer_state); | ||
| 227 | |||
| 228 | switch (keycode) { | ||
| 229 | // Secrets implementation | ||
| 230 | case SECRET1 ... SECRET3: | ||
| 231 | #if (__has_include("secrets.h")) | ||
| 232 | if( !record->event.pressed ) { | ||
| 233 | send_string_P( secret[ keycode - SECRET1 ] ); | ||
| 234 | } | ||
| 235 | #endif | ||
| 236 | return false; | ||
| 237 | break; | ||
| 238 | // If these keys are pressed, load base layer config, and mark saving | ||
| 239 | case RGB_TOG: | ||
| 240 | case RGB_MOD: | ||
| 241 | case RGB_VAI: | ||
| 242 | case RGB_VAD: | ||
| 243 | case RGB_SAI: | ||
| 244 | case RGB_SAD: | ||
| 245 | case RGB_HUI: | ||
| 246 | case RGB_HUD: | ||
| 247 | #ifdef RGBLIGHT_ENABLE | ||
| 248 | if ( !base_sta ) { | ||
| 249 | rgblight_loadBase(); | ||
| 250 | } | ||
| 251 | #endif | ||
| 252 | return true; | ||
| 253 | break; | ||
| 254 | |||
| 255 | // Lock functionality: These layers are locked if the LOCKED buttons are | ||
| 256 | // pressed. Otherwise, they are momentary toggles | ||
| 257 | case K_LOCK: | ||
| 258 | if (record->event.pressed) { | ||
| 259 | lock_flag = !lock_flag; | ||
| 260 | } | ||
| 261 | return false; | ||
| 262 | break; | ||
| 263 | case K_MOUSE: | ||
| 264 | #ifdef MOUSEKEY_ENABLE | ||
| 265 | if (record->event.pressed) { | ||
| 266 | layer_on(_MO); | ||
| 267 | lock_flag = false; | ||
| 268 | } else { | ||
| 269 | if ( lock_flag ) { | ||
| 270 | lock_flag = false; | ||
| 271 | } else { | ||
| 272 | layer_off(_MO); | ||
| 273 | } | ||
| 274 | } | ||
| 275 | #endif | ||
| 276 | return false; | ||
| 277 | break; | ||
| 278 | case K_NUMBR: | ||
| 279 | if (record->event.pressed) { | ||
| 280 | layer_on(_NU); | ||
| 281 | lock_flag = false; | ||
| 282 | } else { | ||
| 283 | if ( lock_flag ) { | ||
| 284 | lock_flag = false; | ||
| 285 | } else { | ||
| 286 | layer_off(_NU); | ||
| 287 | } | ||
| 288 | } | ||
| 289 | return false; | ||
| 290 | break; | ||
| 291 | |||
| 292 | // Layer switches with sound | ||
| 293 | case K_GAMES: | ||
| 294 | if (record->event.pressed) { | ||
| 295 | // On press, turn off layer if active | ||
| 296 | if ( layer == _GA ) { | ||
| 297 | #ifdef AUDIO_ENABLE | ||
| 298 | stop_all_notes(); | ||
| 299 | PLAY_SONG(tone_return); | ||
| 300 | #endif | ||
| 301 | layer_off(_GA); | ||
| 302 | } | ||
| 303 | } else { | ||
| 304 | // After click, turn on layer if accessed from setting | ||
| 305 | if ( layer == _SE ) { | ||
| 306 | #ifdef AUDIO_ENABLE | ||
| 307 | stop_all_notes(); | ||
| 308 | PLAY_SONG(tone_game); | ||
| 309 | #endif | ||
| 310 | layer_on(_GA); | ||
| 311 | layer_off(_SE); | ||
| 312 | } | ||
| 313 | } | ||
| 314 | return false; | ||
| 315 | break; | ||
| 316 | case MU_TOG: | ||
| 317 | #ifdef AUDIO_ENABLE | ||
| 318 | if (record->event.pressed) { | ||
| 319 | // On press, turn off layer if active | ||
| 320 | if ( layer == _SE ) { | ||
| 321 | layer_off(_SE); | ||
| 322 | layer_on(_MU); | ||
| 323 | } else { | ||
| 324 | layer_off(_MU); | ||
| 325 | } | ||
| 326 | } | ||
| 327 | #endif | ||
| 328 | return true; | ||
| 329 | break; | ||
| 330 | |||
| 331 | //------UNICODE | ||
| 332 | // Unicode switches with sound | ||
| 333 | case UNI_LI: | ||
| 334 | #ifdef UNICODE_ENABLE | ||
| 335 | if (record->event.pressed) { | ||
| 336 | #ifdef AUDIO_ENABLE | ||
| 337 | stop_all_notes(); | ||
| 338 | PLAY_SONG(tone_linux); | ||
| 339 | #endif | ||
| 340 | set_unicode_input_mode(UC_LNX); | ||
| 341 | } | ||
| 342 | #endif | ||
| 343 | return false; | ||
| 344 | break; | ||
| 345 | case UNI_WN: | ||
| 346 | #ifdef UNICODE_ENABLE | ||
| 347 | if (record->event.pressed) { | ||
| 348 | #ifdef AUDIO_ENABLE | ||
| 349 | stop_all_notes(); | ||
| 350 | PLAY_SONG(tone_windows); | ||
| 351 | #endif | ||
| 352 | set_unicode_input_mode(UC_WIN); | ||
| 353 | } | ||
| 354 | #endif | ||
| 355 | return false; | ||
| 356 | break; | ||
| 357 | |||
| 358 | // Turkish letters, with capital functionality | ||
| 359 | case TUR_A: | ||
| 360 | #ifdef UNICODE_ENABLE | ||
| 361 | if (record->event.pressed) { | ||
| 362 | if ( is_capital ) { | ||
| 363 | unicode_input_start(); | ||
| 364 | register_hex(0x00c2); | ||
| 365 | unicode_input_finish(); | ||
| 366 | } else { | ||
| 367 | unicode_input_start(); | ||
| 368 | register_hex(0x00e2); | ||
| 369 | unicode_input_finish(); | ||
| 370 | } | ||
| 371 | } | ||
| 372 | #endif | ||
| 373 | return false; | ||
| 374 | break; | ||
| 375 | case TUR_O: | ||
| 376 | #ifdef UNICODE_ENABLE | ||
| 377 | if (record->event.pressed) { | ||
| 378 | if ( is_capital ) { | ||
| 379 | unicode_input_start(); | ||
| 380 | register_hex(0x00d6); | ||
| 381 | unicode_input_finish(); | ||
| 382 | } else { | ||
| 383 | unicode_input_start(); | ||
| 384 | register_hex(0x00f6); | ||
| 385 | unicode_input_finish(); | ||
| 386 | } | ||
| 387 | } | ||
| 388 | #endif | ||
| 389 | return false; | ||
| 390 | break; | ||
| 391 | case TUR_U: | ||
| 392 | #ifdef UNICODE_ENABLE | ||
| 393 | if (record->event.pressed) { | ||
| 394 | if ( is_capital ) { | ||
| 395 | unicode_input_start(); | ||
| 396 | register_hex(0x00dc); | ||
| 397 | unicode_input_finish(); | ||
| 398 | } else { | ||
| 399 | unicode_input_start(); | ||
| 400 | register_hex(0x00fc); | ||
| 401 | unicode_input_finish(); | ||
| 402 | } | ||
| 403 | } | ||
| 404 | #endif | ||
| 405 | return false; | ||
| 406 | break; | ||
| 407 | case TUR_I: | ||
| 408 | #ifdef UNICODE_ENABLE | ||
| 409 | if (record->event.pressed) { | ||
| 410 | if ( is_capital ) { | ||
| 411 | unicode_input_start(); | ||
| 412 | register_hex(0x0130); | ||
| 413 | unicode_input_finish(); | ||
| 414 | } else { | ||
| 415 | unicode_input_start(); | ||
| 416 | register_hex(0x0131); | ||
| 417 | unicode_input_finish(); | ||
| 418 | } | ||
| 419 | } | ||
| 420 | #endif | ||
| 421 | return false; | ||
| 422 | break; | ||
| 423 | case TUR_G: | ||
| 424 | #ifdef UNICODE_ENABLE | ||
| 425 | if (record->event.pressed) { | ||
| 426 | if ( is_capital ) { | ||
| 427 | unicode_input_start(); | ||
| 428 | register_hex(0x011e); | ||
| 429 | unicode_input_finish(); | ||
| 430 | } else { | ||
| 431 | unicode_input_start(); | ||
| 432 | register_hex(0x011f); | ||
| 433 | unicode_input_finish(); | ||
| 434 | } | ||
| 435 | } | ||
| 436 | #endif | ||
| 437 | return false; | ||
| 438 | break; | ||
| 439 | case TUR_C: | ||
| 440 | #ifdef UNICODE_ENABLE | ||
| 441 | if (record->event.pressed) { | ||
| 442 | if ( is_capital ) { | ||
| 443 | unicode_input_start(); | ||
| 444 | register_hex(0x00c7); | ||
| 445 | unicode_input_finish(); | ||
| 446 | } else { | ||
| 447 | unicode_input_start(); | ||
| 448 | register_hex(0x00e7); | ||
| 449 | unicode_input_finish(); | ||
| 450 | } | ||
| 451 | } | ||
| 452 | #endif | ||
| 453 | return false; | ||
| 454 | break; | ||
| 455 | case TUR_S: | ||
| 456 | #ifdef UNICODE_ENABLE | ||
| 457 | if (record->event.pressed) { | ||
| 458 | if ( is_capital ) { | ||
| 459 | unicode_input_start(); | ||
| 460 | register_hex(0x015e); | ||
| 461 | unicode_input_finish(); | ||
| 462 | } else { | ||
| 463 | unicode_input_start(); | ||
| 464 | register_hex(0x015f); | ||
| 465 | unicode_input_finish(); | ||
| 466 | } | ||
| 467 | } | ||
| 468 | #endif | ||
| 469 | return false; | ||
| 470 | break; | ||
| 471 | |||
| 472 | //-------Diagonal mouse movements | ||
| 473 | case MO_NE: | ||
| 474 | #ifdef MOUSEKEY_ENABLE | ||
| 475 | if( record->event.pressed ) { | ||
| 476 | mousekey_on(MO_N); | ||
| 477 | mousekey_on(MO_E); | ||
| 478 | mousekey_send(); | ||
| 479 | } else { | ||
| 480 | mousekey_off(MO_N); | ||
| 481 | mousekey_off(MO_E); | ||
| 482 | mousekey_send(); | ||
| 483 | } | ||
| 484 | #endif | ||
| 485 | return false; | ||
| 486 | break; | ||
| 487 | case MO_NW: | ||
| 488 | #ifdef MOUSEKEY_ENABLE | ||
| 489 | if( record->event.pressed ) { | ||
| 490 | mousekey_on(MO_N); | ||
| 491 | mousekey_on(MO_W); | ||
| 492 | mousekey_send(); | ||
| 493 | } else { | ||
| 494 | mousekey_off(MO_N); | ||
| 495 | mousekey_off(MO_W); | ||
| 496 | mousekey_send(); | ||
| 497 | } | ||
| 498 | #endif | ||
| 499 | return false; | ||
| 500 | break; | ||
| 501 | case MO_SE: | ||
| 502 | #ifdef MOUSEKEY_ENABLE | ||
| 503 | if( record->event.pressed ) { | ||
| 504 | mousekey_on(MO_S); | ||
| 505 | mousekey_on(MO_E); | ||
| 506 | mousekey_send(); | ||
| 507 | } else { | ||
| 508 | mousekey_off(MO_S); | ||
| 509 | mousekey_off(MO_E); | ||
| 510 | mousekey_send(); | ||
| 511 | } | ||
| 512 | #endif | ||
| 513 | return false; | ||
| 514 | break; | ||
| 515 | case MO_SW: | ||
| 516 | #ifdef MOUSEKEY_ENABLE | ||
| 517 | if( record->event.pressed ) { | ||
| 518 | mousekey_on(MO_S); | ||
| 519 | mousekey_on(MO_W); | ||
| 520 | mousekey_send(); | ||
| 521 | } else { | ||
| 522 | mousekey_off(MO_S); | ||
| 523 | mousekey_off(MO_W); | ||
| 524 | mousekey_send(); | ||
| 525 | } | ||
| 526 | #endif | ||
| 527 | return false; | ||
| 528 | break; | ||
| 529 | case MO_S_NE: | ||
| 530 | #ifdef MOUSEKEY_ENABLE | ||
| 531 | if( record->event.pressed ) { | ||
| 532 | mousekey_on(MO_S_N); | ||
| 533 | mousekey_on(MO_S_E); | ||
| 534 | mousekey_send(); | ||
| 535 | } else { | ||
| 536 | mousekey_off(MO_S_N); | ||
| 537 | mousekey_off(MO_S_E); | ||
| 538 | mousekey_send(); | ||
| 539 | } | ||
| 540 | #endif | ||
| 541 | return false; | ||
| 542 | break; | ||
| 543 | case MO_S_NW: | ||
| 544 | #ifdef MOUSEKEY_ENABLE | ||
| 545 | if( record->event.pressed ) { | ||
| 546 | mousekey_on(MO_S_N); | ||
| 547 | mousekey_on(MO_S_W); | ||
| 548 | mousekey_send(); | ||
| 549 | } else { | ||
| 550 | mousekey_off(MO_S_N); | ||
| 551 | mousekey_off(MO_S_W); | ||
| 552 | mousekey_send(); | ||
| 553 | } | ||
| 554 | #endif | ||
| 555 | return false; | ||
| 556 | break; | ||
| 557 | case MO_S_SE: | ||
| 558 | #ifdef MOUSEKEY_ENABLE | ||
| 559 | if( record->event.pressed ) { | ||
| 560 | mousekey_on(MO_S_S); | ||
| 561 | mousekey_on(MO_S_E); | ||
| 562 | mousekey_send(); | ||
| 563 | } else { | ||
| 564 | mousekey_off(MO_S_S); | ||
| 565 | mousekey_off(MO_S_E); | ||
| 566 | mousekey_send(); | ||
| 567 | } | ||
| 568 | #endif | ||
| 569 | return false; | ||
| 570 | break; | ||
| 571 | case MO_S_SW: | ||
| 572 | #ifdef MOUSEKEY_ENABLE | ||
| 573 | if( record->event.pressed ) { | ||
| 574 | mousekey_on(MO_S_S); | ||
| 575 | mousekey_on(MO_S_W); | ||
| 576 | mousekey_send(); | ||
| 577 | } else { | ||
| 578 | mousekey_off(MO_S_S); | ||
| 579 | mousekey_off(MO_S_W); | ||
| 580 | mousekey_send(); | ||
| 581 | } | ||
| 582 | #endif | ||
| 583 | return false; | ||
| 584 | break; | ||
| 585 | //------DOUBLE PRESS, with added left navigation | ||
| 586 | case DBL_SPC: | ||
| 587 | if( record->event.pressed ) { | ||
| 588 | SEND_STRING(" "SS_TAP(X_LEFT)); | ||
| 589 | } | ||
| 590 | return false; | ||
| 591 | break; | ||
| 592 | case DBL_ANG: | ||
| 593 | if( record->event.pressed ) { | ||
| 594 | SEND_STRING("<>"SS_TAP(X_LEFT)); | ||
| 595 | } | ||
| 596 | return false; | ||
| 597 | break; | ||
| 598 | case DBL_PAR: | ||
| 599 | if( record->event.pressed ) { | ||
| 600 | SEND_STRING("()"SS_TAP(X_LEFT)); | ||
| 601 | } | ||
| 602 | return false; | ||
| 603 | break; | ||
| 604 | case DBL_SQR: | ||
| 605 | if( record->event.pressed ) { | ||
| 606 | SEND_STRING("[]"SS_TAP(X_LEFT)); | ||
| 607 | } | ||
| 608 | return false; | ||
| 609 | break; | ||
| 610 | case DBL_BRC: | ||
| 611 | if( record->event.pressed ) { | ||
| 612 | SEND_STRING("{}"SS_TAP(X_LEFT)); | ||
| 613 | } | ||
| 614 | return false; | ||
| 615 | break; | ||
| 616 | case DBL_QUO: | ||
| 617 | if( record->event.pressed ) { | ||
| 618 | SEND_STRING("\'\'"SS_TAP(X_LEFT)); | ||
| 619 | } | ||
| 620 | return false; | ||
| 621 | break; | ||
| 622 | case DBL_DQT: | ||
| 623 | if( record->event.pressed ) { | ||
| 624 | SEND_STRING("\"\""SS_TAP(X_LEFT)); | ||
| 625 | } | ||
| 626 | return false; | ||
| 627 | break; | ||
| 628 | case DBL_GRV: | ||
| 629 | if( record->event.pressed ) { | ||
| 630 | SEND_STRING("``"SS_TAP(X_LEFT)); | ||
| 631 | } | ||
| 632 | return false; | ||
| 633 | break; | ||
| 634 | // END OF KEYCODES | ||
| 635 | } | ||
| 636 | return process_record_keymap(keycode, record); | ||
| 637 | } | ||
| 638 | |||
| 639 | /*----------------------*\ | ||
| 640 | |*-----LAYER CHANGE-----*| | ||
| 641 | \*----------------------*/ | ||
| 642 | |||
| 643 | uint32_t layer_state_set_user(uint32_t state) { | ||
| 644 | |||
| 645 | state = layer_state_set_keymap (state); | ||
| 646 | #ifdef RGBLIGHT_ENABLE | ||
| 647 | // Change RGB lighting depending on the last layer activated | ||
| 648 | rgblight_change( biton32(state) ); | ||
| 649 | #endif | ||
| 650 | return state; | ||
| 651 | } | ||
diff --git a/users/bbaserdem/bbaserdem.h b/users/bbaserdem/bbaserdem.h new file mode 100644 index 000000000..1b1b53710 --- /dev/null +++ b/users/bbaserdem/bbaserdem.h | |||
| @@ -0,0 +1,279 @@ | |||
| 1 | #ifndef USERSPACE | ||
| 2 | #define USERSPACE | ||
| 3 | |||
| 4 | #include "quantum.h" | ||
| 5 | |||
| 6 | // Use 7 wide characters for keymaps | ||
| 7 | #define _______ KC_TRNS | ||
| 8 | #define XXX KC_NO | ||
| 9 | |||
| 10 | // Layers | ||
| 11 | #define _DV 0 // Base layer | ||
| 12 | #define _AL 1 // Alt char overlay | ||
| 13 | #define _GA 2 // Game layer | ||
| 14 | #define _NU 3 // Numbers layer | ||
| 15 | #define _SE 4 // Settings layer | ||
| 16 | #define _MO 5 // Mouse emulation | ||
| 17 | #define _MU 6 // Music mode | ||
| 18 | |||
| 19 | // Define short macros | ||
| 20 | #define UNDO LCTL(KC_Z) | ||
| 21 | #define REDO LCTL(KC_Y) | ||
| 22 | #define COPY LCTL(KC_C) | ||
| 23 | #define CUT LCTL(KC_X) | ||
| 24 | #define PASTE LCTL(KC_V) | ||
| 25 | |||
| 26 | // Rename mouse keys | ||
| 27 | #ifdef MOUSEKEY_ENABLE | ||
| 28 | #define MO_S_N KC_MS_WH_UP | ||
| 29 | #define MO_S_S KC_MS_WH_DOWN | ||
| 30 | #define MO_S_E KC_MS_WH_RIGHT | ||
| 31 | #define MO_S_W KC_MS_WH_LEFT | ||
| 32 | #define MO_N KC_MS_UP | ||
| 33 | #define MO_S KC_MS_DOWN | ||
| 34 | #define MO_E KC_MS_RIGHT | ||
| 35 | #define MO_W KC_MS_LEFT | ||
| 36 | #define MO_CL_L KC_MS_BTN1 | ||
| 37 | #define MO_CL_R KC_MS_BTN2 | ||
| 38 | #define MO_CL_M KC_MS_BTN3 | ||
| 39 | #define MO_CL_4 KC_MS_BTN4 | ||
| 40 | #define MO_CL_5 KC_MS_BTN5 | ||
| 41 | #define MO_AC_0 KC_MS_ACCEL0 | ||
| 42 | #define MO_AC_1 KC_MS_ACCEL1 | ||
| 43 | #define MO_AC_2 KC_MS_ACCEL2 | ||
| 44 | #else | ||
| 45 | #define MO_S_N KC_NO | ||
| 46 | #define MO_S_S KC_NO | ||
| 47 | #define MO_S_E KC_NO | ||
| 48 | #define MO_S_W KC_NO | ||
| 49 | #define MO_N KC_NO | ||
| 50 | #define MO_S KC_NO | ||
| 51 | #define MO_E KC_NO | ||
| 52 | #define MO_W KC_NO | ||
| 53 | #define MO_CL_L KC_NO | ||
| 54 | #define MO_CL_R KC_NO | ||
| 55 | #define MO_CL_M KC_NO | ||
| 56 | #define MO_CL_1 KC_NO | ||
| 57 | #define MO_CL_2 KC_NO | ||
| 58 | #define MO_AC_0 KC_NO | ||
| 59 | #define MO_AC_1 KC_NO | ||
| 60 | #define MO_AC_2 KC_NO | ||
| 61 | #endif | ||
| 62 | |||
| 63 | // Define non-capitalized UTF shortcuts here | ||
| 64 | #ifdef UNICODE_ENABLE | ||
| 65 | #define PHY_HBR UC(0x0127) | ||
| 66 | #define PHY_DEG UC(0x00b0) | ||
| 67 | #define CUR_LIR UC(0x20ba) | ||
| 68 | #define CUR_BIT UC(0x20bf) | ||
| 69 | #define CUR_EUR UC(0x20ac) | ||
| 70 | #define CUR_BPN UC(0x00a3) | ||
| 71 | #define CUR_YEN UC(0x00a5) | ||
| 72 | #else | ||
| 73 | #define PHY_HBR KC_NO | ||
| 74 | #define PHY_DEG KC_NO | ||
| 75 | #define CUR_LIR KC_NO | ||
| 76 | #define CUR_BIT KC_NO | ||
| 77 | #define CUR_EUR KC_NO | ||
| 78 | #define CUR_BPN KC_NO | ||
| 79 | #define CUR_YEN KC_NO | ||
| 80 | #endif | ||
| 81 | |||
| 82 | // Make only KC_NO be grabbed by music mode | ||
| 83 | #ifdef AUDIO_ENABLE | ||
| 84 | #define MUSIC_MASK keycode == XXX | ||
| 85 | #endif | ||
| 86 | |||
| 87 | // Custom keycodes | ||
| 88 | enum userspace_custom_keycodes { | ||
| 89 | // Turkish letters, with shifting | ||
| 90 | TUR_A = SAFE_RANGE, | ||
| 91 | TUR_C, | ||
| 92 | TUR_G, | ||
| 93 | TUR_I, | ||
| 94 | TUR_O, | ||
| 95 | TUR_S, | ||
| 96 | TUR_U, | ||
| 97 | // Unicode mode switch | ||
| 98 | UNI_LI, | ||
| 99 | UNI_WN, | ||
| 100 | // Double keys | ||
| 101 | DBL_SPC, | ||
| 102 | DBL_ANG, | ||
| 103 | DBL_PAR, | ||
| 104 | DBL_SQR, | ||
| 105 | DBL_BRC, | ||
| 106 | DBL_QUO, | ||
| 107 | DBL_DQT, | ||
| 108 | DBL_GRV, | ||
| 109 | // Diagonal mouse movements | ||
| 110 | MO_NE, | ||
| 111 | MO_NW, | ||
| 112 | MO_SE, | ||
| 113 | MO_SW, | ||
| 114 | MO_S_NE, | ||
| 115 | MO_S_NW, | ||
| 116 | MO_S_SE, | ||
| 117 | MO_S_SW, | ||
| 118 | // Layer switches and lock functionality | ||
| 119 | K_MOUSE, | ||
| 120 | K_NUMBR, | ||
| 121 | K_LOCK, | ||
| 122 | K_GAMES, | ||
| 123 | // Secret macros | ||
| 124 | SECRET1, | ||
| 125 | SECRET2, | ||
| 126 | SECRET3 | ||
| 127 | }; | ||
| 128 | |||
| 129 | // Do tap dancable semicolon key if available | ||
| 130 | #ifdef TAP_DANCE_ENABLE | ||
| 131 | #define TAPPING_TERM 300 | ||
| 132 | #define TAPPING_TOGGLE 1 | ||
| 133 | enum { | ||
| 134 | SCL = 0 | ||
| 135 | }; | ||
| 136 | #define MY_SCL TD(SCL) | ||
| 137 | #else | ||
| 138 | #define MY_SCL KC_SCLN | ||
| 139 | #endif | ||
| 140 | |||
| 141 | // Shared keymaps | ||
| 142 | #define KM(...) KEYMAP(__VA_ARGS__) // Required to expand the CSVs | ||
| 143 | |||
| 144 | /* Dvorak | ||
| 145 | * ,------------------------------------------------------------------------. | ||
| 146 | * | Esc | ' " | , | . | P | Y || F | G | C | R | L | Bkp | | ||
| 147 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 148 | * | Tab | A | O | E | U | I || D | H | T | N | S | / ? | | ||
| 149 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 150 | * | SYM | ; : | Q | J | K | X || B | M | W | V | Z | SET | | ||
| 151 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 152 | * | TUR | OS | Ctrl| Alt | Shf | Spc || Ent | Lft | Dwn | Up | Rght| MSE | | ||
| 153 | * `------------------------------------------------------------------------' */ | ||
| 154 | #define DVORAK_1 \ | ||
| 155 | KC_ESC, KC_QUOT,KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC | ||
| 156 | #define DVORAK_2 \ | ||
| 157 | KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH | ||
| 158 | #define DVORAK_3 \ | ||
| 159 | K_NUMBR,MY_SCL, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_SE) | ||
| 160 | #define DVORAK_4 \ | ||
| 161 | MO(_AL),KC_LGUI,KC_LCTL,KC_LALT,KC_LSFT,KC_SPC, KC_ENT, KC_LEFT,KC_DOWN,KC_RGHT,KC_UP, K_MOUSE | ||
| 162 | #define DVORAK KM(DVORAK_1,DVORAK_2,DVORAK_3,DVORAK_4) | ||
| 163 | |||
| 164 | /* Alternative character overlay | ||
| 165 | * ,------------------------------------------------------------------------. | ||
| 166 | * | | ' ' | Undo| Redo|Pound| Yen || | G | C | |TLira| Del | | ||
| 167 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 168 | * | | A | O | Euro| U | I ||Degre|Plank| | | S | Ins | | ||
| 169 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 170 | * | | " " | Cut | Copy|Paste| || BTC | < > | ( ) | [ ] | { } | PgUp| | ||
| 171 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 172 | * | | | | | | || | Home|PgDwn| PgUp| End | | | ||
| 173 | * `------------------------------------------------------------------------' */ | ||
| 174 | #define ALTCHAR_1 \ | ||
| 175 | _______,DBL_QUO,UNDO, REDO, CUR_BPN,CUR_YEN,_______,TUR_G, TUR_C, _______,CUR_LIR,KC_DEL | ||
| 176 | #define ALTCHAR_2 \ | ||
| 177 | _______,TUR_A, TUR_O, CUR_EUR,TUR_U, TUR_I, PHY_DEG,PHY_HBR,_______,_______,TUR_S, KC_INS | ||
| 178 | #define ALTCHAR_3 \ | ||
| 179 | _______,DBL_DQT,CUT, COPY, PASTE, _______,CUR_BIT,DBL_ANG,DBL_PAR,DBL_SQR,DBL_BRC,_______ | ||
| 180 | #define ALTCHAR_4 \ | ||
| 181 | _______,_______,_______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP,KC_END,_______ | ||
| 182 | #define ALTCHAR KM(ALTCHAR_1,ALTCHAR_2,ALTCHAR_3,ALTCHAR_4) | ||
| 183 | |||
| 184 | /* Game layer | ||
| 185 | * ,------------------------------------------------------------------------. | ||
| 186 | * | OFF | Q | W | E | R | T || Esc | 7 | 8 | 9 |NumLk|Bkspc| | ||
| 187 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 188 | * | Tab | A | S | D | F | G || F1 | 4 | 5 | 6 | \ | Ent | | ||
| 189 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 190 | * | | Z | X | C | V | B || F2 | 1 | 2 | 3 | ^ | | | ||
| 191 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 192 | * | / | ` | | | | Spc || Spc | Ent | 0 | < | v | > | | ||
| 193 | * `------------------------------------------------------------------------' */ | ||
| 194 | #define GAME_1 \ | ||
| 195 | K_GAMES,KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_P7, KC_P8, KC_P9, KC_NLCK,KC_BSPC | ||
| 196 | #define GAME_2 \ | ||
| 197 | KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F1, KC_P4, KC_P5, KC_P6, KC_BSLS,KC_ENT | ||
| 198 | #define GAME_3 \ | ||
| 199 | _______,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F2, KC_P1, KC_P2, KC_P3, KC_UP, _______ | ||
| 200 | #define GAME_4 \ | ||
| 201 | KC_SLSH,KC_GRV, _______,_______,_______,KC_SPC, KC_SPC, KC_ENT, KC_P0, KC_LEFT,KC_DOWN,KC_RGHT | ||
| 202 | #define GAME KM(GAME_1,GAME_2,GAME_3,GAME_4) | ||
| 203 | |||
| 204 | /* Symbols layer | ||
| 205 | * ,------------------------------------------------------------------------. | ||
| 206 | * | OFF | ` | ~ | [ | ] | { || } | - | _ | = | + | | | ||
| 207 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 208 | * | | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | \ | | ||
| 209 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 210 | * | | ! | @ | # | $ | % || ^ | & | * | ( | ) | LCK | | ||
| 211 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 212 | * | | | | | | | | || | | | | | | | ||
| 213 | * `------------------------------------------------------------------------' */ | ||
| 214 | #define NUMBERS_1 \ | ||
| 215 | K_NUMBR,KC_GRV, KC_TILD,KC_LBRC,KC_RBRC,KC_LCBR,KC_RCBR,KC_MINS,KC_UNDS,KC_EQL, KC_PLUS,_______ | ||
| 216 | #define NUMBERS_2 \ | ||
| 217 | _______,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS | ||
| 218 | #define NUMBERS_3 \ | ||
| 219 | _______,KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,K_LOCK | ||
| 220 | #define NUMBERS_4 \ | ||
| 221 | KC_PIPE,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ | ||
| 222 | #define NUMBERS KM(NUMBERS_1,NUMBERS_2,NUMBERS_3,NUMBERS_4) | ||
| 223 | |||
| 224 | /* Settings layer | ||
| 225 | * ,------------------------------------------------------------------------. | ||
| 226 | * |BLLed| F1 | F2 | F3 | F4 | Lin || Win | Wake| |Hue -|Hue +|Reset| | ||
| 227 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 228 | * | | F5 | F6 | F7 | F8 | || | |RGBto|Sat -|Sat +| | | ||
| 229 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 230 | * | Game| F9 | F10 | F11 | F12 |Vol 0||PrtSc| |RGBan|Bri -|Bri +| | | ||
| 231 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 232 | * |Musir| | | | |Vol -||Vol +| Prev| Stop|TogMu| Next| | | ||
| 233 | * `------------------------------------------------------------------------' */ | ||
| 234 | #define SETTINGS_1 \ | ||
| 235 | BL_STEP,KC_F1, KC_F2, KC_F3, KC_F4, UNI_LI, UNI_WN, KC_WAKE,_______,RGB_HUD,RGB_HUI,RESET | ||
| 236 | #define SETTINGS_2 \ | ||
| 237 | _______,KC_F5, KC_F6, KC_F7, KC_F8, _______,_______,_______,RGB_TOG,RGB_SAD,RGB_SAI,_______ | ||
| 238 | #define SETTINGS_3 \ | ||
| 239 | K_GAMES,KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE,KC_PSCR,_______,RGB_MOD,RGB_VAD,RGB_VAI,_______ | ||
| 240 | #define SETTINGS_4 \ | ||
| 241 | MU_TOG, _______,_______,_______,_______,KC_VOLD,KC_VOLU,KC_MPRV,KC_MSTP,KC_MPLY,KC_MNXT,_______ | ||
| 242 | #define SETTINGS KM(SETTINGS_1,SETTINGS_2,SETTINGS_3,SETTINGS_4) | ||
| 243 | |||
| 244 | /* Mouse layer | ||
| 245 | * ,------------------------------------------------------------------------. | ||
| 246 | * |Ulock| \ | ^ | / |.....|.....||.....|.....| |\|.| |^| | |/|.| | | ||
| 247 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 248 | * | | < | Mid | > |Btn 4|.....||.....|Btn 5| <-- | Mid | --> | | | ||
| 249 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 250 | * | | / | v | \ |.....|.....||.....|.....| |/| | |v| | |\| | LCK | | ||
| 251 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 252 | * | | | | | | Left||Right| | |Accl0|Accl1|Accl2| | ||
| 253 | * `------------------------------------------------------------------------' */ | ||
| 254 | #define MOUSE_1 \ | ||
| 255 | K_MOUSE,MO_NW, MO_N, MO_NE, XXX, XXX ,XXX, XXX, MO_S_NW,MO_S_N, MO_S_NE,_______ | ||
| 256 | #define MOUSE_2 \ | ||
| 257 | _______,MO_W, MO_CL_M,MO_E, MO_CL_4,XXX ,XXX, MO_CL_5,MO_S_W, MO_CL_M,MO_S_E, _______ | ||
| 258 | #define MOUSE_3 \ | ||
| 259 | _______,MO_SW, MO_S, MO_SE, XXX, XXX ,XXX, XXX, MO_S_SW,MO_S_S, MO_S_SE,K_LOCK | ||
| 260 | #define MOUSE_4 \ | ||
| 261 | _______,_______,_______,_______,_______,MO_CL_L,MO_CL_R,_______,MO_AC_0,MO_AC_1,MO_AC_2,_______ | ||
| 262 | #define MOUSE KM(MOUSE_1,MOUSE_2,MOUSE_3,MOUSE_4) | ||
| 263 | |||
| 264 | /* Music layer | ||
| 265 | * ,------------------------------------------------------------------------. | ||
| 266 | * |.....|.....|.....|.....|.....|.....||.....|.....|.....|.....|.....|.....| | ||
| 267 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 268 | * |.....|.....|.....|.....|.....|.....||.....|.....|.....|.....|.....|.....| | ||
| 269 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 270 | * |.....|.....|.....|.....|.....|.....||.....|.....|.....|.....|.....|.....| | ||
| 271 | * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| | ||
| 272 | * | togg| rec | stop| play| slow| fast||modes|.....|.....|.....|.....|.....| | ||
| 273 | * `------------------------------------------------------------------------' | ||
| 274 | */ | ||
| 275 | #define MASK XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX | ||
| 276 | #define MUSIC_4 MU_TOG, KC_LCTL, KC_LALT, KC_LGUI, KC_DOWN, KC_UP, MU_MOD, XXX, XXX, XXX, XXX, XXX | ||
| 277 | #define MUSIC KM(MASK,MASK,MASK,MUSIC_4) | ||
| 278 | |||
| 279 | #endif | ||
diff --git a/users/bbaserdem/rules.mk b/users/bbaserdem/rules.mk new file mode 100644 index 000000000..513ce4fe0 --- /dev/null +++ b/users/bbaserdem/rules.mk | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | SRC += bbaserdem.c | ||
| 2 | EXTRAFLAGS += -flto | ||
| 3 | |||
| 4 | # ENABLE | ||
| 5 | UNICODE_ENABLE = yes # Used for unicode character emulation | ||
| 6 | EXTRAKEY_ENABLE = yes # OS signals like volume control | ||
| 7 | |||
| 8 | # DISABLE | ||
| 9 | BLUETOOTH_ENABLE = no # No bluetooth | ||
| 10 | COMMAND_ENABLE = no # Some bootmagic thing | ||
| 11 | BOOTMAGIC_ENABLE = no # Access to EEPROM settings, not needed | ||
| 12 | CONSOLE_ENABLE = no # Allows console output with a command | ||
| 13 | SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested. | ||
| 14 | NKRO_ENABLE = no # Default is 6KRO which is plenty | ||
| 15 | MIDI_ENABLE = no # Untested feature | ||
| 16 | FAUXCLICKY_ENABLE = no # Emulates clicks using speaker | ||
| 17 | KEY_LOCK_ENABLE = no # Allows locking any key. Not used | ||
| 18 | API_SYSEX_ENABLE = no # Allows OS to send signals. | ||
| 19 | KEY_LOCK_ENABLE = no # Allows locking any key. Not used | ||
| 20 | |||
| 21 | # Disabling this makes it compile, prob bad upstream code | ||
| 22 | # VARIABLE_TRACE = no # Allows debugging variables | ||
