summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/hvp/hvp.c2
-rw-r--r--users/hvp/hvp.h6
-rw-r--r--users/hvp/readme.md1
-rw-r--r--users/hvp/rules.mk4
-rw-r--r--users/hvp/tap_dances.c75
-rw-r--r--users/hvp/tap_dances.h10
6 files changed, 98 insertions, 0 deletions
diff --git a/users/hvp/hvp.c b/users/hvp/hvp.c
new file mode 100644
index 0000000000..7e484535c8
--- /dev/null
+++ b/users/hvp/hvp.c
@@ -0,0 +1,2 @@
+
+#include "hvp.h"
diff --git a/users/hvp/hvp.h b/users/hvp/hvp.h
new file mode 100644
index 0000000000..2b2210f873
--- /dev/null
+++ b/users/hvp/hvp.h
@@ -0,0 +1,6 @@
+#pragma once
+
+#ifdef TAP_DANCE_ENABLE
+# include "tap_dances.h"
+#endif
+#include "quantum.h"
diff --git a/users/hvp/readme.md b/users/hvp/readme.md
new file mode 100644
index 0000000000..2d8f9d8597
--- /dev/null
+++ b/users/hvp/readme.md
@@ -0,0 +1 @@
+Personal user space for hvpcode / cablegore at discord
diff --git a/users/hvp/rules.mk b/users/hvp/rules.mk
new file mode 100644
index 0000000000..0a7e679631
--- /dev/null
+++ b/users/hvp/rules.mk
@@ -0,0 +1,4 @@
+SRC += hvp.c
+ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
+ SRC += tap_dances.c
+endif \ No newline at end of file
diff --git a/users/hvp/tap_dances.c b/users/hvp/tap_dances.c
new file mode 100644
index 0000000000..bb102b30ab
--- /dev/null
+++ b/users/hvp/tap_dances.c
@@ -0,0 +1,75 @@
+#include "tap_dances.h"
+
+// Tap dance function for enable swedish characters on first layer. Unregister to not let tap bleed over to next keypress.
+// Tap dance 1
+void dance_1_finished(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 2) {
+ tap_code(KC_SCLN);
+ } else {
+ register_code(KC_RALT);
+ register_code(KC_O);
+ unregister_code(KC_RALT);
+ unregister_code(KC_O);
+ }
+}
+
+void dance_1_reset(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 2) {
+ unregister_code(KC_SCLN);
+ } else {
+ unregister_code(KC_RALT);
+ unregister_code(KC_O);
+ }
+}
+
+// Tap dance 2
+void dance_2_finished(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 2) {
+ tap_code(KC_QUOT);
+ } else {
+ register_code(KC_RALT);
+ register_code(KC_A);
+ unregister_code(KC_RALT);
+ unregister_code(KC_A);
+ }
+}
+
+void dance_2_reset(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 2) {
+ unregister_code(KC_QUOT);
+ } else {
+ unregister_code(KC_RALT);
+ unregister_code(KC_A);
+ }
+}
+
+// Tap dance 3
+void dance_3_finished(qk_tap_dance_state_t *state, void *user_data) {
+ // if (state->count == 2)
+ if (state->count == 2) {
+ tap_code(KC_SLSH);
+ } else {
+ register_code(KC_RALT);
+ register_code(KC_W);
+ unregister_code(KC_RALT);
+ unregister_code(KC_W);
+ }
+}
+
+void dance_3_reset(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 2) {
+ unregister_code(KC_SLSH);
+ } else {
+ unregister_code(KC_RALT);
+ unregister_code(KC_W);
+ }
+}
+
+// Tap Dance Definitions
+qk_tap_dance_action_t tap_dance_actions[] = {
+ // simple tap dance
+ [TD1] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_1_finished, dance_1_reset),
+
+ [TD2] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_2_finished, dance_2_reset),
+
+ [TD3] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_3_finished, dance_3_reset)}; \ No newline at end of file
diff --git a/users/hvp/tap_dances.h b/users/hvp/tap_dances.h
new file mode 100644
index 0000000000..705985faac
--- /dev/null
+++ b/users/hvp/tap_dances.h
@@ -0,0 +1,10 @@
+#pragma once
+#include "hvp.h"
+
+// Tap Dance Declarations
+enum tapdance_id
+{
+ TD1 = 0,
+ TD2,
+ TD3
+};