aboutsummaryrefslogtreecommitdiff
path: root/users/bbaserdem
diff options
context:
space:
mode:
authorBatuhan Baserdem <bbaserdem@users.noreply.github.com>2018-07-18 23:17:55 -0400
committerDrashna Jaelre <drashna@live.com>2018-07-18 20:17:55 -0700
commit738a9fc16c833d79831c5a26eb33880661e33524 (patch)
treee79b6c21bdbd263ef4e2a2c8dc3bf8a3377e6f41 /users/bbaserdem
parentb89cec9ebc5ef0a4c0ff820414007006c7b497fa (diff)
downloadqmk_firmware-738a9fc16c833d79831c5a26eb33880661e33524.tar.gz
qmk_firmware-738a9fc16c833d79831c5a26eb33880661e33524.zip
Userspace update for user bbaserdem (#3443)
* 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 * Lets split eh * Finalized things regarding keymap
Diffstat (limited to 'users/bbaserdem')
-rw-r--r--users/bbaserdem/README.md20
-rw-r--r--users/bbaserdem/bbaserdem.c86
-rw-r--r--users/bbaserdem/bbaserdem.h117
-rw-r--r--users/bbaserdem/config.h9
-rw-r--r--users/bbaserdem/rules.mk14
5 files changed, 116 insertions, 130 deletions
diff --git a/users/bbaserdem/README.md b/users/bbaserdem/README.md
index 2011e74b6..eb8f33d42 100644
--- a/users/bbaserdem/README.md
+++ b/users/bbaserdem/README.md
@@ -6,6 +6,7 @@ For this purpose, I collected them here.
6I have the following keymaps: 6I have the following keymaps:
7 7
8* Gherkin (Does not use the user space) 8* Gherkin (Does not use the user space)
9* XD75RE (Uses different keymap)
9* Let's Split 10* Let's Split
10* Let's Split It Up 11* Let's Split It Up
11* Planck 12* Planck
@@ -13,37 +14,38 @@ I have the following keymaps:
13# Layout 14# Layout
14 15
15I use DVORAK with an unorthodox Turkish layout. 16I use DVORAK with an unorthodox Turkish layout.
16If you wanna grab my code, andused a previous layout with a persistent base 17If you wanna grab my code, and you used a layout with a persistent base
17layer change, change it to layer 0 before proceeding. 18layer change, change it to layer 0 before proceeding.
18 19
19# Layers 20# Layers
20 21
21* **Dvorak**: Base layer,withdvorak layout. 22* **Dvorak**: Base layer,with dvorak layout.
22* **Alternative**: Has alternate characters. 23* **Alternative**: Has alternate characters.
23* **Game**: Toggled from *Function*, comfortable for gaming use. 24* **Game**: Toggled from *Function*, comfortable for gaming use.
24* **Numeric**: Has numericals and symbols. Can be locked. 25* **Numeric**: Has numericals and symbols. Can be locked.
25* **Function**: Layer has media and function keys. 26* **Function**: Layer has media and function keys.
26* **Mouse**: Manipulates mouse. Can be locked. 27* **Mouse**: Manipulates mouse. Can be locked.
27* **Music** Allows playing sounds like a keyboard. 28* **Music** Allows playing sounds.
28 29
29# Functionality 30# Functionality
30 31
31* **RGB Backlight**: With layer indication, and ability to change base layer lighting mode. 32* **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* **Secrets**: By placing a secrets.h, and not tracking it, passwords can be stored.
33* **Mouse**: Mouse emulation, complete with diagonal keys. 34* **Mouse**: Mouse emulation, complete with diagonal keys.
34* **Turkish**: An AltGr-like overlay that allows some non-common letters, in unicode. 35* **Turkish**: An AltGr-like overlay that allows some non-common letters, in unicode.
35 36
36I suggest checking out how I enabled shifting for Turkish layer, 37I suggest checking out how I enabled Turkish keys,
37how I planned out RGB lighting, and my mouse implementation; they might offer 38how I planned out RGB lighting,
38some insight into fringe user cases. 39and my mouse implementation;
40they might offer some insight into fringe user cases.
39 41
40# Issues 42# Issues
41 43
42All features are too big for the 32kB bootloader. 44All features are too big for the 32kB bootloader.
43Offenders are audio and rgb lights; it comes down to one or the other. 45Offenders are audio and rgb lights; it comes down to one or the other.
44~The Proton board, and rev 6 should fix that.~ 46
47~The Proton board, and rev 6 might fix that.~
45 48
46# Credits 49# Credits
47 50
48I have previously written my keymap by myself before, but I rewrote it here, 51I have previously written my keymap by myself before, but I rewrote it here,
49heavily inspired by @drashna's user folder.
diff --git a/users/bbaserdem/bbaserdem.c b/users/bbaserdem/bbaserdem.c
index 59e5d4ba7..ac7b1b62e 100644
--- a/users/bbaserdem/bbaserdem.c
+++ b/users/bbaserdem/bbaserdem.c
@@ -14,6 +14,12 @@
14#include "rgblight.h" 14#include "rgblight.h"
15#endif 15#endif
16 16
17/*-------------*\
18|*---UNICODE---*|
19\*-------------*/
20#ifdef UNICODE_ENABLE
21#endif
22
17/*-----------------*\ 23/*-----------------*\
18|*-----SECRETS-----*| 24|*-----SECRETS-----*|
19\*-----------------*/ 25\*-----------------*/
@@ -61,8 +67,6 @@ __attribute__ ((weak)) void led_set_keymap(uint8_t usb_led) { }
61/* ----------------------- *\ 67/* ----------------------- *\
62 * -----RGB Functions----- * 68 * -----RGB Functions----- *
63\* ----------------------- */ 69\* ----------------------- */
64
65
66#ifdef RGBLIGHT_ENABLE 70#ifdef RGBLIGHT_ENABLE
67// Storage variables 71// Storage variables
68extern rgblight_config_t rgblight_config; 72extern rgblight_config_t rgblight_config;
@@ -106,7 +110,7 @@ void rgblight_colorStatic( int hu, int sa, int va ) {
106 rgblight_mode(1); 110 rgblight_mode(1);
107 rgblight_sethsv(hu,sa,va); 111 rgblight_sethsv(hu,sa,va);
108} 112}
109/* HSV values, thank you @drashna! 113/* HSV values
110 * white ( 0, 0, 255) 114 * white ( 0, 0, 255)
111 * red ( 0, 255, 255) 115 * red ( 0, 255, 255)
112 * coral ( 16, 176, 255) 116 * coral ( 16, 176, 255)
@@ -126,16 +130,15 @@ void rgblight_colorStatic( int hu, int sa, int va ) {
126 * magenta (300, 255, 255) 130 * magenta (300, 255, 255)
127 * pink (330, 128, 255) 131 * pink (330, 128, 255)
128 */ 132 */
133
129// Set RGBLIGHT state depending on layer 134// Set RGBLIGHT state depending on layer
130void rgblight_change( uint8_t last_layer ) { 135void rgblight_change( uint8_t this_layer ) {
131 // Save state, if saving is requested 136 // Save state, if saving is requested
132 /*
133 if ( base_sta ) { 137 if ( base_sta ) {
134 rgblight_saveBase(); 138 rgblight_saveBase();
135 } 139 }
136 */
137 // Change RGB light 140 // Change RGB light
138 switch ( last_layer ) { 141 switch ( this_layer ) {
139 case _DV: 142 case _DV:
140 // Load base layer 143 // Load base layer
141 rgblight_loadBase(); 144 rgblight_loadBase();
@@ -160,12 +163,10 @@ void rgblight_change( uint8_t last_layer ) {
160 // Do green for mouse 163 // Do green for mouse
161 rgblight_colorStatic(120,255,255); 164 rgblight_colorStatic(120,255,255);
162 break; 165 break;
163#ifdef AUDIO_ENABLE
164 case _MU: 166 case _MU:
165 // Do orange for music 167 // Do orange for music
166 rgblight_colorStatic( 39,255,255); 168 rgblight_colorStatic( 39,255,255);
167 break; 169 break;
168#endif
169 default: 170 default:
170 // Something went wrong 171 // Something went wrong
171 rgblight_colorStatic( 0,255,255); 172 rgblight_colorStatic( 0,255,255);
@@ -184,7 +185,9 @@ void matrix_init_user (void) {
184 matrix_init_keymap(); 185 matrix_init_keymap();
185 186
186 // Correct unicode 187 // Correct unicode
188#ifdef UNICODE_ENABLE
187 set_unicode_input_mode(UC_LNX); 189 set_unicode_input_mode(UC_LNX);
190#endif
188 191
189 // Make beginning layer DVORAK 192 // Make beginning layer DVORAK
190 set_single_persistent_default_layer(_DV); 193 set_single_persistent_default_layer(_DV);
@@ -212,7 +215,6 @@ void matrix_init_user (void) {
212void matrix_scan_user (void) { 215void matrix_scan_user (void) {
213 // Keymap specific, do it first 216 // Keymap specific, do it first
214 matrix_scan_keymap(); 217 matrix_scan_keymap();
215 // Moved RGB check to layer_state_set_user
216} 218}
217 219
218/*------------------*\ 220/*------------------*\
@@ -227,15 +229,29 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
227 229
228 switch (keycode) { 230 switch (keycode) {
229 // Secrets implementation 231 // Secrets implementation
230 case SECRET1 ... SECRET3:
231#if (__has_include("secrets.h")) 232#if (__has_include("secrets.h"))
233 case SECRET1:
232 if( !record->event.pressed ) { 234 if( !record->event.pressed ) {
233 send_string_P( secret[ keycode - SECRET1 ] ); 235 send_string_P( secret[ keycode - SECRET1 ] );
234 } 236 }
235#endif
236 return false; 237 return false;
237 break; 238 break;
239 case SECRET2:
240 if( !record->event.pressed ) {
241 send_string_P( secret[ keycode - SECRET2 ] );
242 }
243 return false;
244 break;
245 case SECRET3:
246 if( !record->event.pressed ) {
247 send_string_P( secret[ keycode - SECRET3 ] );
248 }
249 return false;
250 break;
251#endif
252
238 // If these keys are pressed, load base layer config, and mark saving 253 // If these keys are pressed, load base layer config, and mark saving
254#ifdef RGBLIGHT_ENABLE
239 case RGB_TOG: 255 case RGB_TOG:
240 case RGB_MOD: 256 case RGB_MOD:
241 case RGB_VAI: 257 case RGB_VAI:
@@ -244,13 +260,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
244 case RGB_SAD: 260 case RGB_SAD:
245 case RGB_HUI: 261 case RGB_HUI:
246 case RGB_HUD: 262 case RGB_HUD:
247#ifdef RGBLIGHT_ENABLE
248 if ( !base_sta ) { 263 if ( !base_sta ) {
249 rgblight_loadBase(); 264 rgblight_loadBase();
250 } 265 }
251#endif
252 return true; 266 return true;
253 break; 267 break;
268#endif
254 269
255 // Lock functionality: These layers are locked if the LOCKED buttons are 270 // Lock functionality: These layers are locked if the LOCKED buttons are
256 // pressed. Otherwise, they are momentary toggles 271 // pressed. Otherwise, they are momentary toggles
@@ -261,7 +276,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
261 return false; 276 return false;
262 break; 277 break;
263 case K_MOUSE: 278 case K_MOUSE:
264#ifdef MOUSEKEY_ENABLE
265 if (record->event.pressed) { 279 if (record->event.pressed) {
266 layer_on(_MO); 280 layer_on(_MO);
267 lock_flag = false; 281 lock_flag = false;
@@ -272,7 +286,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
272 layer_off(_MO); 286 layer_off(_MO);
273 } 287 }
274 } 288 }
275#endif
276 return false; 289 return false;
277 break; 290 break;
278 case K_NUMBR: 291 case K_NUMBR:
@@ -314,7 +327,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
314 return false; 327 return false;
315 break; 328 break;
316 case MU_TOG: 329 case MU_TOG:
317#ifdef AUDIO_ENABLE
318 if (record->event.pressed) { 330 if (record->event.pressed) {
319 // On press, turn off layer if active 331 // On press, turn off layer if active
320 if ( layer == _SE ) { 332 if ( layer == _SE ) {
@@ -324,14 +336,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
324 layer_off(_MU); 336 layer_off(_MU);
325 } 337 }
326 } 338 }
327#endif
328 return true; 339 return true;
329 break; 340 break;
330 341
331//------UNICODE 342//------UNICODE
332 // Unicode switches with sound 343 // Unicode switches with sound
333 case UNI_LI:
334#ifdef UNICODE_ENABLE 344#ifdef UNICODE_ENABLE
345 case UNI_LI:
335 if (record->event.pressed) { 346 if (record->event.pressed) {
336#ifdef AUDIO_ENABLE 347#ifdef AUDIO_ENABLE
337 stop_all_notes(); 348 stop_all_notes();
@@ -339,11 +350,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
339#endif 350#endif
340 set_unicode_input_mode(UC_LNX); 351 set_unicode_input_mode(UC_LNX);
341 } 352 }
342#endif
343 return false; 353 return false;
344 break; 354 break;
345 case UNI_WN: 355 case UNI_WN:
346#ifdef UNICODE_ENABLE
347 if (record->event.pressed) { 356 if (record->event.pressed) {
348#ifdef AUDIO_ENABLE 357#ifdef AUDIO_ENABLE
349 stop_all_notes(); 358 stop_all_notes();
@@ -351,13 +360,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
351#endif 360#endif
352 set_unicode_input_mode(UC_WIN); 361 set_unicode_input_mode(UC_WIN);
353 } 362 }
354#endif
355 return false; 363 return false;
356 break; 364 break;
357 365
358 // Turkish letters, with capital functionality 366 // Turkish letters, with capital functionality
359 case TUR_A: 367 case TUR_A:
360#ifdef UNICODE_ENABLE
361 if (record->event.pressed) { 368 if (record->event.pressed) {
362 if ( is_capital ) { 369 if ( is_capital ) {
363 unicode_input_start(); 370 unicode_input_start();
@@ -369,11 +376,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
369 unicode_input_finish(); 376 unicode_input_finish();
370 } 377 }
371 } 378 }
372#endif
373 return false; 379 return false;
374 break; 380 break;
375 case TUR_O: 381 case TUR_O:
376#ifdef UNICODE_ENABLE
377 if (record->event.pressed) { 382 if (record->event.pressed) {
378 if ( is_capital ) { 383 if ( is_capital ) {
379 unicode_input_start(); 384 unicode_input_start();
@@ -385,11 +390,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
385 unicode_input_finish(); 390 unicode_input_finish();
386 } 391 }
387 } 392 }
388#endif
389 return false; 393 return false;
390 break; 394 break;
391 case TUR_U: 395 case TUR_U:
392#ifdef UNICODE_ENABLE
393 if (record->event.pressed) { 396 if (record->event.pressed) {
394 if ( is_capital ) { 397 if ( is_capital ) {
395 unicode_input_start(); 398 unicode_input_start();
@@ -401,11 +404,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
401 unicode_input_finish(); 404 unicode_input_finish();
402 } 405 }
403 } 406 }
404#endif
405 return false; 407 return false;
406 break; 408 break;
407 case TUR_I: 409 case TUR_I:
408#ifdef UNICODE_ENABLE
409 if (record->event.pressed) { 410 if (record->event.pressed) {
410 if ( is_capital ) { 411 if ( is_capital ) {
411 unicode_input_start(); 412 unicode_input_start();
@@ -417,11 +418,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
417 unicode_input_finish(); 418 unicode_input_finish();
418 } 419 }
419 } 420 }
420#endif
421 return false; 421 return false;
422 break; 422 break;
423 case TUR_G: 423 case TUR_G:
424#ifdef UNICODE_ENABLE
425 if (record->event.pressed) { 424 if (record->event.pressed) {
426 if ( is_capital ) { 425 if ( is_capital ) {
427 unicode_input_start(); 426 unicode_input_start();
@@ -433,11 +432,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
433 unicode_input_finish(); 432 unicode_input_finish();
434 } 433 }
435 } 434 }
436#endif
437 return false; 435 return false;
438 break; 436 break;
439 case TUR_C: 437 case TUR_C:
440#ifdef UNICODE_ENABLE
441 if (record->event.pressed) { 438 if (record->event.pressed) {
442 if ( is_capital ) { 439 if ( is_capital ) {
443 unicode_input_start(); 440 unicode_input_start();
@@ -449,11 +446,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
449 unicode_input_finish(); 446 unicode_input_finish();
450 } 447 }
451 } 448 }
452#endif
453 return false; 449 return false;
454 break; 450 break;
455 case TUR_S: 451 case TUR_S:
456#ifdef UNICODE_ENABLE
457 if (record->event.pressed) { 452 if (record->event.pressed) {
458 if ( is_capital ) { 453 if ( is_capital ) {
459 unicode_input_start(); 454 unicode_input_start();
@@ -465,13 +460,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
465 unicode_input_finish(); 460 unicode_input_finish();
466 } 461 }
467 } 462 }
468#endif
469 return false; 463 return false;
470 break; 464 break;
465#endif
471 466
472//-------Diagonal mouse movements 467//-------Diagonal mouse movements
473 case MO_NE:
474#ifdef MOUSEKEY_ENABLE 468#ifdef MOUSEKEY_ENABLE
469 case MO_NE:
475 if( record->event.pressed ) { 470 if( record->event.pressed ) {
476 mousekey_on(MO_N); 471 mousekey_on(MO_N);
477 mousekey_on(MO_E); 472 mousekey_on(MO_E);
@@ -481,11 +476,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
481 mousekey_off(MO_E); 476 mousekey_off(MO_E);
482 mousekey_send(); 477 mousekey_send();
483 } 478 }
484#endif
485 return false; 479 return false;
486 break; 480 break;
487 case MO_NW: 481 case MO_NW:
488#ifdef MOUSEKEY_ENABLE
489 if( record->event.pressed ) { 482 if( record->event.pressed ) {
490 mousekey_on(MO_N); 483 mousekey_on(MO_N);
491 mousekey_on(MO_W); 484 mousekey_on(MO_W);
@@ -495,11 +488,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
495 mousekey_off(MO_W); 488 mousekey_off(MO_W);
496 mousekey_send(); 489 mousekey_send();
497 } 490 }
498#endif
499 return false; 491 return false;
500 break; 492 break;
501 case MO_SE: 493 case MO_SE:
502#ifdef MOUSEKEY_ENABLE
503 if( record->event.pressed ) { 494 if( record->event.pressed ) {
504 mousekey_on(MO_S); 495 mousekey_on(MO_S);
505 mousekey_on(MO_E); 496 mousekey_on(MO_E);
@@ -509,11 +500,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
509 mousekey_off(MO_E); 500 mousekey_off(MO_E);
510 mousekey_send(); 501 mousekey_send();
511 } 502 }
512#endif
513 return false; 503 return false;
514 break; 504 break;
515 case MO_SW: 505 case MO_SW:
516#ifdef MOUSEKEY_ENABLE
517 if( record->event.pressed ) { 506 if( record->event.pressed ) {
518 mousekey_on(MO_S); 507 mousekey_on(MO_S);
519 mousekey_on(MO_W); 508 mousekey_on(MO_W);
@@ -523,11 +512,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
523 mousekey_off(MO_W); 512 mousekey_off(MO_W);
524 mousekey_send(); 513 mousekey_send();
525 } 514 }
526#endif
527 return false; 515 return false;
528 break; 516 break;
529 case MO_S_NE: 517 case MO_S_NE:
530#ifdef MOUSEKEY_ENABLE
531 if( record->event.pressed ) { 518 if( record->event.pressed ) {
532 mousekey_on(MO_S_N); 519 mousekey_on(MO_S_N);
533 mousekey_on(MO_S_E); 520 mousekey_on(MO_S_E);
@@ -537,11 +524,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
537 mousekey_off(MO_S_E); 524 mousekey_off(MO_S_E);
538 mousekey_send(); 525 mousekey_send();
539 } 526 }
540#endif
541 return false; 527 return false;
542 break; 528 break;
543 case MO_S_NW: 529 case MO_S_NW:
544#ifdef MOUSEKEY_ENABLE
545 if( record->event.pressed ) { 530 if( record->event.pressed ) {
546 mousekey_on(MO_S_N); 531 mousekey_on(MO_S_N);
547 mousekey_on(MO_S_W); 532 mousekey_on(MO_S_W);
@@ -551,11 +536,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
551 mousekey_off(MO_S_W); 536 mousekey_off(MO_S_W);
552 mousekey_send(); 537 mousekey_send();
553 } 538 }
554#endif
555 return false; 539 return false;
556 break; 540 break;
557 case MO_S_SE: 541 case MO_S_SE:
558#ifdef MOUSEKEY_ENABLE
559 if( record->event.pressed ) { 542 if( record->event.pressed ) {
560 mousekey_on(MO_S_S); 543 mousekey_on(MO_S_S);
561 mousekey_on(MO_S_E); 544 mousekey_on(MO_S_E);
@@ -565,11 +548,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
565 mousekey_off(MO_S_E); 548 mousekey_off(MO_S_E);
566 mousekey_send(); 549 mousekey_send();
567 } 550 }
568#endif
569 return false; 551 return false;
570 break; 552 break;
571 case MO_S_SW: 553 case MO_S_SW:
572#ifdef MOUSEKEY_ENABLE
573 if( record->event.pressed ) { 554 if( record->event.pressed ) {
574 mousekey_on(MO_S_S); 555 mousekey_on(MO_S_S);
575 mousekey_on(MO_S_W); 556 mousekey_on(MO_S_W);
@@ -579,9 +560,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
579 mousekey_off(MO_S_W); 560 mousekey_off(MO_S_W);
580 mousekey_send(); 561 mousekey_send();
581 } 562 }
582#endif
583 return false; 563 return false;
584 break; 564 break;
565#endif
566
585//------DOUBLE PRESS, with added left navigation 567//------DOUBLE PRESS, with added left navigation
586 case DBL_SPC: 568 case DBL_SPC:
587 if( record->event.pressed ) { 569 if( record->event.pressed ) {
diff --git a/users/bbaserdem/bbaserdem.h b/users/bbaserdem/bbaserdem.h
index 1b1b53710..86b781d78 100644
--- a/users/bbaserdem/bbaserdem.h
+++ b/users/bbaserdem/bbaserdem.h
@@ -23,7 +23,7 @@
23#define CUT LCTL(KC_X) 23#define CUT LCTL(KC_X)
24#define PASTE LCTL(KC_V) 24#define PASTE LCTL(KC_V)
25 25
26// Rename mouse keys 26// Rename mouse keys with 7 letters
27#ifdef MOUSEKEY_ENABLE 27#ifdef MOUSEKEY_ENABLE
28#define MO_S_N KC_MS_WH_UP 28#define MO_S_N KC_MS_WH_UP
29#define MO_S_S KC_MS_WH_DOWN 29#define MO_S_S KC_MS_WH_DOWN
@@ -60,6 +60,25 @@
60#define MO_AC_2 KC_NO 60#define MO_AC_2 KC_NO
61#endif 61#endif
62 62
63// Rename music keys with <8 letters
64#ifdef AUDIO_ENABLE
65#define MU_REC KC_LCTL
66#define MU_STOP KC_LALT
67#define MU_PLAY KC_LGUI
68#define MU_PLAY KC_LGUI
69#define MU_FAST KC_UP
70#define MU_SLOW KC_DOWN
71#define MU_MASK KC_A
72#else
73#define MU_REC KC_NO
74#define MU_STOP KC_NO
75#define MU_PLAY KC_NO
76#define MU_PLAY KC_NO
77#define MU_FAST KC_NO
78#define MU_SLOW KC_NO
79#define MU_MASK KC_NO
80#endif
81
63// Define non-capitalized UTF shortcuts here 82// Define non-capitalized UTF shortcuts here
64#ifdef UNICODE_ENABLE 83#ifdef UNICODE_ENABLE
65#define PHY_HBR UC(0x0127) 84#define PHY_HBR UC(0x0127)
@@ -79,11 +98,6 @@
79#define CUR_YEN KC_NO 98#define CUR_YEN KC_NO
80#endif 99#endif
81 100
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 101// Custom keycodes
88enum userspace_custom_keycodes { 102enum userspace_custom_keycodes {
89 // Turkish letters, with shifting 103 // Turkish letters, with shifting
@@ -128,8 +142,6 @@ enum userspace_custom_keycodes {
128 142
129// Do tap dancable semicolon key if available 143// Do tap dancable semicolon key if available
130#ifdef TAP_DANCE_ENABLE 144#ifdef TAP_DANCE_ENABLE
131#define TAPPING_TERM 300
132#define TAPPING_TOGGLE 1
133enum { 145enum {
134 SCL = 0 146 SCL = 0
135}; 147};
@@ -139,7 +151,8 @@ enum {
139#endif 151#endif
140 152
141// Shared keymaps 153// Shared keymaps
142#define KM(...) KEYMAP(__VA_ARGS__) // Required to expand the CSVs 154#define LAYOUT_planck_wrapper(...) LAYOUT_planck_grid(__VA_ARGS__)
155#define LAYOUT_letssplit_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__)
143 156
144/* Dvorak 157/* Dvorak
145 * ,------------------------------------------------------------------------. 158 * ,------------------------------------------------------------------------.
@@ -151,15 +164,11 @@ enum {
151 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| 164 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
152 * | TUR | OS | Ctrl| Alt | Shf | Spc || Ent | Lft | Dwn | Up | Rght| MSE | 165 * | TUR | OS | Ctrl| Alt | Shf | Spc || Ent | Lft | Dwn | Up | Rght| MSE |
153 * `------------------------------------------------------------------------' */ 166 * `------------------------------------------------------------------------' */
154#define DVORAK_1 \ 167#define DVORAK \
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 168 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 \ 169 KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
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 170 K_NUMBR,MY_SCL, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_SE), \
158#define DVORAK_3 \ 171 MO(_AL),KC_LGUI,KC_LCTL,KC_LALT,KC_LSFT,KC_SPC, KC_ENT, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,K_MOUSE
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 172
164/* Alternative character overlay 173/* Alternative character overlay
165 * ,------------------------------------------------------------------------. 174 * ,------------------------------------------------------------------------.
@@ -171,15 +180,11 @@ enum {
171 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| 180 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
172 * | | | | | | || | Home|PgDwn| PgUp| End | | 181 * | | | | | | || | Home|PgDwn| PgUp| End | |
173 * `------------------------------------------------------------------------' */ 182 * `------------------------------------------------------------------------' */
174#define ALTCHAR_1 \ 183#define ALTCHAR \
175 _______,DBL_QUO,UNDO, REDO, CUR_BPN,CUR_YEN,_______,TUR_G, TUR_C, _______,CUR_LIR,KC_DEL 184 _______,DBL_QUO,UNDO, REDO, CUR_BPN,CUR_YEN,_______,TUR_G, TUR_C, _______,CUR_LIR,KC_DEL , \
176#define ALTCHAR_2 \ 185 _______,TUR_A, TUR_O, CUR_EUR,TUR_U, TUR_I, PHY_DEG,PHY_HBR,_______,_______,TUR_S, KC_INS , \
177 _______,TUR_A, TUR_O, CUR_EUR,TUR_U, TUR_I, PHY_DEG,PHY_HBR,_______,_______,TUR_S, KC_INS 186 _______,DBL_DQT,CUT, COPY, PASTE, DBL_GRV,CUR_BIT,DBL_ANG,DBL_PAR,DBL_SQR,DBL_BRC,_______, \
178#define ALTCHAR_3 \ 187 _______,_______,_______,_______,_______,DBL_SPC,_______,KC_HOME,KC_PGDN,KC_PGUP,KC_END, _______
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 188
184/* Game layer 189/* Game layer
185 * ,------------------------------------------------------------------------. 190 * ,------------------------------------------------------------------------.
@@ -191,15 +196,11 @@ enum {
191 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| 196 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
192 * | / | ` | | | | Spc || Spc | Ent | 0 | < | v | > | 197 * | / | ` | | | | Spc || Spc | Ent | 0 | < | v | > |
193 * `------------------------------------------------------------------------' */ 198 * `------------------------------------------------------------------------' */
194#define GAME_1 \ 199#define GAME \
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 200 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 \ 201 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F1, KC_P4, KC_P5, KC_P6, KC_BSLS,KC_ENT , \
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 202 _______,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F2, KC_P1, KC_P2, KC_P3, KC_UP, _______, \
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 203 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
204/* Symbols layer 205/* Symbols layer
205 * ,------------------------------------------------------------------------. 206 * ,------------------------------------------------------------------------.
@@ -209,17 +210,13 @@ enum {
209 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| 210 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
210 * | | ! | @ | # | $ | % || ^ | & | * | ( | ) | LCK | 211 * | | ! | @ | # | $ | % || ^ | & | * | ( | ) | LCK |
211 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| 212 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
212 * | | | | | | | | || | | | | | | 213 * | | | | | | | || | | | | | |
213 * `------------------------------------------------------------------------' */ 214 * `------------------------------------------------------------------------' */
214#define NUMBERS_1 \ 215#define NUMBERS \
215 K_NUMBR,KC_GRV, KC_TILD,KC_LBRC,KC_RBRC,KC_LCBR,KC_RCBR,KC_MINS,KC_UNDS,KC_EQL, KC_PLUS,_______ 216 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, \
217 _______,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS 218 _______,KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,K_LOCK , \
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,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ 219 KC_PIPE,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______
222#define NUMBERS KM(NUMBERS_1,NUMBERS_2,NUMBERS_3,NUMBERS_4)
223 220
224/* Settings layer 221/* Settings layer
225 * ,------------------------------------------------------------------------. 222 * ,------------------------------------------------------------------------.
@@ -231,15 +228,11 @@ enum {
231 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| 228 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
232 * |Musir| | | | |Vol -||Vol +| Prev| Stop|TogMu| Next| | 229 * |Musir| | | | |Vol -||Vol +| Prev| Stop|TogMu| Next| |
233 * `------------------------------------------------------------------------' */ 230 * `------------------------------------------------------------------------' */
234#define SETTINGS_1 \ 231#define SETTINGS \
235 BL_STEP,KC_F1, KC_F2, KC_F3, KC_F4, UNI_LI, UNI_WN, KC_WAKE,_______,RGB_HUD,RGB_HUI,RESET 232 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 \ 233 _______,KC_F5, KC_F6, KC_F7, KC_F8, _______,_______,_______,RGB_TOG,RGB_SAD,RGB_SAI,_______, \
237 _______,KC_F5, KC_F6, KC_F7, KC_F8, _______,_______,_______,RGB_TOG,RGB_SAD,RGB_SAI,_______ 234 K_GAMES,KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE,KC_PSCR,_______,RGB_MOD,RGB_VAD,RGB_VAI,_______, \
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,_______ 235 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 236
244/* Mouse layer 237/* Mouse layer
245 * ,------------------------------------------------------------------------. 238 * ,------------------------------------------------------------------------.
@@ -251,15 +244,11 @@ enum {
251 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| 244 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
252 * | | | | | | Left||Right| | |Accl0|Accl1|Accl2| 245 * | | | | | | Left||Right| | |Accl0|Accl1|Accl2|
253 * `------------------------------------------------------------------------' */ 246 * `------------------------------------------------------------------------' */
254#define MOUSE_1 \ 247#define MOUSE \
255 K_MOUSE,MO_NW, MO_N, MO_NE, XXX, XXX ,XXX, XXX, MO_S_NW,MO_S_N, MO_S_NE,_______ 248 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 \ 249 _______,MO_W, MO_CL_M,MO_E, MO_CL_4,XXX ,XXX, MO_CL_5,MO_S_W, MO_CL_M,MO_S_E, _______, \
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, _______ 250 _______,MO_SW, MO_S, MO_SE, XXX, XXX ,XXX, XXX, MO_S_SW,MO_S_S, MO_S_SE,K_LOCK , \
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,_______ 251 _______,_______,_______,_______,_______,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 252
264/* Music layer 253/* Music layer
265 * ,------------------------------------------------------------------------. 254 * ,------------------------------------------------------------------------.
@@ -272,8 +261,10 @@ enum {
272 * | togg| rec | stop| play| slow| fast||modes|.....|.....|.....|.....|.....| 261 * | togg| rec | stop| play| slow| fast||modes|.....|.....|.....|.....|.....|
273 * `------------------------------------------------------------------------' 262 * `------------------------------------------------------------------------'
274 */ 263 */
275#define MASK XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX 264#define MUSIC \
276#define MUSIC_4 MU_TOG, KC_LCTL, KC_LALT, KC_LGUI, KC_DOWN, KC_UP, MU_MOD, XXX, XXX, XXX, XXX, XXX 265 MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK, \
277#define MUSIC KM(MASK,MASK,MASK,MUSIC_4) 266 MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK, \
267 MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK, \
268 MU_TOG, MU_REC, MU_STOP,MU_PLAY,MU_SLOW,MU_FAST,MU_MOD, MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK
278 269
279#endif 270#endif
diff --git a/users/bbaserdem/config.h b/users/bbaserdem/config.h
new file mode 100644
index 000000000..3dde5772c
--- /dev/null
+++ b/users/bbaserdem/config.h
@@ -0,0 +1,9 @@
1#ifndef USERSPACE_CONFIG_H
2#define USERSPACE_CONFIG_H
3
4#ifdef TAP_DANCE_ENABLE
5 #define TAPPING_TERM 300
6 #define TAPPING_TOGGLE 1
7#endif
8
9#endif // !USERSPACE_CONFIG_H
diff --git a/users/bbaserdem/rules.mk b/users/bbaserdem/rules.mk
index 513ce4fe0..24c98fdc9 100644
--- a/users/bbaserdem/rules.mk
+++ b/users/bbaserdem/rules.mk
@@ -1,13 +1,15 @@
1SRC += bbaserdem.c 1SRC += bbaserdem.c
2EXTRAFLAGS += -flto 2EXTRAFLAGS += -flto # Used to make code smaller
3 3
4# ENABLE 4# ENABLE
5UNICODE_ENABLE = yes # Used for unicode character emulation 5UNICODE_ENABLE = yes # Used for unicode character emulation
6EXTRAKEY_ENABLE = yes # OS signals like volume control 6EXTRAKEY_ENABLE = yes # OS signals like volume control
7 7
8# DISABLE 8# DISABLE
9BLUETOOTH_ENABLE = no # No bluetooth 9ifndef BLUETOOTH_ENABLE
10COMMAND_ENABLE = no # Some bootmagic thing 10 BLUETOOTH_ENABLE = no # No bluetooth
11endif
12COMMAND_ENABLE = no # Some bootmagic thing i dont use
11BOOTMAGIC_ENABLE = no # Access to EEPROM settings, not needed 13BOOTMAGIC_ENABLE = no # Access to EEPROM settings, not needed
12CONSOLE_ENABLE = no # Allows console output with a command 14CONSOLE_ENABLE = no # Allows console output with a command
13SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested. 15SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested.
@@ -18,5 +20,5 @@ KEY_LOCK_ENABLE = no # Allows locking any key. Not used
18API_SYSEX_ENABLE = no # Allows OS to send signals. 20API_SYSEX_ENABLE = no # Allows OS to send signals.
19KEY_LOCK_ENABLE = no # Allows locking any key. Not used 21KEY_LOCK_ENABLE = no # Allows locking any key. Not used
20 22
21# Disabling this makes it compile, prob bad upstream code 23# Disabling this makes it compile, i dont know why
22# VARIABLE_TRACE = no # Allows debugging variables 24# VARIABLE_TRACE = no # Allows debugging variables