You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

186 lines
5.8 KiB

[Keymap] Hvp baseline19 (#7690) * Added my UT47.2 Swedish layout with tap dance function. * Move tap dance over to user space * Removed config_common from config file * Changes to workspace with new support for code16. Tested ok * Swedish support * Added code16 version of tapdance to userprofile. * Created 4th layer and updated readme file. Removed ascii rep of layout. * Tabdance updates * Removed duplicated RGB keys. * Added hvp minivan config * Fixed tapdance key maps * Added Planck 1 space base hvp layout * Start of hvp xd75 layout. Way to many keys * Added working config ink test for atreus62 * fixed smaller layout changes * Updated tap dance with option 5 * Added better thump keys * Created lets split layout * Removed not used modes * Updated to correct url * Readme file * Atreus62 readme * Cleanup of keymap file * Added tap dance * Fixed missed adjustment * Added hvp planck setup * Update ascii * will this work better? * removed ascii * Planck 1 space setup * Fixed ascii local * Added Corne setup * Changes for lets split * Atreus62 config * Added Lily58 * Setup corne * Setup planck * Updated lets split * UT47 setup * Setup a The Vanboard. * Alt Ctrl * #define D_NAVI MT(MOD_LCTL | MOD_LSFT, KC_D) * Fix D_NAVI & plank midi * Fixed PR comments * Added pragma * Moved def to user space * Removed not used endif * Added def to users space * Added rules to van * Removed not used part of config * Removed not used layout * Removed not needed comments * Remove not needed keymap_config_t * Removed broken ascii from readme files and removed not needed rules * Added spaces to readme file * Removed xd75 from branch
4 years ago
[Keymap] Hvp baseline19 (#7690) * Added my UT47.2 Swedish layout with tap dance function. * Move tap dance over to user space * Removed config_common from config file * Changes to workspace with new support for code16. Tested ok * Swedish support * Added code16 version of tapdance to userprofile. * Created 4th layer and updated readme file. Removed ascii rep of layout. * Tabdance updates * Removed duplicated RGB keys. * Added hvp minivan config * Fixed tapdance key maps * Added Planck 1 space base hvp layout * Start of hvp xd75 layout. Way to many keys * Added working config ink test for atreus62 * fixed smaller layout changes * Updated tap dance with option 5 * Added better thump keys * Created lets split layout * Removed not used modes * Updated to correct url * Readme file * Atreus62 readme * Cleanup of keymap file * Added tap dance * Fixed missed adjustment * Added hvp planck setup * Update ascii * will this work better? * removed ascii * Planck 1 space setup * Fixed ascii local * Added Corne setup * Changes for lets split * Atreus62 config * Added Lily58 * Setup corne * Setup planck * Updated lets split * UT47 setup * Setup a The Vanboard. * Alt Ctrl * #define D_NAVI MT(MOD_LCTL | MOD_LSFT, KC_D) * Fix D_NAVI & plank midi * Fixed PR comments * Added pragma * Moved def to user space * Removed not used endif * Added def to users space * Added rules to van * Removed not used part of config * Removed not used layout * Removed not needed comments * Remove not needed keymap_config_t * Removed broken ascii from readme files and removed not needed rules * Added spaces to readme file * Removed xd75 from branch
4 years ago
[Keymap] Hvp baseline19 (#7690) * Added my UT47.2 Swedish layout with tap dance function. * Move tap dance over to user space * Removed config_common from config file * Changes to workspace with new support for code16. Tested ok * Swedish support * Added code16 version of tapdance to userprofile. * Created 4th layer and updated readme file. Removed ascii rep of layout. * Tabdance updates * Removed duplicated RGB keys. * Added hvp minivan config * Fixed tapdance key maps * Added Planck 1 space base hvp layout * Start of hvp xd75 layout. Way to many keys * Added working config ink test for atreus62 * fixed smaller layout changes * Updated tap dance with option 5 * Added better thump keys * Created lets split layout * Removed not used modes * Updated to correct url * Readme file * Atreus62 readme * Cleanup of keymap file * Added tap dance * Fixed missed adjustment * Added hvp planck setup * Update ascii * will this work better? * removed ascii * Planck 1 space setup * Fixed ascii local * Added Corne setup * Changes for lets split * Atreus62 config * Added Lily58 * Setup corne * Setup planck * Updated lets split * UT47 setup * Setup a The Vanboard. * Alt Ctrl * #define D_NAVI MT(MOD_LCTL | MOD_LSFT, KC_D) * Fix D_NAVI & plank midi * Fixed PR comments * Added pragma * Moved def to user space * Removed not used endif * Added def to users space * Added rules to van * Removed not used part of config * Removed not used layout * Removed not needed comments * Remove not needed keymap_config_t * Removed broken ascii from readme files and removed not needed rules * Added spaces to readme file * Removed xd75 from branch
4 years ago
[Keymap] Hvp baseline19 (#7690) * Added my UT47.2 Swedish layout with tap dance function. * Move tap dance over to user space * Removed config_common from config file * Changes to workspace with new support for code16. Tested ok * Swedish support * Added code16 version of tapdance to userprofile. * Created 4th layer and updated readme file. Removed ascii rep of layout. * Tabdance updates * Removed duplicated RGB keys. * Added hvp minivan config * Fixed tapdance key maps * Added Planck 1 space base hvp layout * Start of hvp xd75 layout. Way to many keys * Added working config ink test for atreus62 * fixed smaller layout changes * Updated tap dance with option 5 * Added better thump keys * Created lets split layout * Removed not used modes * Updated to correct url * Readme file * Atreus62 readme * Cleanup of keymap file * Added tap dance * Fixed missed adjustment * Added hvp planck setup * Update ascii * will this work better? * removed ascii * Planck 1 space setup * Fixed ascii local * Added Corne setup * Changes for lets split * Atreus62 config * Added Lily58 * Setup corne * Setup planck * Updated lets split * UT47 setup * Setup a The Vanboard. * Alt Ctrl * #define D_NAVI MT(MOD_LCTL | MOD_LSFT, KC_D) * Fix D_NAVI & plank midi * Fixed PR comments * Added pragma * Moved def to user space * Removed not used endif * Added def to users space * Added rules to van * Removed not used part of config * Removed not used layout * Removed not needed comments * Remove not needed keymap_config_t * Removed broken ascii from readme files and removed not needed rules * Added spaces to readme file * Removed xd75 from branch
4 years ago
[Keymap] Hvp baseline19 (#7690) * Added my UT47.2 Swedish layout with tap dance function. * Move tap dance over to user space * Removed config_common from config file * Changes to workspace with new support for code16. Tested ok * Swedish support * Added code16 version of tapdance to userprofile. * Created 4th layer and updated readme file. Removed ascii rep of layout. * Tabdance updates * Removed duplicated RGB keys. * Added hvp minivan config * Fixed tapdance key maps * Added Planck 1 space base hvp layout * Start of hvp xd75 layout. Way to many keys * Added working config ink test for atreus62 * fixed smaller layout changes * Updated tap dance with option 5 * Added better thump keys * Created lets split layout * Removed not used modes * Updated to correct url * Readme file * Atreus62 readme * Cleanup of keymap file * Added tap dance * Fixed missed adjustment * Added hvp planck setup * Update ascii * will this work better? * removed ascii * Planck 1 space setup * Fixed ascii local * Added Corne setup * Changes for lets split * Atreus62 config * Added Lily58 * Setup corne * Setup planck * Updated lets split * UT47 setup * Setup a The Vanboard. * Alt Ctrl * #define D_NAVI MT(MOD_LCTL | MOD_LSFT, KC_D) * Fix D_NAVI & plank midi * Fixed PR comments * Added pragma * Moved def to user space * Removed not used endif * Added def to users space * Added rules to van * Removed not used part of config * Removed not used layout * Removed not needed comments * Remove not needed keymap_config_t * Removed broken ascii from readme files and removed not needed rules * Added spaces to readme file * Removed xd75 from branch
4 years ago
[Keymap] Hvp baseline19 (#7690) * Added my UT47.2 Swedish layout with tap dance function. * Move tap dance over to user space * Removed config_common from config file * Changes to workspace with new support for code16. Tested ok * Swedish support * Added code16 version of tapdance to userprofile. * Created 4th layer and updated readme file. Removed ascii rep of layout. * Tabdance updates * Removed duplicated RGB keys. * Added hvp minivan config * Fixed tapdance key maps * Added Planck 1 space base hvp layout * Start of hvp xd75 layout. Way to many keys * Added working config ink test for atreus62 * fixed smaller layout changes * Updated tap dance with option 5 * Added better thump keys * Created lets split layout * Removed not used modes * Updated to correct url * Readme file * Atreus62 readme * Cleanup of keymap file * Added tap dance * Fixed missed adjustment * Added hvp planck setup * Update ascii * will this work better? * removed ascii * Planck 1 space setup * Fixed ascii local * Added Corne setup * Changes for lets split * Atreus62 config * Added Lily58 * Setup corne * Setup planck * Updated lets split * UT47 setup * Setup a The Vanboard. * Alt Ctrl * #define D_NAVI MT(MOD_LCTL | MOD_LSFT, KC_D) * Fix D_NAVI & plank midi * Fixed PR comments * Added pragma * Moved def to user space * Removed not used endif * Added def to users space * Added rules to van * Removed not used part of config * Removed not used layout * Removed not needed comments * Remove not needed keymap_config_t * Removed broken ascii from readme files and removed not needed rules * Added spaces to readme file * Removed xd75 from branch
4 years ago
[Keymap] Hvp baseline19 (#7690) * Added my UT47.2 Swedish layout with tap dance function. * Move tap dance over to user space * Removed config_common from config file * Changes to workspace with new support for code16. Tested ok * Swedish support * Added code16 version of tapdance to userprofile. * Created 4th layer and updated readme file. Removed ascii rep of layout. * Tabdance updates * Removed duplicated RGB keys. * Added hvp minivan config * Fixed tapdance key maps * Added Planck 1 space base hvp layout * Start of hvp xd75 layout. Way to many keys * Added working config ink test for atreus62 * fixed smaller layout changes * Updated tap dance with option 5 * Added better thump keys * Created lets split layout * Removed not used modes * Updated to correct url * Readme file * Atreus62 readme * Cleanup of keymap file * Added tap dance * Fixed missed adjustment * Added hvp planck setup * Update ascii * will this work better? * removed ascii * Planck 1 space setup * Fixed ascii local * Added Corne setup * Changes for lets split * Atreus62 config * Added Lily58 * Setup corne * Setup planck * Updated lets split * UT47 setup * Setup a The Vanboard. * Alt Ctrl * #define D_NAVI MT(MOD_LCTL | MOD_LSFT, KC_D) * Fix D_NAVI & plank midi * Fixed PR comments * Added pragma * Moved def to user space * Removed not used endif * Added def to users space * Added rules to van * Removed not used part of config * Removed not used layout * Removed not needed comments * Remove not needed keymap_config_t * Removed broken ascii from readme files and removed not needed rules * Added spaces to readme file * Removed xd75 from branch
4 years ago
[Keymap] Hvp baseline19 (#7690) * Added my UT47.2 Swedish layout with tap dance function. * Move tap dance over to user space * Removed config_common from config file * Changes to workspace with new support for code16. Tested ok * Swedish support * Added code16 version of tapdance to userprofile. * Created 4th layer and updated readme file. Removed ascii rep of layout. * Tabdance updates * Removed duplicated RGB keys. * Added hvp minivan config * Fixed tapdance key maps * Added Planck 1 space base hvp layout * Start of hvp xd75 layout. Way to many keys * Added working config ink test for atreus62 * fixed smaller layout changes * Updated tap dance with option 5 * Added better thump keys * Created lets split layout * Removed not used modes * Updated to correct url * Readme file * Atreus62 readme * Cleanup of keymap file * Added tap dance * Fixed missed adjustment * Added hvp planck setup * Update ascii * will this work better? * removed ascii * Planck 1 space setup * Fixed ascii local * Added Corne setup * Changes for lets split * Atreus62 config * Added Lily58 * Setup corne * Setup planck * Updated lets split * UT47 setup * Setup a The Vanboard. * Alt Ctrl * #define D_NAVI MT(MOD_LCTL | MOD_LSFT, KC_D) * Fix D_NAVI & plank midi * Fixed PR comments * Added pragma * Moved def to user space * Removed not used endif * Added def to users space * Added rules to van * Removed not used part of config * Removed not used layout * Removed not needed comments * Remove not needed keymap_config_t * Removed broken ascii from readme files and removed not needed rules * Added spaces to readme file * Removed xd75 from branch
4 years ago
  1. /* Copyright 2015-2017 Jack Humbert
  2. *
  3. * This program is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation, either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #include "hvp.c"
  17. #include QMK_KEYBOARD_H
  18. #include "muse.h"
  19. enum planck_layers {
  20. _QWERTY,
  21. _LOWER,
  22. _RAISE,
  23. _NAVI,
  24. _ADJUST
  25. };
  26. enum planck_keycodes {
  27. QWERTY = SAFE_RANGE
  28. };
  29. #define _QWERTY 0
  30. #define _RAISE 1
  31. #define _LOWER 2
  32. #define _NAVI 3
  33. #define _ADJUST 5
  34. #define LT3_ESC LT(3, KC_ESC)
  35. #define LT4_TAB LT(5, KC_TAB)
  36. #define LOWER MO(_LOWER)
  37. #define RAISE MO(_RAISE)
  38. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  39. [_QWERTY] = LAYOUT_planck_grid(
  40. LT4_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
  41. LT3_ESC, KC_A, KC_S, KC_D, LT(3,KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, TD(TD1), TD(TD2),
  42. KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, TD(TD3), KC_SFTENT,
  43. KC_LCTL, KC_APP, KC_LGUI, KC_LALT, MO(2), KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
  44. ),
  45. [_RAISE] = LAYOUT_planck_grid( /* Right */
  46. KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
  47. KC_DEL, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
  48. _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
  49. _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
  50. ),
  51. [_LOWER] = LAYOUT_planck_grid( /* Left */
  52. KC_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_BSPC,
  53. KC_DEL, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS,
  54. _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TILD,
  55. _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
  56. ),
  57. [_NAVI] = LAYOUT_planck_grid( /* Esc */
  58. KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
  59. _______, _______, _______, D_NAVI, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_PSCR,
  60. _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______,
  61. _______, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPLY, KC_MSTP, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT
  62. ),
  63. [_ADJUST] = LAYOUT_planck_grid( /* Tab */
  64. _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______,
  65. _______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, KC_4, KC_5, KC_6, _______, _______,
  66. KC_PSCR, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, KC_0, KC_1, KC_2, KC_3, _______,
  67. RESET, _______, TERM_ON, TERM_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, DEBUG
  68. )};
  69. #ifdef AUDIO_ENABLE
  70. float plover_song[][2] = SONG(PLOVER_SOUND);
  71. float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
  72. #endif
  73. bool muse_mode = false;
  74. uint8_t last_muse_note = 0;
  75. uint16_t muse_counter = 0;
  76. uint8_t muse_offset = 70;
  77. uint16_t muse_tempo = 50;
  78. bool encoder_update_user(uint8_t index, bool clockwise) {
  79. if (muse_mode) {
  80. if (IS_LAYER_ON(_RAISE)) {
  81. if (clockwise) {
  82. muse_offset++;
  83. } else {
  84. muse_offset--;
  85. }
  86. } else {
  87. if (clockwise) {
  88. muse_tempo+=1;
  89. } else {
  90. muse_tempo-=1;
  91. }
  92. }
  93. } else {
  94. if (clockwise) {
  95. #ifdef MOUSEKEY_ENABLE
  96. tap_code(KC_MS_WH_DOWN);
  97. #else
  98. tap_code(KC_PGDN);
  99. #endif
  100. } else {
  101. #ifdef MOUSEKEY_ENABLE
  102. tap_code(KC_MS_WH_UP);
  103. #else
  104. tap_code(KC_PGUP);
  105. #endif
  106. }
  107. }
  108. return true;
  109. }
  110. bool dip_switch_update_user(uint8_t index, bool active) {
  111. switch (index) {
  112. case 0: {
  113. #ifdef AUDIO_ENABLE
  114. static bool play_sound = false;
  115. #endif
  116. if (active) {
  117. #ifdef AUDIO_ENABLE
  118. if (play_sound) { PLAY_SONG(plover_song); }
  119. #endif
  120. layer_on(_ADJUST);
  121. } else {
  122. #ifdef AUDIO_ENABLE
  123. if (play_sound) { PLAY_SONG(plover_gb_song); }
  124. #endif
  125. layer_off(_ADJUST);
  126. }
  127. #ifdef AUDIO_ENABLE
  128. play_sound = true;
  129. #endif
  130. break;
  131. }
  132. case 1:
  133. if (active) {
  134. muse_mode = true;
  135. } else {
  136. muse_mode = false;
  137. }
  138. }
  139. return true;
  140. }
  141. void matrix_scan_user(void) {
  142. #ifdef AUDIO_ENABLE
  143. if (muse_mode) {
  144. if (muse_counter == 0) {
  145. uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
  146. if (muse_note != last_muse_note) {
  147. stop_note(compute_freq_for_midi_note(last_muse_note));
  148. play_note(compute_freq_for_midi_note(muse_note), 0xF);
  149. last_muse_note = muse_note;
  150. }
  151. }
  152. muse_counter = (muse_counter + 1) % muse_tempo;
  153. } else {
  154. if (muse_counter) {
  155. stop_all_notes();
  156. muse_counter = 0;
  157. }
  158. }
  159. #endif
  160. }
  161. bool music_mask_user(uint16_t keycode) {
  162. switch (keycode) {
  163. case RAISE:
  164. case LOWER:
  165. return false;
  166. default:
  167. return true;
  168. }
  169. }