diff options
| author | Pavlos Vinieratos <pvinis@gmail.com> | 2019-05-14 21:02:22 +0200 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-05-14 12:02:22 -0700 |
| commit | b68d8fe82eac0be9ca8862fdf94ae4bfbbb0735e (patch) | |
| tree | 788dc925e12ec699f192dcde04096b96abde4da6 /users/pvinis/pvinis.c | |
| parent | 4cdb86c730528c8ca5ff90f5b9b01c395d31fc0e (diff) | |
| download | qmk_firmware-b68d8fe82eac0be9ca8862fdf94ae4bfbbb0735e.tar.gz qmk_firmware-b68d8fe82eac0be9ca8862fdf94ae4bfbbb0735e.zip | |
[Keymap] Pvinis master (#5843)
* trying to make my global keymap
* refactoring the old keymap using userspace
* getting there
* move readme and remove community layout
* use pragma once instead of ifndefs
* just make iris work
* iris decent
* better naming
* add some modifiers on the home row
* use symbol and sysctl layers
* fix up
* a bit faster
* add < and > on symbol layer
* apparently im not using z all that much..
* okok
* fix up stuff
* led init is back
* bring back led indicators
* Update keyboards/ergotravel/keymaps/pvinis/config.h
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* not needed
* not needed
* delete these for now, until I use the userspace code
* remove katamari from here. made a new pr for it
* lower case
* drashna suggestion :)
* move files to correct place
* fix missing command
Diffstat (limited to 'users/pvinis/pvinis.c')
| -rw-r--r-- | users/pvinis/pvinis.c | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/users/pvinis/pvinis.c b/users/pvinis/pvinis.c new file mode 100644 index 000000000..754403579 --- /dev/null +++ b/users/pvinis/pvinis.c | |||
| @@ -0,0 +1,79 @@ | |||
| 1 | #include "pvinis.h" | ||
| 2 | #include "version.h" | ||
| 3 | |||
| 4 | #ifdef AUDIO_ENABLE | ||
| 5 | #include "audio.h" | ||
| 6 | #endif // AUDIO_ENABLE | ||
| 7 | |||
| 8 | |||
| 9 | #ifdef AUDIO_ENABLE | ||
| 10 | // float tone_katamari_rolling_star[][2] = SONG(KATAMARI_ROLLING_STAR); | ||
| 11 | #endif // AUDIO_ENABLE | ||
| 12 | |||
| 13 | |||
| 14 | // SYMBOL + SYSCTL = KBCTL | ||
| 15 | uint32_t layer_state_set_user(uint32_t state) { | ||
| 16 | uint32_t intermediate_state = update_tri_layer_state(state, LR_SYMBOL, LR_SYSCTL, LR_KBCTL); | ||
| 17 | intermediate_state = layer_state_set_user_local(intermediate_state); | ||
| 18 | return intermediate_state; | ||
| 19 | } | ||
| 20 | |||
| 21 | |||
| 22 | // functions for the individual keymaps to implement if they need something extra | ||
| 23 | __attribute__ ((weak)) | ||
| 24 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
| 25 | return true; | ||
| 26 | } | ||
| 27 | |||
| 28 | |||
| 29 | // handle my own keycodes | ||
| 30 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 31 | switch (keycode) { | ||
| 32 | |||
| 33 | case PV_VRSN: | ||
| 34 | if (record->event.pressed) { | ||
| 35 | SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); | ||
| 36 | } | ||
| 37 | return false; | ||
| 38 | |||
| 39 | case PV_MAKE: | ||
| 40 | if (!record->event.pressed) { | ||
| 41 | SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP | ||
| 42 | #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) | ||
| 43 | ":dfu" | ||
| 44 | #elif defined(BOOTLOADER_HALFKAY) | ||
| 45 | ":teensy" | ||
| 46 | #elif defined(BOOTLOADER_CATERINA) | ||
| 47 | ":avrdude" | ||
| 48 | #endif | ||
| 49 | SS_TAP(X_ENTER) | ||
| 50 | ); | ||
| 51 | } | ||
| 52 | return false; | ||
| 53 | |||
| 54 | case PV_FLSH: | ||
| 55 | reset_keyboard(); | ||
| 56 | return false; | ||
| 57 | |||
| 58 | case PV_KTMR: | ||
| 59 | if (record->event.pressed) { | ||
| 60 | #ifdef AUDIO_ENABLE | ||
| 61 | // PLAY_SONG(tone_katamari_rolling_star); | ||
| 62 | #endif | ||
| 63 | } | ||
| 64 | return false; | ||
| 65 | } | ||
| 66 | return process_record_keymap(keycode, record); | ||
| 67 | } | ||
| 68 | |||
| 69 | |||
| 70 | #ifdef TAP_DANCE_ENABLE | ||
| 71 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
| 72 | }; | ||
| 73 | #endif // TAP_DANCE_ENABLE | ||
| 74 | |||
| 75 | |||
| 76 | // init stuff | ||
| 77 | void keyboard_post_init_user(void) { | ||
| 78 | keyboard_post_init_user_local(); | ||
| 79 | } | ||
