summaryrefslogtreecommitdiffstats
path: root/users/pvinis/pvinis.c
diff options
context:
space:
mode:
authorPavlos Vinieratos <pvinis@gmail.com>2019-05-14 21:02:22 +0200
committerDrashna Jaelre <drashna@live.com>2019-05-14 12:02:22 -0700
commitb68d8fe82eac0be9ca8862fdf94ae4bfbbb0735e (patch)
tree788dc925e12ec699f192dcde04096b96abde4da6 /users/pvinis/pvinis.c
parent4cdb86c730528c8ca5ff90f5b9b01c395d31fc0e (diff)
[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.c79
1 files changed, 79 insertions, 0 deletions
diff --git a/users/pvinis/pvinis.c b/users/pvinis/pvinis.c
new file mode 100644
index 0000000000..7544035794
--- /dev/null
+++ b/users/pvinis/pvinis.c
@@ -0,0 +1,79 @@
+#include "pvinis.h"
+#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
+
+
+// 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;
+}
+
+
+// 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;
+}
+
+
+// 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
+#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU))
+ ":dfu"
+#elif defined(BOOTLOADER_HALFKAY)
+ ":teensy"
+#elif defined(BOOTLOADER_CATERINA)
+ ":avrdude"
+#endif
+ SS_TAP(X_ENTER)
+ );
+ }
+ return false;
+
+ case PV_FLSH:
+ reset_keyboard();
+ return false;
+
+ case PV_KTMR:
+ if (record->event.pressed) {
+#ifdef AUDIO_ENABLE
+ // PLAY_SONG(tone_katamari_rolling_star);
+#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
+
+
+// init stuff
+void keyboard_post_init_user(void) {
+ keyboard_post_init_user_local();
+}