forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* voyager: fix compilation errors * workflow: fix firmware building to work correctly * Calculate and print stack size on AVR builds * workflow: add oryx keymaps * Fix issues due to tests Proof that they're working!
- Loading branch information
Showing
12 changed files
with
405 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,8 @@ | |
"processor": "atmega32u4", | ||
"ws2812": { | ||
"pin": "D7" | ||
}, | ||
"build": { | ||
"lto": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* Copyright 2020 ZSA Technology Labs, Inc <@zsa> | ||
* Copyright 2020 Jack Humbert <[email protected]> | ||
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <[email protected]> | ||
* | ||
* 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/>. | ||
*/ | ||
|
||
|
||
|
||
#include QMK_KEYBOARD_H | ||
#include "version.h" | ||
|
||
enum layers { | ||
BASE, // default layer | ||
SYMB, // symbols | ||
MDIA, // media keys | ||
}; | ||
|
||
enum custom_keycodes { | ||
VRSN = SAFE_RANGE, | ||
}; | ||
|
||
// clang-format off | ||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
[BASE] = LAYOUT( | ||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, | ||
KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, | ||
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HYPR, KC_MEH, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), LGUI_T(KC_QUOT), | ||
KC_LSFT, LCTL_T(KC_Z),KC_X,KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), KC_RSFT, | ||
LT(SYMB,KC_GRV),WEBUSB_PAIR,A(KC_LSFT),KC_LEFT, KC_RGHT, LALT_T(KC_APP), RCTL_T(KC_ESC), KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, MO(SYMB), | ||
KC_SPC, KC_BSPC, KC_LGUI, KC_LALT, KC_TAB, KC_ENT | ||
), | ||
|
||
[SYMB] = LAYOUT( | ||
VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, | ||
_______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, | ||
_______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, _______, _______, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, _______, | ||
_______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, _______, | ||
EE_CLR, _______, _______, _______, _______, RGB_VAI, RGB_TOG, _______, KC_DOT, KC_0, KC_EQL, _______, | ||
RGB_HUD, RGB_VAD, RGB_HUI, TOGGLE_LAYER_COLOR,_______, _______ | ||
), | ||
|
||
[MDIA] = LAYOUT( | ||
LED_LEVEL,_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, | ||
_______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, | ||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, _______, _______, | ||
_______, _______, _______, KC_BTN1, KC_BTN2, _______, _______, KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, | ||
_______, _______, _______, _______, _______, _______ | ||
), | ||
}; | ||
|
||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
if (record->event.pressed) { | ||
switch (keycode) { | ||
case VRSN: | ||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); | ||
return false; | ||
} | ||
} | ||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ORYX_ENABLE = yes | ||
LAYER_LOCK_ENABLE = yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
#include QMK_KEYBOARD_H | ||
#include "version.h" | ||
#define MOON_LED_LEVEL LED_LEVEL | ||
#define ML_SAFE_RANGE SAFE_RANGE | ||
|
||
enum custom_keycodes { | ||
RGB_SLD = ML_SAFE_RANGE, | ||
HSV_0_255_255, | ||
HSV_74_255_255, | ||
HSV_169_255_255, | ||
}; | ||
|
||
|
||
|
||
enum tap_dance_codes { | ||
DANCE_0, | ||
DANCE_1, | ||
}; | ||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
[0] = LAYOUT_voyager( | ||
TD(DANCE_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, | ||
CW_TOGG, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINUS, | ||
MT(MOD_LSFT, KC_BSPC),TD(DANCE_1), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_QUOTE), | ||
KC_LEFT_GUI, MT(MOD_LALT, KC_Z),KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, MT(MOD_RALT, KC_SLASH),KC_RIGHT_CTRL, | ||
LT(1,KC_ENTER), MT(MOD_LCTL, KC_TAB), MT(MOD_LSFT, KC_BSPC),LT(2,KC_SPACE) | ||
), | ||
[1] = LAYOUT_voyager( | ||
KC_ESCAPE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, | ||
KC_GRAVE, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_7, KC_8, KC_9, KC_MINUS, KC_SLASH, KC_F12, | ||
QK_LLCK, KC_TRANSPARENT, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_4, KC_5, KC_6, KC_PLUS, KC_ASTR, KC_BSPC, | ||
KC_TRANSPARENT, KC_TRANSPARENT, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_1, KC_2, KC_3, KC_DOT, KC_EQUAL, KC_ENTER, | ||
KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_0 | ||
), | ||
[2] = LAYOUT_voyager( | ||
RGB_TOG, TOGGLE_LAYER_COLOR,RGB_MODE_FORWARD,RGB_SLD, RGB_VAD, RGB_VAI, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, QK_BOOT, | ||
KC_TRANSPARENT, KC_TRANSPARENT, KC_AUDIO_VOL_DOWN,KC_AUDIO_VOL_UP,KC_AUDIO_MUTE, KC_TRANSPARENT, KC_PAGE_UP, KC_HOME, KC_UP, KC_END, KC_TRANSPARENT, KC_TRANSPARENT, | ||
KC_TRANSPARENT, KC_MEDIA_PREV_TRACK,KC_MEDIA_NEXT_TRACK,KC_MEDIA_STOP, KC_MEDIA_PLAY_PAUSE,KC_TRANSPARENT, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRANSPARENT, KC_TRANSPARENT, | ||
KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, HSV_0_255_255, HSV_74_255_255, HSV_169_255_255, KC_TRANSPARENT, LCTL(LSFT(KC_TAB)),LCTL(KC_TAB), KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, | ||
KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT | ||
), | ||
}; | ||
|
||
|
||
|
||
|
||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
switch (keycode) { | ||
|
||
case RGB_SLD: | ||
if (record->event.pressed) { | ||
rgblight_mode(1); | ||
} | ||
return false; | ||
case HSV_0_255_255: | ||
if (record->event.pressed) { | ||
rgblight_mode(1); | ||
rgblight_sethsv(0,255,255); | ||
} | ||
return false; | ||
case HSV_74_255_255: | ||
if (record->event.pressed) { | ||
rgblight_mode(1); | ||
rgblight_sethsv(74,255,255); | ||
} | ||
return false; | ||
case HSV_169_255_255: | ||
if (record->event.pressed) { | ||
rgblight_mode(1); | ||
rgblight_sethsv(169,255,255); | ||
} | ||
return false; | ||
} | ||
return true; | ||
} | ||
|
||
|
||
typedef struct { | ||
bool is_press_action; | ||
uint8_t step; | ||
} tap; | ||
|
||
enum { | ||
SINGLE_TAP = 1, | ||
SINGLE_HOLD, | ||
DOUBLE_TAP, | ||
DOUBLE_HOLD, | ||
DOUBLE_SINGLE_TAP, | ||
MORE_TAPS | ||
}; | ||
|
||
static tap dance_state[2]; | ||
|
||
uint8_t dance_step(tap_dance_state_t *state); | ||
|
||
uint8_t dance_step(tap_dance_state_t *state) { | ||
if (state->count == 1) { | ||
if (state->interrupted || !state->pressed) return SINGLE_TAP; | ||
else return SINGLE_HOLD; | ||
} else if (state->count == 2) { | ||
if (state->interrupted) return DOUBLE_SINGLE_TAP; | ||
else if (state->pressed) return DOUBLE_HOLD; | ||
else return DOUBLE_TAP; | ||
} | ||
return MORE_TAPS; | ||
} | ||
|
||
|
||
void on_dance_0(tap_dance_state_t *state, void *user_data); | ||
void dance_0_finished(tap_dance_state_t *state, void *user_data); | ||
void dance_0_reset(tap_dance_state_t *state, void *user_data); | ||
|
||
void on_dance_0(tap_dance_state_t *state, void *user_data) { | ||
if(state->count == 3) { | ||
tap_code16(KC_EQUAL); | ||
tap_code16(KC_EQUAL); | ||
tap_code16(KC_EQUAL); | ||
} | ||
if(state->count > 3) { | ||
tap_code16(KC_EQUAL); | ||
} | ||
} | ||
|
||
void dance_0_finished(tap_dance_state_t *state, void *user_data) { | ||
dance_state[0].step = dance_step(state); | ||
switch (dance_state[0].step) { | ||
case SINGLE_TAP: register_code16(KC_EQUAL); break; | ||
case SINGLE_HOLD: register_code16(KC_ESCAPE); break; | ||
case DOUBLE_TAP: register_code16(KC_EQUAL); register_code16(KC_EQUAL); break; | ||
case DOUBLE_SINGLE_TAP: tap_code16(KC_EQUAL); register_code16(KC_EQUAL); | ||
} | ||
} | ||
|
||
void dance_0_reset(tap_dance_state_t *state, void *user_data) { | ||
wait_ms(10); | ||
switch (dance_state[0].step) { | ||
case SINGLE_TAP: unregister_code16(KC_EQUAL); break; | ||
case SINGLE_HOLD: unregister_code16(KC_ESCAPE); break; | ||
case DOUBLE_TAP: unregister_code16(KC_EQUAL); break; | ||
case DOUBLE_SINGLE_TAP: unregister_code16(KC_EQUAL); break; | ||
} | ||
dance_state[0].step = 0; | ||
} | ||
void on_dance_1(tap_dance_state_t *state, void *user_data); | ||
void dance_1_finished(tap_dance_state_t *state, void *user_data); | ||
void dance_1_reset(tap_dance_state_t *state, void *user_data); | ||
|
||
void on_dance_1(tap_dance_state_t *state, void *user_data) { | ||
if(state->count == 3) { | ||
tap_code16(KC_A); | ||
tap_code16(KC_A); | ||
tap_code16(KC_A); | ||
} | ||
if(state->count > 3) { | ||
tap_code16(KC_A); | ||
} | ||
} | ||
|
||
void dance_1_finished(tap_dance_state_t *state, void *user_data) { | ||
dance_state[1].step = dance_step(state); | ||
switch (dance_state[1].step) { | ||
case SINGLE_TAP: register_code16(KC_A); break; | ||
case SINGLE_HOLD: layer_on(1); break; | ||
case DOUBLE_TAP: register_code16(KC_U); break; | ||
case DOUBLE_SINGLE_TAP: tap_code16(KC_A); register_code16(KC_A); | ||
} | ||
} | ||
|
||
void dance_1_reset(tap_dance_state_t *state, void *user_data) { | ||
wait_ms(10); | ||
switch (dance_state[1].step) { | ||
case SINGLE_TAP: unregister_code16(KC_A); break; | ||
case SINGLE_HOLD: | ||
if(!is_layer_locked(1)) { | ||
layer_off(1); | ||
} | ||
break; | ||
case DOUBLE_TAP: unregister_code16(KC_U); break; | ||
case DOUBLE_SINGLE_TAP: unregister_code16(KC_A); break; | ||
} | ||
dance_state[1].step = 0; | ||
} | ||
|
||
tap_dance_action_t tap_dance_actions[] = { | ||
[DANCE_0] = ACTION_TAP_DANCE_FN_ADVANCED(on_dance_0, dance_0_finished, dance_0_reset), | ||
[DANCE_1] = ACTION_TAP_DANCE_FN_ADVANCED(on_dance_1, dance_1_finished, dance_1_reset), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ORYX_ENABLE = yes | ||
TAP_DANCE_ENABLE = yes | ||
LAYER_LOCK_ENABLE = yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters