summaryrefslogtreecommitdiff
path: root/keyboard/planck
diff options
context:
space:
mode:
Diffstat (limited to 'keyboard/planck')
-rw-r--r--keyboard/planck/keymaps/alexey/alexey.c (renamed from keyboard/planck/keymaps/alexey.c)0
-rw-r--r--keyboard/planck/keymaps/angerthosenear/angerthosenear.c (renamed from keyboard/planck/keymaps/angerthosenear.c)0
-rw-r--r--keyboard/planck/keymaps/austin/austin.c (renamed from keyboard/planck/keymaps/austin.c)0
-rw-r--r--keyboard/planck/keymaps/bone2planck/bone2planck.c (renamed from keyboard/planck/keymaps/bone2planck.c)0
-rw-r--r--keyboard/planck/keymaps/brandon/brandon.c (renamed from keyboard/planck/keymaps/brandon.c)0
-rw-r--r--keyboard/planck/keymaps/charlie/charlie.c (renamed from keyboard/planck/keymaps/charlie.c)0
-rw-r--r--keyboard/planck/keymaps/daniel/daniel.c (renamed from keyboard/planck/keymaps/daniel.c)0
-rw-r--r--keyboard/planck/keymaps/david/david.c (renamed from keyboard/planck/keymaps/david.c)0
-rw-r--r--keyboard/planck/keymaps/default/keymap.c95
-rw-r--r--keyboard/planck/keymaps/dzobert/dzobert.c (renamed from keyboard/planck/keymaps/dzobert.c)0
-rw-r--r--keyboard/planck/keymaps/experimental/keymap.c128
-rw-r--r--keyboard/planck/keymaps/experimental/makefile.mk5
-rw-r--r--keyboard/planck/keymaps/gabriel/gabriel.c (renamed from keyboard/planck/keymaps/gabriel.c)0
-rw-r--r--keyboard/planck/keymaps/jacob/Keyboard Layout.PNGbin0 -> 17292 bytes
-rw-r--r--keyboard/planck/keymaps/jacob/keymap.c56
-rw-r--r--keyboard/planck/keymaps/jacob/readme.md1
-rw-r--r--keyboard/planck/keymaps/joe/joe.c (renamed from keyboard/planck/keymaps/joe.c)0
-rw-r--r--keyboard/planck/keymaps/kyle/kyle.c (renamed from keyboard/planck/keymaps/kyle.c)0
-rw-r--r--keyboard/planck/keymaps/leo/leo.c (renamed from keyboard/planck/keymaps/leo.c)0
-rw-r--r--keyboard/planck/keymaps/lucas/lucas.c (renamed from keyboard/planck/keymaps/lucas.c)0
-rw-r--r--keyboard/planck/keymaps/lukas/lukas.c (renamed from keyboard/planck/keymaps/lukas.c)0
-rw-r--r--keyboard/planck/keymaps/max/max.c (renamed from keyboard/planck/keymaps/max.c)0
-rw-r--r--keyboard/planck/keymaps/mollat/mollat.c (renamed from keyboard/planck/keymaps/mollat.c)0
-rw-r--r--keyboard/planck/keymaps/monkey/monkey.c (renamed from keyboard/planck/keymaps/monkey.c)0
-rw-r--r--keyboard/planck/keymaps/nico/nico.c (renamed from keyboard/planck/keymaps/nico.c)0
-rw-r--r--keyboard/planck/keymaps/numpad/numpad.c (renamed from keyboard/planck/keymaps/numpad.c)0
-rw-r--r--keyboard/planck/keymaps/tak3over/tak3over.c (renamed from keyboard/planck/keymaps/tak3over.c)0
-rw-r--r--keyboard/planck/keymaps/unicode/keymap.c326
-rw-r--r--keyboard/planck/keymaps/unicode/makefile.mk1
-rw-r--r--keyboard/planck/planck.c8
-rw-r--r--keyboard/planck/planck.h16
31 files changed, 441 insertions, 195 deletions
diff --git a/keyboard/planck/keymaps/alexey.c b/keyboard/planck/keymaps/alexey/alexey.c
index 89af4112c6..89af4112c6 100644
--- a/keyboard/planck/keymaps/alexey.c
+++ b/keyboard/planck/keymaps/alexey/alexey.c
diff --git a/keyboard/planck/keymaps/angerthosenear.c b/keyboard/planck/keymaps/angerthosenear/angerthosenear.c
index cdf60632e4..cdf60632e4 100644
--- a/keyboard/planck/keymaps/angerthosenear.c
+++ b/keyboard/planck/keymaps/angerthosenear/angerthosenear.c
diff --git a/keyboard/planck/keymaps/austin.c b/keyboard/planck/keymaps/austin/austin.c
index 49fc98a587..49fc98a587 100644
--- a/keyboard/planck/keymaps/austin.c
+++ b/keyboard/planck/keymaps/austin/austin.c
diff --git a/keyboard/planck/keymaps/bone2planck.c b/keyboard/planck/keymaps/bone2planck/bone2planck.c
index a99e7719f9..a99e7719f9 100644
--- a/keyboard/planck/keymaps/bone2planck.c
+++ b/keyboard/planck/keymaps/bone2planck/bone2planck.c
diff --git a/keyboard/planck/keymaps/brandon.c b/keyboard/planck/keymaps/brandon/brandon.c
index 2b89f86db2..2b89f86db2 100644
--- a/keyboard/planck/keymaps/brandon.c
+++ b/keyboard/planck/keymaps/brandon/brandon.c
diff --git a/keyboard/planck/keymaps/charlie.c b/keyboard/planck/keymaps/charlie/charlie.c
index 88f454d789..88f454d789 100644
--- a/keyboard/planck/keymaps/charlie.c
+++ b/keyboard/planck/keymaps/charlie/charlie.c
diff --git a/keyboard/planck/keymaps/daniel.c b/keyboard/planck/keymaps/daniel/daniel.c
index 234e48ff4a..234e48ff4a 100644
--- a/keyboard/planck/keymaps/daniel.c
+++ b/keyboard/planck/keymaps/daniel/daniel.c
diff --git a/keyboard/planck/keymaps/david.c b/keyboard/planck/keymaps/david/david.c
index f483084801..f483084801 100644
--- a/keyboard/planck/keymaps/david.c
+++ b/keyboard/planck/keymaps/david/david.c
diff --git a/keyboard/planck/keymaps/default/keymap.c b/keyboard/planck/keymaps/default/keymap.c
index 56f20a3b99..36d496416e 100644
--- a/keyboard/planck/keymaps/default/keymap.c
+++ b/keyboard/planck/keymaps/default/keymap.c
@@ -19,8 +19,7 @@ extern keymap_config_t keymap_config;
#define _DVORAK 2
#define _LOWER 3
#define _RAISE 4
-#define _MUSIC 5
-#define _PLOVER 6
+#define _PLOVER 5
#define _ADJUST 16
// Macro name shortcuts
@@ -30,12 +29,6 @@ extern keymap_config_t keymap_config;
#define LOWER M(_LOWER)
#define RAISE M(_RAISE)
#define M_BL 5
-#define AUD_OFF M(6)
-#define AUD_ON M(7)
-#define MUS_OFF M(8)
-#define MUS_ON M(9)
-#define VC_IN M(10)
-#define VC_DE M(11)
#define PLOVER M(12)
#define EXT_PLV M(13)
#define TOG_OUT M(14)
@@ -106,7 +99,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter |
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
@@ -114,7 +107,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LOWER] = {
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______},
+ {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
},
@@ -124,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter |
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
@@ -132,20 +125,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_RAISE] = {
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______},
+ {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
},
-/* Music (reserved for process_action_user)
- *
- */
-[_MUSIC] = {
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
-},
-
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
* | # | # | # | # | # | # | # | # | # | # | # | # |
@@ -178,8 +161,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_ADJUST] = {
{_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
- {_______, _______, _______, AUD_ON, AUD_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
- {_______, VC_DE, VC_IN, MUS_ON, MUS_OFF, _______, _______, _______, _______, _______, _______, _______},
+ {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
+ {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
}
@@ -205,7 +188,6 @@ float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float tone_plover[][2] = SONG(PLOVER_SOUND);
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
-float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
float goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
@@ -270,53 +252,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
unregister_code(KC_RSFT);
}
break;
- case 6:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
- audio_off();
- #endif
- }
- break;
- case 7:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
- audio_on();
- PLAY_NOTE_ARRAY(tone_startup, false, 0);
- #endif
- }
- break;
- case 8:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
- layer_off(_MUSIC);
- stop_all_notes();
- #endif
- }
- break;
- case 9:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
- PLAY_NOTE_ARRAY(music_scale, false, 0);
- layer_on(_MUSIC);
- #endif
- }
- break;
- case 10:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
- voice_iterate();
- PLAY_NOTE_ARRAY(music_scale, false, 0);
- #endif
- }
- break;
- case 11:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
- voice_deiterate();
- PLAY_NOTE_ARRAY(music_scale, false, 0);
- #endif
- }
- break;
case 12:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
@@ -326,7 +261,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
layer_off(_RAISE);
layer_off(_LOWER);
layer_off(_ADJUST);
- layer_off(_MUSIC);
layer_on(_PLOVER);
if (!eeconfig_is_enabled()) {
eeconfig_init();
@@ -366,19 +300,4 @@ void play_goodbye_tone()
PLAY_NOTE_ARRAY(goodbye, false, 0);
_delay_ms(150);
}
-
-uint8_t starting_note = 0x0C;
-int offset = 0;
-
-void process_action_user(keyrecord_t *record) {
-
- if (IS_LAYER_ON(_MUSIC)) {
- if (record->event.pressed) {
- play_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF);
- } else {
- stop_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)));
- }
- }
-
-}
#endif
diff --git a/keyboard/planck/keymaps/dzobert.c b/keyboard/planck/keymaps/dzobert/dzobert.c
index 665e9c20b6..665e9c20b6 100644
--- a/keyboard/planck/keymaps/dzobert.c
+++ b/keyboard/planck/keymaps/dzobert/dzobert.c
diff --git a/keyboard/planck/keymaps/experimental/keymap.c b/keyboard/planck/keymaps/experimental/keymap.c
index fc3ac4a97e..4b9c15e084 100644
--- a/keyboard/planck/keymaps/experimental/keymap.c
+++ b/keyboard/planck/keymaps/experimental/keymap.c
@@ -6,6 +6,7 @@
#ifdef AUDIO_ENABLE
#include "audio.h"
#endif
+
#include "eeconfig.h"
extern keymap_config_t keymap_config;
@@ -19,8 +20,7 @@ extern keymap_config_t keymap_config;
#define _DVORAK 2
#define _LOWER 3
#define _RAISE 4
-#define _MUSIC 5
-#define _PLOVER 6
+#define _PLOVER 5
#define _ADJUST 16
// Macro name shortcuts
@@ -30,12 +30,6 @@ extern keymap_config_t keymap_config;
#define LOWER M(_LOWER)
#define RAISE M(_RAISE)
#define M_BL 5
-#define AUD_OFF M(6)
-#define AUD_ON M(7)
-#define MUS_OFF M(8)
-#define MUS_ON M(9)
-#define VC_IN M(10)
-#define VC_DE M(11)
#define PLOVER M(12)
#define EXT_PLV M(13)
@@ -78,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
{KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
- {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+ {KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
/* Dvorak
@@ -105,7 +99,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter |
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
@@ -113,7 +107,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LOWER] = {
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______},
+ {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
},
@@ -123,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter |
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
@@ -131,20 +125,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_RAISE] = {
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______},
+ {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUHS, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
},
-/* Music (reserved for process_action_user)
- *
- */
-[_MUSIC] = {
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
-},
-
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
* | # | # | # | # | # | # | # | # | # | # | # | # |
@@ -177,8 +161,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_ADJUST] = {
{_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
- {_______, _______, _______, AUD_ON, AUD_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
- {_______, VC_DE, VC_IN, MUS_ON, MUS_OFF, _______, _______, _______, _______, _______, _______, _______},
+ {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
+ {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
}
@@ -204,7 +188,6 @@ float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float tone_plover[][2] = SONG(PLOVER_SOUND);
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
-float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
float goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
@@ -244,8 +227,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
case _LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
+ #ifdef BACKLIGHT_ENABLE
breathing_speed_set(2);
breathing_pulse();
+ #endif
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_LOWER);
@@ -255,8 +240,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
case _RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
+ #ifdef BACKLIGHT_ENABLE
breathing_speed_set(2);
breathing_pulse();
+ #endif
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_RAISE);
@@ -273,53 +260,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
unregister_code(KC_RSFT);
}
break;
- case 6:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
- audio_off();
- #endif
- }
- break;
- case 7:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
- audio_on();
- PLAY_NOTE_ARRAY(tone_startup, false, 0);
- #endif
- }
- break;
- case 8:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
- layer_off(_MUSIC);
- stop_all_notes();
- #endif
- }
- break;
- case 9:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
- PLAY_NOTE_ARRAY(music_scale, false, 0);
- layer_on(_MUSIC);
- #endif
- }
- break;
- case 10:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
- voice_iterate();
- PLAY_NOTE_ARRAY(music_scale, false, 0);
- #endif
- }
- break;
- case 11:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
- voice_deiterate();
- PLAY_NOTE_ARRAY(music_scale, false, 0);
- #endif
- }
- break;
case 12:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
@@ -329,7 +269,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
layer_off(_RAISE);
layer_off(_LOWER);
layer_off(_ADJUST);
- layer_off(_MUSIC);
layer_on(_PLOVER);
if (!eeconfig_is_enabled()) {
eeconfig_init();
@@ -360,24 +299,35 @@ void matrix_init_user(void) {
}
#ifdef AUDIO_ENABLE
-void play_goodbye_tone()
-{
- PLAY_NOTE_ARRAY(goodbye, false, 0);
- _delay_ms(150);
-}
+ void play_goodbye_tone(void)
+ {
+ PLAY_NOTE_ARRAY(goodbye, false, 0);
+ _delay_ms(150);
+ }
+#endif
+
+LEADER_EXTERNS();
-uint8_t starting_note = 0x0C;
-int offset = 0;
+#define LEADER_TIMEOUT 300
-void process_action_user(keyrecord_t *record) {
+void matrix_scan_user(void) {
+ LEADER_DICTIONARY() {
+ leading = false;
+ leader_end();
- if (IS_LAYER_ON(_MUSIC)) {
- if (record->event.pressed) {
- play_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF);
- } else {
- stop_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)));
+ SEQ_ONE_KEY(KC_F) {
+ register_code(KC_S);
+ unregister_code(KC_S);
+ }
+ SEQ_TWO_KEYS(KC_A, KC_S) {
+ register_code(KC_H);
+ unregister_code(KC_H);
+ }
+ SEQ_THREE_KEYS(KC_A, KC_S, KC_D) {
+ register_code(KC_LGUI);
+ register_code(KC_S);
+ unregister_code(KC_S);
+ unregister_code(KC_LGUI);
}
}
-
}
-#endif
diff --git a/keyboard/planck/keymaps/experimental/makefile.mk b/keyboard/planck/keymaps/experimental/makefile.mk
index 99fbfbd0bb..6c1e05b65a 100644
--- a/keyboard/planck/keymaps/experimental/makefile.mk
+++ b/keyboard/planck/keymaps/experimental/makefile.mk
@@ -1,2 +1,5 @@
AUDIO_ENABLE = yes
-NKRO_ENABLE = yes \ No newline at end of file
+NKRO_ENABLE = yes
+MIDI_ENABLE = yes
+BACKLIGHT_ENABLE = no
+COMMAND_ENABLE = no \ No newline at end of file
diff --git a/keyboard/planck/keymaps/gabriel.c b/keyboard/planck/keymaps/gabriel/gabriel.c
index 805484488b..805484488b 100644
--- a/keyboard/planck/keymaps/gabriel.c
+++ b/keyboard/planck/keymaps/gabriel/gabriel.c
diff --git a/keyboard/planck/keymaps/jacob/Keyboard Layout.PNG b/keyboard/planck/keymaps/jacob/Keyboard Layout.PNG
new file mode 100644
index 0000000000..40f0b89429
--- /dev/null
+++ b/keyboard/planck/keymaps/jacob/Keyboard Layout.PNG
Binary files differ
diff --git a/keyboard/planck/keymaps/jacob/keymap.c b/keyboard/planck/keymaps/jacob/keymap.c
new file mode 100644
index 0000000000..5e6e8498e2
--- /dev/null
+++ b/keyboard/planck/keymaps/jacob/keymap.c
@@ -0,0 +1,56 @@
+#include "planck.h"
+#include "action_layer.h"
+#ifdef BACKLIGHT_ENABLE
+ #include "backlight.h"
+#endif
+
+//Simple Keymap where CTRL, WINKEY, and ALT keys are placed in a more familiar location for Windows users.
+//Focus of this particular keymap is to enable easy transition from more traditional keyboards to OLKB Planck.
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+#define _QW 0
+#define _LW 1
+#define _RS 2
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QW] = { /* Qwerty */
+ {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
+ {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
+ {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT)},
+ {KC_LCTL, KC_LGUI, KC_LALT, M(0), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+ },
+ [_RS] = { /* RAISE */
+ {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL },
+ {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
+ {KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
+ {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
+ },
+ [_LW] = { /* LOWER */
+ {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL },
+ {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
+ {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS},
+ {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
+ }
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ switch(id) {
+ case 0:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ #ifdef BACKLIGHT_ENABLE
+ backlight_step();
+ #endif
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ }
+ return MACRO_NONE;
+};
diff --git a/keyboard/planck/keymaps/jacob/readme.md b/keyboard/planck/keymaps/jacob/readme.md
new file mode 100644
index 0000000000..2a4be4ebce
--- /dev/null
+++ b/keyboard/planck/keymaps/jacob/readme.md
@@ -0,0 +1 @@
+Focus of this particular keymap is to enable easy transition from more traditional keyboards to OLKB Planck. \ No newline at end of file
diff --git a/keyboard/planck/keymaps/joe.c b/keyboard/planck/keymaps/joe/joe.c
index 5b7bbe2bbb..5b7bbe2bbb 100644
--- a/keyboard/planck/keymaps/joe.c
+++ b/keyboard/planck/keymaps/joe/joe.c
diff --git a/keyboard/planck/keymaps/kyle.c b/keyboard/planck/keymaps/kyle/kyle.c
index da32b74f96..da32b74f96 100644
--- a/keyboard/planck/keymaps/kyle.c
+++ b/keyboard/planck/keymaps/kyle/kyle.c
diff --git a/keyboard/planck/keymaps/leo.c b/keyboard/planck/keymaps/leo/leo.c
index 6d66441822..6d66441822 100644
--- a/keyboard/planck/keymaps/leo.c
+++ b/keyboard/planck/keymaps/leo/leo.c
diff --git a/keyboard/planck/keymaps/lucas.c b/keyboard/planck/keymaps/lucas/lucas.c
index 27672e1bbc..27672e1bbc 100644
--- a/keyboard/planck/keymaps/lucas.c
+++ b/keyboard/planck/keymaps/lucas/lucas.c
diff --git a/keyboard/planck/keymaps/lukas.c b/keyboard/planck/keymaps/lukas/lukas.c
index 6fd95378b1..6fd95378b1 100644
--- a/keyboard/planck/keymaps/lukas.c
+++ b/keyboard/planck/keymaps/lukas/lukas.c
diff --git a/keyboard/planck/keymaps/max.c b/keyboard/planck/keymaps/max/max.c
index 7fb29bc7a4..7fb29bc7a4 100644
--- a/keyboard/planck/keymaps/max.c
+++ b/keyboard/planck/keymaps/max/max.c
diff --git a/keyboard/planck/keymaps/mollat.c b/keyboard/planck/keymaps/mollat/mollat.c
index e7c71efd47..e7c71efd47 100644
--- a/keyboard/planck/keymaps/mollat.c
+++ b/keyboard/planck/keymaps/mollat/mollat.c
diff --git a/keyboard/planck/keymaps/monkey.c b/keyboard/planck/keymaps/monkey/monkey.c
index 21a2c146ab..21a2c146ab 100644
--- a/keyboard/planck/keymaps/monkey.c
+++ b/keyboard/planck/keymaps/monkey/monkey.c
diff --git a/keyboard/planck/keymaps/nico.c b/keyboard/planck/keymaps/nico/nico.c
index e81fd80a44..e81fd80a44 100644
--- a/keyboard/planck/keymaps/nico.c
+++ b/keyboard/planck/keymaps/nico/nico.c
diff --git a/keyboard/planck/keymaps/numpad.c b/keyboard/planck/keymaps/numpad/numpad.c
index 7de4372ab0..7de4372ab0 100644
--- a/keyboard/planck/keymaps/numpad.c
+++ b/keyboard/planck/keymaps/numpad/numpad.c
diff --git a/keyboard/planck/keymaps/tak3over.c b/keyboard/planck/keymaps/tak3over/tak3over.c
index 7d8243dfac..7d8243dfac 100644
--- a/keyboard/planck/keymaps/tak3over.c
+++ b/keyboard/planck/keymaps/tak3over/tak3over.c
diff --git a/keyboard/planck/keymaps/unicode/keymap.c b/keyboard/planck/keymaps/unicode/keymap.c
new file mode 100644
index 0000000000..d73e7e09d4
--- /dev/null
+++ b/keyboard/planck/keymaps/unicode/keymap.c
@@ -0,0 +1,326 @@
+/*
+ Copyright
+ 2015 Jack Humbert <jack.humb@gmail.com>
+ 2016 Francois Marlier <fmarlier@gmail.com>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ For more info on how this works per OS, see here
+ https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input
+*/
+
+
+#include "planck.h"
+#include "action_layer.h"
+#ifdef AUDIO_ENABLE
+ #include "audio.h"
+#endif
+#include "eeconfig.h"
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _QWERTY 0
+#define _COLEMAK 1
+#define _DVORAK 2
+#define _LOWER 3
+#define _RAISE 4
+#define _PLOVER 5
+#define _ADJUST 16
+
+// Macro name shortcuts
+#define QWERTY M(_QWERTY)
+#define COLEMAK M(_COLEMAK)
+#define DVORAK M(_DVORAK)
+#define LOWER M(_LOWER)
+#define RAISE M(_RAISE)
+#define M_BL 5
+#define PLOVER M(12)
+#define EXT_PLV M(13)
+#define TOG_OUT M(14)
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = {
+ {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
+ {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
+ {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
+ {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+},
+
+/* Colemak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | R | S | T | D | H | N | E | I | O | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_COLEMAK] = {
+ {KC_TAB, UC_q, UC_w, UC_f, UC_p, UC_g, UC_j, UC_l, UC_u, UC_y, UC_SCLN, UC_BSPC},
+ {KC_ESC, UC_a, UC_r, UC_s, UC_t, UC_d, UC_h, UC_n, UC_e, UC_i, UC_o, UC_QUOT},
+ {KC_LSFT, UC_z, UC_x, UC_c, UC_v, UC_b, UC_k, UC_m, UC_COMM, UC_DOT, UC_SLSH, KC_ENT},
+ {KC_TRNS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+},
+
+/* Dvorak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | O | E | U | I | D | H | T | N | S | / |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_DVORAK] = {
+ {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
+ {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
+ {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
+ {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+},
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = {
+ {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
+ {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
+ {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______},
+ {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
+},
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = {
+ {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
+ {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
+ {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______},
+ {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
+},
+
+/* Plover layer (http://opensteno.org)
+ * ,-----------------------------------------------------------------------------------.
+ * | # | # | # | # | # | # | # | # | # | # | # | # |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | S | T | P | H | * | * | F | P | L | T | D |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |TogOut| S | K | W | R | * | * | R | B | G | S | Z |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Exit | | | A | O | | E | U | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+
+[_PLOVER] = {
+ {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
+ {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
+ {TOG_OUT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
+ {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
+},
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * | | Reset| | | | | | | | | | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | |Voice-|Voice+|Mus on|Musoff| | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = {
+ {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
+ {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
+ {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
+ {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
+}
+
+
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+#ifdef AUDIO_ENABLE
+float tone_startup[][2] = {
+ {440.0*pow(2.0,(31)/12.0), 12},
+ {440.0*pow(2.0,(28)/12.0), 8},
+ {440.0*pow(2.0,(19)/12.0), 8},
+ {440.0*pow(2.0,(24)/12.0), 8},
+ {440.0*pow(2.0,(28)/12.0), 20}
+};
+
+float tone_qwerty[][2] = SONG(QWERTY_SOUND);
+float tone_dvorak[][2] = SONG(DVORAK_SOUND);
+float tone_colemak[][2] = SONG(COLEMAK_SOUND);
+float tone_plover[][2] = SONG(PLOVER_SOUND);
+float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
+
+float goodbye[][2] = SONG(GOODBYE_SOUND);
+#endif
+
+
+void persistant_default_layer_set(uint16_t default_layer) {
+ eeconfig_update_default_layer(default_layer);
+ default_layer_set(default_layer);
+}
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ switch(id) {
+ case _QWERTY:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
+ #endif
+ persistant_default_layer_set(1UL<<_QWERTY);
+ }
+ break;
+ case _COLEMAK:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_NOTE_ARRAY(tone_colemak, false, 0);
+ #endif
+ persistant_default_layer_set(1UL<<_COLEMAK);
+ }
+ break;
+ case _DVORAK:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
+ #endif
+ persistant_default_layer_set(1UL<<_DVORAK);
+ }
+ break;
+ case _LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ break;
+ case _RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ break;
+ case M_BL:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ #ifdef BACKLIGHT_ENABLE
+ backlight_step();
+ #endif
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ case 12:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ stop_all_notes();
+ PLAY_NOTE_ARRAY(tone_plover, false, 0);
+ #endif
+ layer_off(_RAISE);
+ layer_off(_LOWER);
+ layer_off(_ADJUST);
+ layer_on(_PLOVER);
+ if (!eeconfig_is_enabled()) {
+ eeconfig_init();
+ }
+ keymap_config.raw = eeconfig_read_keymap();
+ keymap_config.nkro = 1;
+ eeconfig_update_keymap(keymap_config.raw);
+ }
+ break;
+ case 13:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_NOTE_ARRAY(tone_plover_gb, false, 0);
+ #endif
+ layer_off(_PLOVER);
+ }
+ break;
+ case 14:
+ if (record->event.pressed) {
+ return MACRO( D(E), D(R), D(F), D(V), D(O), D(L), U(E), U(R), U(F), U(V), U(O), U(L), END );
+ }
+ break;
+ }
+ return MACRO_NONE;
+};
+
+void matrix_init_user(void) {
+ #ifdef AUDIO_ENABLE
+ _delay_ms(20); // stops the tick
+ PLAY_NOTE_ARRAY(tone_startup, false, 0);
+ #endif
+}
+
+#ifdef AUDIO_ENABLE
+void play_goodbye_tone()
+{
+ PLAY_NOTE_ARRAY(goodbye, false, 0);
+ _delay_ms(150);
+}
+#endif
+
+
diff --git a/keyboard/planck/keymaps/unicode/makefile.mk b/keyboard/planck/keymaps/unicode/makefile.mk
new file mode 100644
index 0000000000..9b27b08bed
--- /dev/null
+++ b/keyboard/planck/keymaps/unicode/makefile.mk
@@ -0,0 +1 @@
+UNICODE_ENABLE = yes # Unicode
diff --git a/keyboard/planck/planck.c b/keyboard/planck/planck.c
index 446353dbf5..da7b3a1702 100644
--- a/keyboard/planck/planck.c
+++ b/keyboard/planck/planck.c
@@ -7,7 +7,9 @@ __attribute__ ((weak))
void matrix_scan_user(void) {}
__attribute__ ((weak))
-void process_action_user(keyrecord_t *record) {}
+bool process_action_user(keyrecord_t *record) {
+ return true;
+}
__attribute__ ((weak))
void led_set_user(uint8_t usb_led) {}
@@ -32,8 +34,8 @@ void matrix_scan_kb(void) {
matrix_scan_user();
}
-void process_action_kb(keyrecord_t *record) {
- process_action_user(record);
+bool process_action_kb(keyrecord_t *record) {
+ return process_action_user(record);
}
void led_set_kb(uint8_t usb_led) {
diff --git a/keyboard/planck/planck.h b/keyboard/planck/planck.h
index cfd4956bf1..8aec6b2627 100644
--- a/keyboard/planck/planck.h
+++ b/keyboard/planck/planck.h
@@ -1,19 +1,7 @@
#ifndef PLANCK_H
#define PLANCK_H
-#include "matrix.h"
-#include "keymap_common.h"
-#ifdef BACKLIGHT_ENABLE
- #include "backlight.h"
-#endif
-#ifdef RGBLIGHT_ENABLE
- #include "rgblight.h"
-#endif
-#include <stddef.h>
-#include <avr/io.h>
-#ifdef MIDI_ENABLE
- #include <keymap_midi.h>
-#endif
+#include "quantum.h"
#define PLANCK_MIT( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
@@ -43,7 +31,7 @@
void matrix_init_user(void);
void matrix_scan_user(void);
-void process_action_user(keyrecord_t *record);
+bool process_action_user(keyrecord_t *record);
void led_set_user(uint8_t usb_led);
void backlight_init_ports(void);