Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ccaacde4d6 | ||
|
5836d1a06a | ||
|
fd359e23e8 | ||
|
4aef0318aa |
@@ -34,7 +34,11 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||
OPT_DEFS += -DAUDIO_ENABLE
|
||||
MUSIC_ENABLE := 1
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
|
||||
SRC += $(QUANTUM_DIR)/audio/audio.c
|
||||
ifeq ($(PLATFORM),AVR)
|
||||
SRC += $(QUANTUM_DIR)/audio/audio.c
|
||||
else
|
||||
SRC += $(QUANTUM_DIR)/audio/audio_arm.c
|
||||
endif
|
||||
SRC += $(QUANTUM_DIR)/audio/voices.c
|
||||
SRC += $(QUANTUM_DIR)/audio/luts.c
|
||||
endif
|
||||
|
@@ -3,11 +3,35 @@
|
||||
#define _______ KC_TRNS
|
||||
|
||||
enum keyboard_layers {
|
||||
_BL,
|
||||
_FL,
|
||||
_CL
|
||||
_BL,
|
||||
_FL,
|
||||
_CL
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
S_BSKTC = SAFE_RANGE,
|
||||
S_ODEJY,
|
||||
S_RCKBY,
|
||||
S_DOEDR,
|
||||
S_SCALE,
|
||||
S_ONEUP,
|
||||
S_COIN,
|
||||
S_SONIC,
|
||||
S_ZELDA
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float song_basketcase[][2] = SONG(BASKET_CASE);
|
||||
float song_ode_to_joy[][2] = SONG(ODE_TO_JOY);
|
||||
float song_rock_a_bye_baby[][2] = SONG(ROCK_A_BYE_BABY);
|
||||
float song_doe_a_deer[][2] = SONG(DOE_A_DEER);
|
||||
float song_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
float song_coin[][2] = SONG(COIN_SOUND);
|
||||
float song_one_up[][2] = SONG(ONE_UP_SOUND);
|
||||
float song_sonic_ring[][2] = SONG(SONIC_RING);
|
||||
float song_zelda_puzzle[][2] = SONG(ZELDA_PUZZLE);
|
||||
#endif
|
||||
|
||||
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Layer 0: Default Layer
|
||||
* ,-----------------------------------------------------------.
|
||||
@@ -33,11 +57,71 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
||||
_______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
||||
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, MO(_FL), _______),
|
||||
_______,_______,_______, _______, _______, _______, MO(_FL), _______),
|
||||
[_CL] = KEYMAP(
|
||||
BL_STEP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\
|
||||
BL_STEP,S_BSKTC,S_ODEJY,S_RCKBY,S_DOEDR,S_SCALE,S_ONEUP,S_COIN, S_SONIC,S_ZELDA,_______,_______,_______,_______,_______,\
|
||||
_______, _______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
||||
_______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
||||
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, MO(_FL), _______)
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case S_BSKTC:
|
||||
if (record->event.pressed) {
|
||||
stop_all_notes();
|
||||
PLAY_SONG(song_basketcase);
|
||||
}
|
||||
return false;
|
||||
case S_ODEJY:
|
||||
if (record->event.pressed) {
|
||||
stop_all_notes();
|
||||
PLAY_SONG(song_ode_to_joy);
|
||||
}
|
||||
return false;
|
||||
case S_RCKBY:
|
||||
if (record->event.pressed) {
|
||||
stop_all_notes();
|
||||
PLAY_SONG(song_rock_a_bye_baby);
|
||||
}
|
||||
return false;
|
||||
case S_DOEDR:
|
||||
if (record->event.pressed) {
|
||||
stop_all_notes();
|
||||
PLAY_SONG(song_doe_a_deer);
|
||||
}
|
||||
return false;
|
||||
case S_SCALE:
|
||||
if (record->event.pressed) {
|
||||
stop_all_notes();
|
||||
PLAY_SONG(song_scale);
|
||||
}
|
||||
return false;
|
||||
case S_ONEUP:
|
||||
if (record->event.pressed) {
|
||||
stop_all_notes();
|
||||
PLAY_SONG(song_one_up);
|
||||
}
|
||||
return false;
|
||||
case S_COIN:
|
||||
if (record->event.pressed) {
|
||||
stop_all_notes();
|
||||
PLAY_SONG(song_coin);
|
||||
}
|
||||
return false;
|
||||
case S_SONIC:
|
||||
if (record->event.pressed) {
|
||||
stop_all_notes();
|
||||
PLAY_SONG(song_sonic_ring);
|
||||
}
|
||||
return false;
|
||||
case S_ZELDA:
|
||||
if (record->event.pressed) {
|
||||
stop_all_notes();
|
||||
PLAY_SONG(song_zelda_puzzle);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@
|
||||
void backlight_init_ports(void) {
|
||||
printf("backlight_init_ports()\n");
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPad(GPIOB, 8);
|
||||
#endif
|
||||
}
|
||||
@@ -41,13 +41,8 @@ void backlight_set(uint8_t level) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void led_init_ports() {
|
||||
printf("led_init_ports()\n");
|
||||
palSetPadMode(GPIOB, 7, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
printf("led_init_ports()\n");
|
||||
printf("led_set_kb(%d)\n", usb_led);
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
// Turn capslock on
|
||||
palSetPad(GPIOB, 7);
|
||||
|
@@ -71,10 +71,7 @@ void matrix_init(void) {
|
||||
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
|
||||
memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_row_t));
|
||||
|
||||
/* Setup capslock */
|
||||
// palSetPadMode(GPIOB, 7, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
// palClearPad(GPIOB, 7);
|
||||
|
||||
palClearPad(GPIOB, 7); // Turn off capslock
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
@@ -138,6 +135,7 @@ uint8_t matrix_scan(void) {
|
||||
debouncing_time = timer_read();
|
||||
}
|
||||
}
|
||||
|
||||
if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) {
|
||||
for (int row = 0; row < MATRIX_ROWS; row++) {
|
||||
matrix[row] = 0;
|
||||
|
@@ -50,5 +50,5 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
CUSTOM_MATRIX = yes # Custom matrix file
|
||||
#AUDIO_ENABLE = yes
|
||||
AUDIO_ENABLE = yes
|
||||
# SERIAL_LINK_ENABLE = yes
|
||||
|
@@ -7,7 +7,7 @@
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"KEYMAP": {
|
||||
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0.5, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":14, "y":1, "w":1.5}, {"x":0.75, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":14, "y":2, "w":2.25}, {"x":1.25, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":13, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0.25, "y":4, "w":1.25}, {"x":1.5, "y":4, "w":1.25}, {"x":2.75, "y":4, "w":1.25}, {"x":9, "y":4, "w":6.25}, {"x":10.25, "y":4, "w":1.25}, {"x":11.5, "y":4, "w":1.25}, {"x":12.75, "y":4, "w":1.25}, {"x":14, "y":4, "w":1.25}]
|
||||
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"iso", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":5}, {"x":9, "y":4}, {"x":10, "y":4}, {"label":"Win", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}, {"label":"|", "x":13.75, "y":5}]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -20,4 +20,7 @@
|
||||
#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
|
||||
#define ONESHOT_TAP_TOGGLE 2
|
||||
|
||||
#undef PRODUCT
|
||||
#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine
|
||||
|
||||
#endif
|
||||
|
@@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(_DIABLO),
|
||||
KC_BSPACE, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
OSM(MOD_LSFT), LCTL_T(KC_Z),KC_X, KC_C, KC_V, KC_B, TG(_GAMEPAD),
|
||||
KC_LSFT, LCTL_T(KC_Z),KC_X, KC_C, KC_V, KC_B, TG(_GAMEPAD),
|
||||
LT(_SYMB,KC_GRAVE),KC_QUOTE, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
|
||||
ALT_T(KC_APPLICATION), KC_LGUI,
|
||||
@@ -96,7 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(_DIABLO),
|
||||
KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D,
|
||||
OSM(MOD_LSFT), LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(_GAMEPAD),
|
||||
KC_LSFT, LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(_GAMEPAD),
|
||||
LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_HOME,
|
||||
@@ -139,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(_DIABLO),
|
||||
KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
OSM(MOD_LSFT), LCTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(_GAMEPAD),
|
||||
KC_LSFT, LCTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(_GAMEPAD),
|
||||
LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET, KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LEAD,
|
||||
KC_HOME,
|
||||
@@ -182,7 +182,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, TG(_DIABLO),
|
||||
KC_BSPC, KC_A, KC_S, KC_H, KC_T, KC_G,
|
||||
OSM(MOD_LSFT), LCTL_T(KC_Z), KC_X, KC_M, KC_C, KC_V, TG(_GAMEPAD),
|
||||
KC_LSFT, LCTL_T(KC_Z), KC_X, KC_M, KC_C, KC_V, TG(_GAMEPAD),
|
||||
LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LEAD,
|
||||
KC_HOME,
|
||||
|
@@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* Use I2C or Serial, not both */
|
||||
|
||||
#define USE_SERIAL
|
||||
// #define USE_I2C
|
||||
#undef USE_I2C
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
@@ -71,4 +71,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define STARTUP_SONG SONG(ZELDA_TREASURE)
|
||||
#endif
|
||||
|
||||
#undef PRODUCT
|
||||
#ifdef KEYBOARD_orthodox_rev1
|
||||
#define PRODUCT Drashna Hacked Orthodox Rev.1
|
||||
#elif KEYBOARD_orthodox_rev3
|
||||
#define PRODUCT Drashna Hacked Orthodox Rev.3
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -32,42 +32,30 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
#ifdef FAUXCLICKY_ENABLE
|
||||
float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_A6, 2); // (_D4, 0.25);
|
||||
float fauxclicky_released_note[2] = MUSICAL_NOTE(_A6, 2); // (_C4, 0.125);
|
||||
float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C6, 2); // (_C4, 0.25);
|
||||
#define AUD_ON FC_ON
|
||||
#define AUD_OFF FC_OFF
|
||||
#else
|
||||
#define AUD_ON AU_ON
|
||||
#define AUD_OFF AU_OFF
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = KEYMAP(\
|
||||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||
OSM(MOD_LSFT),CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH), KC_LGUI \
|
||||
KC_LSFT,CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH), KC_LGUI \
|
||||
),
|
||||
|
||||
[_COLEMAK] = KEYMAP(\
|
||||
KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
|
||||
KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
|
||||
OSM(MOD_LSFT), CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_K, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH), KC_LGUI \
|
||||
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_K, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH), KC_LGUI \
|
||||
),
|
||||
|
||||
[_DVORAK] = KEYMAP(\
|
||||
KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
|
||||
KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \
|
||||
OSM(MOD_LSFT), CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_LGUI \
|
||||
KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_LGUI \
|
||||
),
|
||||
[_WORKMAN] = KEYMAP(\
|
||||
KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
|
||||
KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \
|
||||
OSM(MOD_LSFT), CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_LGUI \
|
||||
KC_LSFT,CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_LGUI \
|
||||
),
|
||||
|
||||
[_LOWER] = KEYMAP(\
|
||||
@@ -84,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_ADJUST] = KEYMAP(\
|
||||
KC_MAKE,KC_RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
RGB_SMOD,RGB_HUI, _______, AUD_ON, AUD_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, _______, \
|
||||
RGB_SMOD,RGB_HUI, KC_FXCL, AUD_ON, AUD_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, _______, \
|
||||
KC_RGB_T,RGB_HUD, MU_ON, MU_OFF, MU_TOG, MU_MOD, _______, _______, _______, _______, _______, _______, MAGIC_TOGGLE_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY \
|
||||
)
|
||||
|
||||
|
@@ -1,7 +1,11 @@
|
||||
CONSOLE_ENABLE = no
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
TAP_DANCE_ENABLE = no
|
||||
RGBLIGHT_ENABLE = yes
|
||||
AUDIO_ENABLE = no
|
||||
MOUSEKEY_ENABLE = no
|
||||
AUDIO_ENABLE = yes
|
||||
NKRO_ENABLE = yes
|
||||
FAUXCLICKY_ENABLE = no
|
||||
USE_I2C = no
|
||||
|
@@ -10,7 +10,7 @@
|
||||
"width": 12,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_preonic_mit": {
|
||||
"KEYMAP": {
|
||||
"key_count": 59,
|
||||
"layout": [
|
||||
{ "w": 1, "x": 0, "y": 0 },
|
||||
@@ -138,4 +138,4 @@
|
||||
{ "w": 1, "x": 11, "y": 4 } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -18,7 +18,6 @@
|
||||
#include "ch.h"
|
||||
#include "hal.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "print.h"
|
||||
#include "keymap.h"
|
||||
|
@@ -53,127 +53,127 @@
|
||||
|
||||
// Note Timbre
|
||||
// Changes how the notes sound
|
||||
#define TIMBRE_12 0.125
|
||||
#define TIMBRE_25 0.250
|
||||
#define TIMBRE_50 0.500
|
||||
#define TIMBRE_75 0.750
|
||||
#define TIMBRE_12 0.125f
|
||||
#define TIMBRE_25 0.250f
|
||||
#define TIMBRE_50 0.500f
|
||||
#define TIMBRE_75 0.750f
|
||||
#define TIMBRE_DEFAULT TIMBRE_50
|
||||
|
||||
// Notes - # = Octave
|
||||
|
||||
#define NOTE_REST 0.00
|
||||
#define NOTE_REST 0.00f
|
||||
|
||||
/* These notes are currently bugged
|
||||
#define NOTE_C0 16.35
|
||||
#define NOTE_CS0 17.32
|
||||
#define NOTE_D0 18.35
|
||||
#define NOTE_DS0 19.45
|
||||
#define NOTE_E0 20.60
|
||||
#define NOTE_F0 21.83
|
||||
#define NOTE_FS0 23.12
|
||||
#define NOTE_G0 24.50
|
||||
#define NOTE_GS0 25.96
|
||||
#define NOTE_A0 27.50
|
||||
#define NOTE_AS0 29.14
|
||||
#define NOTE_B0 30.87
|
||||
#define NOTE_C1 32.70
|
||||
#define NOTE_CS1 34.65
|
||||
#define NOTE_D1 36.71
|
||||
#define NOTE_DS1 38.89
|
||||
#define NOTE_E1 41.20
|
||||
#define NOTE_F1 43.65
|
||||
#define NOTE_FS1 46.25
|
||||
#define NOTE_G1 49.00
|
||||
#define NOTE_GS1 51.91
|
||||
#define NOTE_A1 55.00
|
||||
#define NOTE_AS1 58.27
|
||||
#define NOTE_C0 16.35f
|
||||
#define NOTE_CS0 17.32f
|
||||
#define NOTE_D0 18.35f
|
||||
#define NOTE_DS0 19.45f
|
||||
#define NOTE_E0 20.60f
|
||||
#define NOTE_F0 21.83f
|
||||
#define NOTE_FS0 23.12f
|
||||
#define NOTE_G0 24.50f
|
||||
#define NOTE_GS0 25.96f
|
||||
#define NOTE_A0 27.50f
|
||||
#define NOTE_AS0 29.14f
|
||||
#define NOTE_B0 30.87f
|
||||
#define NOTE_C1 32.70f
|
||||
#define NOTE_CS1 34.65f
|
||||
#define NOTE_D1 36.71f
|
||||
#define NOTE_DS1 38.89f
|
||||
#define NOTE_E1 41.20f
|
||||
#define NOTE_F1 43.65f
|
||||
#define NOTE_FS1 46.25f
|
||||
#define NOTE_G1 49.00f
|
||||
#define NOTE_GS1 51.91f
|
||||
#define NOTE_A1 55.00f
|
||||
#define NOTE_AS1 58.27f
|
||||
*/
|
||||
|
||||
#define NOTE_B1 61.74
|
||||
#define NOTE_C2 65.41
|
||||
#define NOTE_CS2 69.30
|
||||
#define NOTE_D2 73.42
|
||||
#define NOTE_DS2 77.78
|
||||
#define NOTE_E2 82.41
|
||||
#define NOTE_F2 87.31
|
||||
#define NOTE_FS2 92.50
|
||||
#define NOTE_G2 98.00
|
||||
#define NOTE_GS2 103.83
|
||||
#define NOTE_A2 110.00
|
||||
#define NOTE_AS2 116.54
|
||||
#define NOTE_B2 123.47
|
||||
#define NOTE_C3 130.81
|
||||
#define NOTE_CS3 138.59
|
||||
#define NOTE_D3 146.83
|
||||
#define NOTE_DS3 155.56
|
||||
#define NOTE_E3 164.81
|
||||
#define NOTE_F3 174.61
|
||||
#define NOTE_FS3 185.00
|
||||
#define NOTE_G3 196.00
|
||||
#define NOTE_GS3 207.65
|
||||
#define NOTE_A3 220.00
|
||||
#define NOTE_AS3 233.08
|
||||
#define NOTE_B3 246.94
|
||||
#define NOTE_C4 261.63
|
||||
#define NOTE_CS4 277.18
|
||||
#define NOTE_D4 293.66
|
||||
#define NOTE_DS4 311.13
|
||||
#define NOTE_E4 329.63
|
||||
#define NOTE_F4 349.23
|
||||
#define NOTE_FS4 369.99
|
||||
#define NOTE_G4 392.00
|
||||
#define NOTE_GS4 415.30
|
||||
#define NOTE_A4 440.00
|
||||
#define NOTE_AS4 466.16
|
||||
#define NOTE_B4 493.88
|
||||
#define NOTE_C5 523.25
|
||||
#define NOTE_CS5 554.37
|
||||
#define NOTE_D5 587.33
|
||||
#define NOTE_DS5 622.25
|
||||
#define NOTE_E5 659.26
|
||||
#define NOTE_F5 698.46
|
||||
#define NOTE_FS5 739.99
|
||||
#define NOTE_G5 783.99
|
||||
#define NOTE_GS5 830.61
|
||||
#define NOTE_A5 880.00
|
||||
#define NOTE_AS5 932.33
|
||||
#define NOTE_B5 987.77
|
||||
#define NOTE_C6 1046.50
|
||||
#define NOTE_CS6 1108.73
|
||||
#define NOTE_D6 1174.66
|
||||
#define NOTE_DS6 1244.51
|
||||
#define NOTE_E6 1318.51
|
||||
#define NOTE_F6 1396.91
|
||||
#define NOTE_FS6 1479.98
|
||||
#define NOTE_G6 1567.98
|
||||
#define NOTE_GS6 1661.22
|
||||
#define NOTE_A6 1760.00
|
||||
#define NOTE_AS6 1864.66
|
||||
#define NOTE_B6 1975.53
|
||||
#define NOTE_C7 2093.00
|
||||
#define NOTE_CS7 2217.46
|
||||
#define NOTE_D7 2349.32
|
||||
#define NOTE_DS7 2489.02
|
||||
#define NOTE_E7 2637.02
|
||||
#define NOTE_F7 2793.83
|
||||
#define NOTE_FS7 2959.96
|
||||
#define NOTE_G7 3135.96
|
||||
#define NOTE_GS7 3322.44
|
||||
#define NOTE_A7 3520.00
|
||||
#define NOTE_AS7 3729.31
|
||||
#define NOTE_B7 3951.07
|
||||
#define NOTE_C8 4186.01
|
||||
#define NOTE_CS8 4434.92
|
||||
#define NOTE_D8 4698.64
|
||||
#define NOTE_DS8 4978.03
|
||||
#define NOTE_E8 5274.04
|
||||
#define NOTE_F8 5587.65
|
||||
#define NOTE_FS8 5919.91
|
||||
#define NOTE_G8 6271.93
|
||||
#define NOTE_GS8 6644.88
|
||||
#define NOTE_A8 7040.00
|
||||
#define NOTE_AS8 7458.62
|
||||
#define NOTE_B8 7902.13
|
||||
#define NOTE_B1 61.74f
|
||||
#define NOTE_C2 65.41f
|
||||
#define NOTE_CS2 69.30f
|
||||
#define NOTE_D2 73.42f
|
||||
#define NOTE_DS2 77.78f
|
||||
#define NOTE_E2 82.41f
|
||||
#define NOTE_F2 87.31f
|
||||
#define NOTE_FS2 92.50f
|
||||
#define NOTE_G2 98.00f
|
||||
#define NOTE_GS2 103.83f
|
||||
#define NOTE_A2 110.00f
|
||||
#define NOTE_AS2 116.54f
|
||||
#define NOTE_B2 123.47f
|
||||
#define NOTE_C3 130.81f
|
||||
#define NOTE_CS3 138.59f
|
||||
#define NOTE_D3 146.83f
|
||||
#define NOTE_DS3 155.56f
|
||||
#define NOTE_E3 164.81f
|
||||
#define NOTE_F3 174.61f
|
||||
#define NOTE_FS3 185.00f
|
||||
#define NOTE_G3 196.00f
|
||||
#define NOTE_GS3 207.65f
|
||||
#define NOTE_A3 220.00f
|
||||
#define NOTE_AS3 233.08f
|
||||
#define NOTE_B3 246.94f
|
||||
#define NOTE_C4 261.63f
|
||||
#define NOTE_CS4 277.18f
|
||||
#define NOTE_D4 293.66f
|
||||
#define NOTE_DS4 311.13f
|
||||
#define NOTE_E4 329.63f
|
||||
#define NOTE_F4 349.23f
|
||||
#define NOTE_FS4 369.99f
|
||||
#define NOTE_G4 392.00f
|
||||
#define NOTE_GS4 415.30f
|
||||
#define NOTE_A4 440.00f
|
||||
#define NOTE_AS4 466.16f
|
||||
#define NOTE_B4 493.88f
|
||||
#define NOTE_C5 523.25f
|
||||
#define NOTE_CS5 554.37f
|
||||
#define NOTE_D5 587.33f
|
||||
#define NOTE_DS5 622.25f
|
||||
#define NOTE_E5 659.26f
|
||||
#define NOTE_F5 698.46f
|
||||
#define NOTE_FS5 739.99f
|
||||
#define NOTE_G5 783.99f
|
||||
#define NOTE_GS5 830.61f
|
||||
#define NOTE_A5 880.00f
|
||||
#define NOTE_AS5 932.33f
|
||||
#define NOTE_B5 987.77f
|
||||
#define NOTE_C6 1046.50f
|
||||
#define NOTE_CS6 1108.73f
|
||||
#define NOTE_D6 1174.66f
|
||||
#define NOTE_DS6 1244.51f
|
||||
#define NOTE_E6 1318.51f
|
||||
#define NOTE_F6 1396.91f
|
||||
#define NOTE_FS6 1479.98f
|
||||
#define NOTE_G6 1567.98f
|
||||
#define NOTE_GS6 1661.22f
|
||||
#define NOTE_A6 1760.00f
|
||||
#define NOTE_AS6 1864.66f
|
||||
#define NOTE_B6 1975.53f
|
||||
#define NOTE_C7 2093.00f
|
||||
#define NOTE_CS7 2217.46f
|
||||
#define NOTE_D7 2349.32f
|
||||
#define NOTE_DS7 2489.02f
|
||||
#define NOTE_E7 2637.02f
|
||||
#define NOTE_F7 2793.83f
|
||||
#define NOTE_FS7 2959.96f
|
||||
#define NOTE_G7 3135.96f
|
||||
#define NOTE_GS7 3322.44f
|
||||
#define NOTE_A7 3520.00f
|
||||
#define NOTE_AS7 3729.31f
|
||||
#define NOTE_B7 3951.07f
|
||||
#define NOTE_C8 4186.01f
|
||||
#define NOTE_CS8 4434.92f
|
||||
#define NOTE_D8 4698.64f
|
||||
#define NOTE_DS8 4978.03f
|
||||
#define NOTE_E8 5274.04f
|
||||
#define NOTE_F8 5587.65f
|
||||
#define NOTE_FS8 5919.91f
|
||||
#define NOTE_G8 6271.93f
|
||||
#define NOTE_GS8 6644.88f
|
||||
#define NOTE_A8 7040.00f
|
||||
#define NOTE_AS8 7458.62f
|
||||
#define NOTE_B8 7902.13f
|
||||
|
||||
// Flat Aliases
|
||||
#define NOTE_DF0 NOTE_CS0
|
||||
|
@@ -53,6 +53,24 @@
|
||||
E__NOTE(_CS4), E__NOTE(_B4), QD_NOTE(_AS4), \
|
||||
E__NOTE(_AS4), E__NOTE(_AS4), QD_NOTE(_B4),
|
||||
|
||||
#define CLUEBOARD_SOUND \
|
||||
HD_NOTE(_C3), HD_NOTE(_D3), HD_NOTE(_E3), HD_NOTE(_F3), HD_NOTE(_G3), HD_NOTE(_A4), HD_NOTE(_B4), HD_NOTE(_C4)
|
||||
/*
|
||||
HD_NOTE(_G3), HD_NOTE(_E3), HD_NOTE(_C3), \
|
||||
Q__NOTE(_E3), Q__NOTE(_C3), Q__NOTE(_G3), \
|
||||
Q__NOTE(_E3)
|
||||
*/
|
||||
/*
|
||||
HD_NOTE(_C3), HD_NOTE(_G3), HD_NOTE(_E3), \
|
||||
Q__NOTE(_G3), Q__NOTE(_E3), Q__NOTE(_G3), \
|
||||
Q__NOTE(_F3)
|
||||
*/
|
||||
|
||||
#define BASKET_CASE \
|
||||
QD_NOTE(_G3), E__NOTE(_F3), E__NOTE(_E3), Q__NOTE(_F3), M__NOTE(_G3, 8+32), Q__NOTE(_REST), \
|
||||
Q__NOTE(_B4), Q__NOTE(_C4), Q__NOTE(_B4), E__NOTE(_A4), Q__NOTE(_G3), M__NOTE(_G3, 8+32), Q__NOTE(_REST), \
|
||||
Q__NOTE(_B4), Q__NOTE(_C4), Q__NOTE(_B4), E__NOTE(_A4), Q__NOTE(_G3), Q__NOTE(_G3), Q__NOTE(_G3), Q__NOTE(_G3), E__NOTE(_A4), E__NOTE(_C4), QD_NOTE(_B4), HD_NOTE(_B4)
|
||||
|
||||
#define STARTUP_SOUND \
|
||||
E__NOTE(_E6), \
|
||||
E__NOTE(_A6), \
|
||||
|
@@ -30,6 +30,15 @@ PROGMEM const char secret[][64] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef FAUXCLICKY_ENABLE
|
||||
float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_A6, 2); // (_D4, 0.25);
|
||||
float fauxclicky_released_note[2] = MUSICAL_NOTE(_A6, 2); // (_C4, 0.125);
|
||||
#else
|
||||
float fauxclicky_pressed[][2] = SONG(E__NOTE(_A6)); // change to your tastes
|
||||
float fauxclicky_released[][2] = SONG(E__NOTE(_A6)); // change to your tastes
|
||||
#endif
|
||||
bool faux_click_enabled = true;
|
||||
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
//define diablo macro timer variables
|
||||
static uint16_t diablo_timer[4];
|
||||
@@ -222,11 +231,22 @@ void persistent_default_layer_set(uint16_t default_layer) {
|
||||
// Defines actions tor my global custom keycodes. Defined in drashna.h file
|
||||
// Then runs the _keymap's recod handier if not processed here
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
|
||||
#ifdef CONSOLE_ENABLE
|
||||
xprintf("KL: row: %u, column: %u, pressed: %u\n", record->event.key.col, record->event.key.row, record->event.pressed);
|
||||
#endif
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
if (faux_click_enabled) {
|
||||
if (record->event.pressed) {
|
||||
PLAY_SONG(fauxclicky_pressed);
|
||||
} else {
|
||||
stop_note(NOTE_A6);
|
||||
PLAY_SONG(fauxclicky_released);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (keycode) {
|
||||
case KC_QWERTY:
|
||||
if (record->event.pressed) {
|
||||
@@ -295,7 +315,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
#if !(defined(KEYBOARD_orthodox_rev1) || defined(KEYBOARD_ergodox_ez))
|
||||
#if !(defined(KEYBOARD_orthodox_rev1) || defined(KEYBOARD_orthodox_rev3) || defined(KEYBOARD_ergodox_ez))
|
||||
case KC_OVERWATCH:
|
||||
if (record->event.pressed) {
|
||||
is_overwatch = !is_overwatch;
|
||||
@@ -460,11 +480,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
" AUDIO_ENABLE=yes"
|
||||
#else
|
||||
" AUDIO_ENABLE=no"
|
||||
#endif
|
||||
#ifdef FAUXCLICKY_ENABLE
|
||||
" FAUXCLICKY_ENABLE=yes"
|
||||
#else
|
||||
" FAUXCLICKY_ENABLE=no"
|
||||
#endif
|
||||
SS_TAP(X_ENTER));
|
||||
}
|
||||
@@ -499,6 +514,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_FXCL:
|
||||
if (!record->event.pressed) {
|
||||
faux_click_enabled = !faux_click_enabled;
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_RGB_T: // Because I want the option to go back to normal RGB mode rather than always layer indication
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
|
@@ -101,6 +101,7 @@ enum userspace_custom_keycodes {
|
||||
KC_SECRET_3,
|
||||
KC_SECRET_4,
|
||||
KC_SECRET_5,
|
||||
KC_FXCL,
|
||||
NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes
|
||||
};
|
||||
|
||||
@@ -133,4 +134,12 @@ enum {
|
||||
|
||||
#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
|
||||
|
||||
#ifdef FAUXCLICKY_ENABLE
|
||||
#define AUD_ON FC_ON
|
||||
#define AUD_OFF FC_OFF
|
||||
#else
|
||||
#define AUD_ON AU_ON
|
||||
#define AUD_OFF AU_OFF
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user