From f6b40da7f854d461f30a3e525f4e36e51dac5db4 Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Mon, 13 Apr 2020 20:59:04 +0200 Subject: update pvinis keymap (#8746) * update a bunch of stuff Better rules, better config, added encoders, lights, audio. * some fmt * more fmt --- users/pvinis/config.h | 9 +- users/pvinis/pvinis.c | 127 +++++++++++++++------------- users/pvinis/pvinis.h | 228 +++++++++++++++++++++++++++----------------------- users/pvinis/rules.mk | 34 ++++---- 4 files changed, 215 insertions(+), 183 deletions(-) (limited to 'users') diff --git a/users/pvinis/config.h b/users/pvinis/config.h index 8e2efb40a4..14ec0dc8f1 100644 --- a/users/pvinis/config.h +++ b/users/pvinis/config.h @@ -1,10 +1,9 @@ #pragma once -#ifdef AUDIO_ENABLE -// #define STARTUP_SONG SONG(SONIC_RING) -// #define DAC_SAMPLE_MAX 65535U // maybe this works for volume? -#endif - // allow rolling when keys have hold functionality #define IGNORE_MOD_TAP_INTERRUPT // #define TAPPING_TERM 150 + +#if defined(MOUSE_KEYS) +# define MOUSEKEY_WHEEL_TIME_TO_MAX 1 +#endif diff --git a/users/pvinis/pvinis.c b/users/pvinis/pvinis.c index e97edcb98c..31c3023e83 100644 --- a/users/pvinis/pvinis.c +++ b/users/pvinis/pvinis.c @@ -2,88 +2,97 @@ #include "version.h" #ifdef AUDIO_ENABLE -#include "audio.h" -#endif // AUDIO_ENABLE - - -#ifdef AUDIO_ENABLE -// float tone_katamari_rolling_star[][2] = SONG(KATAMARI_ROLLING_STAR); -#endif // AUDIO_ENABLE +# include "audio.h" +float song_sonic_ring[][2] = SONG(SONIC_RING); +float song_coin_sound[][2] = SONG(COIN_SOUND); +float song_test[][2] = SONG(QWERTY_SOUND); +#endif // SYMBOL + SYSCTL = KBCTL uint32_t layer_state_set_user(uint32_t state) { - uint32_t intermediate_state = update_tri_layer_state(state, LR_SYMBOL, LR_SYSCTL, LR_KBCTL); - intermediate_state = layer_state_set_user_local(intermediate_state); - return intermediate_state; + uint32_t intermediate_state = update_tri_layer_state(state, LR_SYMBOL, LR_SYSCTL, LR_KBCTL); + intermediate_state = layer_state_set_user_keymap(intermediate_state); + return intermediate_state; } - // functions for the individual keymaps to implement if they need something extra -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} +__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } - -// handle my own keycodes +// Handle my own keycodes. bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - - case PV_VRSN: - if (record->event.pressed) { - SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - return false; - - case PV_MAKE: - if (!record->event.pressed) { - SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP + switch (keycode) { + case PV_VRSN: + if (record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + + case PV_MAKE: + // make ergodox_ez:pvinis:teensy + if (!record->event.pressed) { + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) - ":dfu" + ":dfu" #elif defined(BOOTLOADER_HALFKAY) - ":teensy" + ":teensy" #elif defined(BOOTLOADER_CATERINA) - ":avrdude" + ":avrdude" #endif - SS_TAP(X_ENTER) - ); - } - return false; + SS_TAP(X_ENTER)); + } + return false; - case PV_FLSH: - reset_keyboard(); - return false; + case PV_FLSH: + reset_keyboard(); + return false; - case PV_KTMR: - if (record->event.pressed) { + case PV_SSNC: + if (record->event.pressed) { #ifdef AUDIO_ENABLE - // PLAY_SONG(tone_katamari_rolling_star); + PLAY_SONG(song_sonic_ring); #endif - } - return false; - } - return process_record_keymap(keycode, record); -} + } + return false; + case PV_SCIN: + if (record->event.pressed) { +#ifdef AUDIO_ENABLE + PLAY_SONG(song_coin_sound); +#endif + } + return false; + + case PV_TEST: + if (record->event.pressed) { +#ifdef AUDIO_ENABLE + PLAY_SONG(song_test); +#endif + } + return false; + } + return process_record_keymap(keycode, record); +} #ifdef TAP_DANCE_ENABLE -qk_tap_dance_action_t tap_dance_actions[] = { -}; -#endif // TAP_DANCE_ENABLE +qk_tap_dance_action_t tap_dance_actions[] = {}; +#endif +void keyboard_post_init_rgb_light(void) { + rgblight_sethsv(HSV_GOLD); + rgblight_mode(RGBLIGHT_MODE_BREATHING); + // rgblight_mode(RGBLIGHT_MODE_KNIGHT+1); +} -// init stuff +// Init stuff. void keyboard_post_init_user(void) { - keyboard_post_init_user_local(); +#if defined(RGBLIGHT_ENABLE) + keyboard_post_init_rgb_light(); +#endif + keyboard_post_init_user_keymap(); } +// Default functions. +__attribute__((weak)) void keyboard_post_init_user_keymap(void) {} -// default functions -__attribute__ ((weak)) -void keyboard_post_init_user_local(void) {} - -__attribute__ ((weak)) -uint32_t layer_state_set_user_local(uint32_t state) { - return state; -} +__attribute__((weak)) uint32_t layer_state_set_user_keymap(uint32_t state) { return state; } diff --git a/users/pvinis/pvinis.h b/users/pvinis/pvinis.h index 0c75c6a661..c50033a440 100644 --- a/users/pvinis/pvinis.h +++ b/users/pvinis/pvinis.h @@ -2,84 +2,103 @@ #include "quantum.h" - -// my own keycodes +// My own keycodes. enum userspace_custom_keycodes { - PV_ = SAFE_RANGE, + PV_ = SAFE_RANGE, + + PV_VRSN, // Print firmware version. + PV_MAKE, // Print the make command of the keyboard. + PV_FLSH, // Reset keyboard. - PV_VRSN, // prints firmware version - PV_MAKE, // prints the make command of the keyboard - PV_FLSH, // resets keyboard - PV_KTMR, // play katamari music + PV_SSNC, // Play Sonic Ring. + PV_SCIN, // Play Coin Sound. - PV_SAFE_RANGE, // used for extra keycodes in the individual keymaps + PV_TEST, // For quick testing purposes. + + PV_SAFE_RANGE, // Used for extra keycodes in individual keymaps. }; enum tap_dance_indexes { - // tap dance - TD_FLSH, // flash keyboard (as if the physical flash key was pressed) + // tap dance + TD_FLSH, // flash keyboard (as if the physical flash key was pressed) }; -#define ALLM(kc) LCAG(kc) // easier name for left ctrl-alt-gui -#define PV_ESCC CTL_T(KC_ESC) // esc on tap, ctrl on hold -#define PV_LOCK LCTL(LSFT(KC_PWR)) // lock computer -#define TD_3FLS TD(TD_FLSH) // tap dance 3 times for flash - +#define ALLM(kc) LCAG(kc) // Easier name for left ctrl-alt-gui. +#define PV_ESCC CTL_T(KC_ESC) // esc on tap, ctrl on hold. +#define PV_LOCK LCTL(LSFT(KC_PWR)) // Lock computer. +#define TD_3FLS TD(TD_FLSH) // Tap dance 3 times for flash. -// layers +// Layers. enum { - LR_BASE = 0, // used for basic keys like the surrounding ctrl, cmd, etc + LR_BASE = 0, // used for basic keys like the surrounding ctrl, cmd, etc - LR_QWERTY, - LR_CARPALX, + LR_QWERTY, + LR_CARPALX, + LR_GAME1, // game layout (space on the left thumb, no modifiers, etc) + LR_GAME2, // game layout (space on the left thumb, no modifiers, etc, arrows) - LR_SYMBOL, // symbol input (!, @, #, etc) - LR_SYSCTL, // system control (music, volume, keyboard flash, etc) - LR_KBCTL, // keyboard control (version, make, flash, etc) -}; + LR_SYMBOL, // symbol input (!, @, #, etc) + LR_SYSCTL, // system control (music, volume, keyboard flash, etc) + LR_KBCTL, // keyboard control (version, make, flash, etc) +}; -// layer switchers -#define BASE TO(LR_BASE) -#define QWERTY TO(LR_QWERTY) +// Layer switchers. +#define BASE TO(LR_BASE) +#define QWERTY TO(LR_QWERTY) #define CARPALX TO(LR_CARPALX) - -#define SYMBOL MO(LR_SYMBOL) -#define SYSCTL MO(LR_SYSCTL) -#define KBCTL MO(LR_KBCTL) - - -// layout parts for easy reuse between keyboard keymaps - -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define ________________NUMBERS_L__________________ KC_1, KC_2, KC_3, KC_4, KC_5 -#define ________________NUMBERS_R__________________ KC_6, KC_7, KC_8, KC_9, KC_0 - -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define ______________________F_L__________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 -#define ______________________F_R__________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 - -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// | Q | W | E | R | T | | Y | U | I | O | P | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | A | S | D | F | G | | H | J | K | L | ; | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | Z | X | C | V | B | | N | M | , | . | / | -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define _________________QWERTY_L1_________________ KC_Q , KC_W , KC_E , KC_R , KC_T -#define _________________QWERTY_L2_________________ KC_A , KC_S , KC_D , KC_F , KC_G -#define _________________QWERTY_L3_________________ KC_Z , KC_X , KC_C , KC_V , KC_B - -#define _________________QWERTY_R1_________________ KC_Y , KC_U , KC_I , KC_O , KC_P -#define _________________QWERTY_R2_________________ KC_H , KC_J , KC_K , KC_L , KC_SCLN -#define _________________QWERTY_R3_________________ KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH - -#define _____________MOD_QWERTY_L2_________________ CTL_T(KC_A), SFT_T(KC_S), GUI_T(KC_D), ALT_T(KC_F), KC_G -#define _____________MOD_QWERTY_R2_________________ KC_H , ALT_T(KC_J), GUI_T(KC_K), SFT_T(KC_L), CTL_T(KC_SCLN) +#define GAME1 TO(LR_GAME1) +#define GAME2 TO(LR_GAME2) + +#define SYMBOL MO(LR_SYMBOL) +#define SYSCTL MO(LR_SYSCTL) +#define KBCTL MO(LR_KBCTL) + +// Layout parts for easy reuse between keyboard keymaps. + +// Transparent. +// ┌─────┬─────┬─────┬─────┬─────┐ +// │ │ │ │ │ │ +// └─────┴─────┴─────┴─────┴─────┘ +#define ___________________________________________ _______, _______, _______, _______, _______ + +// Numbers. +// ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ +// │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ +// └─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┘ +#define ________________NUMBERS_L__________________ KC_1, KC_2, KC_3, KC_4, KC_5 +#define ________________NUMBERS_R__________________ KC_6, KC_7, KC_8, KC_9, KC_0 + +// F keys. +// ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ +// │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ F7 │ F8 │ F9 │ F10 │ +// └─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┘ +#define ______________________F_L__________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define ______________________F_R__________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 + +// QWERTY. +// ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ +// │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ +// ├─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┤ +// │ A │ S │ D ┃ F ┃ G │ │ H ┃ J ┃ K │ L │ ; │ +// ├─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┤ +// │ Z │ X │ C │ V │ B │ │ N │ M │ , │ . │ / │ +// └─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┘ +#define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T +#define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G +#define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B + +#define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P +#define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN +#define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH + +// QWERTY with mods. +// ┌───────┬───────┬───────┲━━━━━━━┱───────┐ ┌───────┲━━━━━━━┱───────┬───────┬───────┐ +// │ ctl/A │ sft/S │ cmd/D ┃ opt/F ┃ G │ │ H ┃ opt/J ┃ cmd/K │ sft/L │ ctl/; │ +// └───────┴───────┴───────┺━━━━━━━┹───────┘ └───────┺━━━━━━━┹───────┴───────┴───────┘ +// #define _____________MOD_QWERTY_L2_________________ CTL_T(KC_A), SFT_T(KC_S), GUI_T(KC_D), ALT_T(KC_F), KC_G +#define _____________MOD_QWERTY_L2_________________ KC_A, KC_S, KC_D, ALT_T(KC_F), KC_G +#define _____________MOD_QWERTY_R2_________________ KC_H, ALT_T(KC_J), GUI_T(KC_K), SFT_T(KC_L), CTL_T(KC_SCLN) // ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, // | Q | G | M | L | W | | Y | F | I | O | P | @@ -88,13 +107,13 @@ enum { // ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, // | Z | X | C | V | J | | K | P | , | . | / | // ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define ________________CARPALX_L1_________________ KC_Q , KC_G , KC_M , KC_L , KC_W -#define ________________CARPALX_L2_________________ KC_D , KC_S , KC_T , KC_N , KC_R -#define ________________CARPALX_L3_________________ KC_Z , KC_X , KC_C , KC_V , KC_J +#define ________________CARPALX_L1_________________ KC_Q, KC_G, KC_M, KC_L, KC_W +#define ________________CARPALX_L2_________________ KC_D, KC_S, KC_T, KC_N, KC_R +#define ________________CARPALX_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_J -#define ________________CARPALX_R1_________________ KC_Y , KC_F , KC_U , KC_B , KC_SCLN -#define ________________CARPALX_R2_________________ KC_I , KC_A , KC_E , KC_O , KC_H -#define ________________CARPALX_R3_________________ KC_K , KC_P , KC_COMM, KC_DOT , KC_SLSH +#define ________________CARPALX_R1_________________ KC_Y, KC_F, KC_U, KC_B, KC_SCLN +#define ________________CARPALX_R2_________________ KC_I, KC_A, KC_E, KC_O, KC_H +#define ________________CARPALX_R3_________________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH // ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, // | ! | @ | { | } | _ | | \ | | ` | | | @@ -103,50 +122,51 @@ enum { // ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, // | % | ^ | [ | ] | + | | * | ~ | < | > | / | // ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define _________________SYMBOL_L1_________________ KC_EXLM, KC_AT , KC_LCBR, KC_RCBR, KC_UNDS -#define _________________SYMBOL_L2_________________ KC_HASH, KC_DLR , KC_LPRN, KC_RPRN, KC_MINS -#define _________________SYMBOL_L3_________________ KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_PLUS - -#define _________________SYMBOL_R1_________________ KC_BSLS, _______, KC_GRV , _______, _______ -#define _________________SYMBOL_R2_________________ KC_EQL , KC_AMPR, KC_QUOT, KC_DQUO, KC_PIPE -#define _________________SYMBOL_R3_________________ KC_ASTR, KC_TILD, KC_LABK, KC_RABK, KC_SLSH - -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// | | | | | | |MUTE |HOME | ^ | END | | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | | | | | | |VOLUP| < | v | > | | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | | | | | | |VOLDN|MPREV|MPLAY|MNEXT| | -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define _________________SYSCTL_L1_________________ -#define _________________SYSCTL_L2_________________ -#define _________________SYSCTL_L3_________________ +#define _________________SYMBOL_L1_________________ KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_UNDS +#define _________________SYMBOL_L2_________________ KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_MINS +#define _________________SYMBOL_L3_________________ KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_PLUS + +#define _________________SYMBOL_R1_________________ KC_BSLS, _______, KC_GRV, _______, _______ +#define _________________SYMBOL_R2_________________ KC_EQL, KC_AMPR, KC_QUOT, KC_DQUO, KC_PIPE +#define _________________SYMBOL_R3_________________ KC_ASTR, KC_TILD, KC_LABK, KC_RABK, KC_SLSH + +// System Control. +// vol ↓ ctl ↓ +// ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ +// │ │ │ │ │ │ │MUTE │HOME │ ↑ │ END │LOCK │ +// ├─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┤ +// │ │ │ ┃ ┃ │ │VOLUP┃ ← ┃ ↓ │ → │SLEEP│ ← arrows +// ├─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┤ +// │ │ │ │ │ │ │VOLDN│MPREV│MPLAY│MNEXT│ PWR │ ← music +// └─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┘ +#define _________________SYSCTL_L1_________________ XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_BTN1, XXXXXXX +#define _________________SYSCTL_L2_________________ XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_RIGHT, KC_MS_WH_UP +#define _________________SYSCTL_L3_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_WH_DOWN // vol v ctl v -#define _________________SYSCTL_R1_________________ KC_MUTE , KC_HOME , KC_UP , KC_END , PV_LOCK -#define _________________SYSCTL_R2_________________ KC_VOLU , KC_LEFT , KC_DOWN , KC_RGHT /* < arrows */ , KC_SLEP -#define _________________SYSCTL_R3_________________ KC_VOLD , KC_MPRV , KC_MPLY , KC_MNXT /* < music */ , KC_PWR +#define _________________SYSCTL_R1_________________ KC_MUTE, KC_HOME, KC_UP, KC_END, PV_LOCK +#define _________________SYSCTL_R2_________________ KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT /* < arrows */, KC_SLEP +#define _________________SYSCTL_R3_________________ KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT /* < music */, KC_PWR // ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| +// |GAME |CRPLX|XXXXX|XXXXX|XXXXX| |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| // ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, // |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| |XXXXX|VERSN|MAKE |FLASH|XXXXX| // ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, // |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| // ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define __________________KBCTL_L1_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -#define __________________KBCTL_L2_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -#define __________________KBCTL_L3_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX - -#define __________________KBCTL_R1_________________ XXXXXXX, XXXXXXX, XXXXXXX, PV_KTMR, XXXXXXX -#define __________________KBCTL_R2_________________ XXXXXXX, PV_VRSN, PV_MAKE, PV_FLSH, XXXXXXX -#define __________________KBCTL_R3_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#define __________________KBCTL_L1_________________ PV_SSNC, PV_SCIN, PV_TEST, XXXXXXX, XXXXXXX +#define __________________KBCTL_L2_________________ RGB_TOG, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX +#define __________________KBCTL_L3_________________ RGB_MOD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX -// we need wrappers in order for these definitions, because they need to be expanded before being used as arguments to the LAYOUT_xxx macro -#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) -#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) +#define __________________KBCTL_R1_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#define __________________KBCTL_R2_________________ XXXXXXX, PV_VRSN, PV_MAKE, PV_FLSH, XXXXXXX +#define __________________KBCTL_R3_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +// We need wrappers in order for these definitions, because they need to be expanded before being used as arguments to the LAYOUT_xxx macro. +#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) -// extra stuff that might be needed -void keyboard_post_init_user_local(void); -uint32_t layer_state_set_user_local(uint32_t state); +// Extra stuff that might be needed. +void keyboard_post_init_user_keymap(void); +uint32_t layer_state_set_user_keymap(uint32_t state); diff --git a/users/pvinis/rules.mk b/users/pvinis/rules.mk index da10cc7437..f6f09e54d9 100644 --- a/users/pvinis/rules.mk +++ b/users/pvinis/rules.mk @@ -1,15 +1,19 @@ -# add userspace file -SRC += pvinis.c - -AUDIO_ENABLE = no # piezo speaker sounds -RGBLIGHT_ENABLE = no # rgb leds underlight -TAP_DANCE_ENABLE = yes -BACKLIGHT_ENABLE = no # leds under keycaps -#MOUSEKEY_ENABLE = no -#SLEEP_LED_ENABLE = no # no led blinking while sleeping -#NKRO_ENABLE = yes - -# make firmware smaller -LINK_TIME_OPTIMIZATION_ENABLE = yes -CONSOLE_ENABLE = no -COMMAND_ENABLE = no +SRC += pvinis.c # add userspace file + + +## Use the stuff below on the keyboard keymaps, not here. +## If they are used here, they will replace the keymap's rules, since this file is eval'd later. + +# TAP_DANCE_ENABLE = yes +# AUDIO_ENABLE = yes # piezo speaker sounds +# RGBLIGHT_ENABLE = yes # rgb leds underlight +# BACKLIGHT_ENABLE = no # leds under keycaps +# MOUSEKEY_ENABLE = yes +# LEEP_LED_ENABLE = no # no led blinking while sleeping +# KRO_ENABLE = yes + +## Some extra stuff to make firmware smaller. + +# LINK_TIME_OPTIMIZATION_ENABLE = yes +# CONSOLE_ENABLE = no +# COMMAND_ENABLE = no -- cgit v1.2.3