summary refs log tree commit diff
path: root/keyboards/handwired/node5_1/keymaps
diff options
context:
space:
mode:
authoruser <user@node5.net>2024-01-02 06:31:20 +0100
committeruser <user@node5.net>2024-01-02 06:31:20 +0100
commitbce31d35a8f66f17ef888dad29129f2094fd33ca (patch)
tree065ab759088f3e892f0d9c02f1d5793725d89b90 /keyboards/handwired/node5_1/keymaps
parent6e93b59f6134753e6167caf425de666999710c6d (diff)
node5_1 initial commit
Diffstat (limited to 'keyboards/handwired/node5_1/keymaps')
-rw-r--r--keyboards/handwired/node5_1/keymaps/default/keymap.c136
1 files changed, 136 insertions, 0 deletions
diff --git a/keyboards/handwired/node5_1/keymaps/default/keymap.c b/keyboards/handwired/node5_1/keymaps/default/keymap.c
new file mode 100644
index 0000000000..95a01965d8
--- /dev/null
+++ b/keyboards/handwired/node5_1/keymaps/default/keymap.c
@@ -0,0 +1,136 @@
+// Copyright 2023 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+// Enable debug console printing
+// https://docusaurus.qmk.fm/faq_debug
+#include "print.h"
+
+/*
+* ┌───┬───┬───┬───┬───┬───┐        ┌───┬───┬───┬───┬───┬───┬───┬───┐
+* │ESC│F1 │F2 │F3 │F4 │F5 │        │F6 │F7 │F8 │F9 │F10│F11│F12│DEL│
+* ├───┼───┼───┼───┼───┼───┤        ├───┼───┼───┼───┼───┼───┼───┼───┤
+* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │        │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │BCK│
+* ├───┼───┼───┼───┼───┼───┤        ├───┼───┼───┼───┼───┼───┼───┼───┤
+* │TAB│ Q │ W │ F │ P │ G │        │ J │ L │ U │ Y │ ; │ [ │ ] │ \ │
+* ├───┼───┼───┼───┼───┼───┤        ├───┼───┼───┼───┼───┼───┼───┴───┤
+* │COM│ A │ R │ S │ T │ D │        │ H │ N │ E │ I │ O │ ' │RETURN │
+* ├───┼───┼───┼───┼───┼───┤        ├───┼───┼───┼───┼───┼───┼───┬───┤
+* │SHI│ Z │ X │ C │ V │ B │        │ K │ M │ , │ . │ / │PGU│ ↑ │PGD│
+* ├───┼───┼───┼───┼───┴───┤    ┌───┼───┼───┼───┼───┼───┼───┼───┼───┤
+* │CTL│SUP│ALT│FN │ SPACE │    │M1 │M3 │M2 │ALT│FN │FN │ ← │ ↓ │ → │
+* └───┴───┴───┴───┴───────┘    └───┴───┴───┴───┴───┴───┴───┴───┴───┘
+*/
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+   [0] = LAYOUT_ortho_split(
+ //|--------+--------+--------+--------+--------+--------|            |--------+--------+--------+--------+--------+--------+--------+--------|
+    KC_ESC,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,                KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,   KC_F11, KC_F12,  KC_DEL,
+ //|--------+--------+--------+--------+--------+--------|            |--------+--------+--------+--------+--------+--------+--------+--------|
+    KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,                 KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_MINS, KC_EQL,  KC_BSPC,
+ //|--------+--------+--------+--------+--------+--------|            |--------+--------+--------+--------+--------+--------+--------+--------|
+    KC_TAB,  KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,                 KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS,
+ //|--------+--------+--------+--------+--------+--------|            |--------+--------+--------+--------+--------+--------+--------+--------|
+    KC_CAPS, KC_A,    KC_R,    KC_S,    KC_T,    KC_D,                 KC_H,    KC_N,    KC_E,    KC_I,    KC_O, KC_QUOT,     KC_ENT,
+ //|--------+--------+--------+--------+--------+--------|            |--------+--------+--------+--------+--------+--------+--------+--------|
+    KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,                 KC_K,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_PGUP, KC_UP,   KC_PGDN,
+ //|--------+--------+--------+--------+--------+--------|   |--------+--------+--------+--------+--------+--------+--------+--------+--------|
+    KC_LCTL, KC_LGUI, KC_LALT, KC_RALT,     KC_SPACE,          KC_BTN1, KC_BTN3, KC_BTN2, KC_APP, KC_HOME, KC_END,  KC_LEFT, KC_DOWN, KC_RGHT
+ //|--------+--------+--------+--------+--------+--------|   |--------+--------+--------+--------+--------+--------+--------+--------+--------|
+   )
+};
+
+/*
+ * ┌───┬───┬───┬───┬───┬───┐        ┌───┬───┬───┬───┬───┬───┬───┬───┐
+ * │ESC│F1 │F2 │F3 │F4 │F5 │        │F6 │F7 │F8 │F9 │F10│F11│F12│DEL│
+ * ├───┼───┼───┼───┼───┼───┤        ├───┼───┼───┼───┼───┼───┼───┼───┤
+ * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │        │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │BCK│
+ * ├───┼───┼───┼───┼───┼───┤        ├───┼───┼───┼───┼───┼───┼───┼───┤
+ * │TAB│ Q │ W │ E │ R │ T │        │ Y │ U │ I │ O │ P │ [ │ ] │ \ │
+ * ├───┼───┼───┼───┼───┼───┤        ├───┼───┼───┼───┼───┼───┼───┴───┤
+ * │COM│ A │ S │ D │ F │ G │        │ H │ J │ K │ L │ ; │ ' │RETURN │
+ * ├───┼───┼───┼───┼───┼───┤        ├───┼───┼───┼───┼───┼───┼───┬───┤
+ * │SHI│ Z │ X │ C │ V │ B │        │ N │ M │ , │ . │ / │PGU│ ↑ │PGD│
+ * ├───┼───┼───┼───┼───┴───┤    ┌───┼───┼───┼───┼───┼───┼───┼───┼───┤
+ * │CTL│SUP│ALT│FN │ SPACE │    │M1 │M3 │M2 │ALT│FN │FN │ ← │ ↓ │ → │
+ * └───┴───┴───┴───┴───────┘    └───┴───┴───┴───┴───┴───┴───┴───┴───┘
+ */
+
+/*
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+    [0] = LAYOUT_ortho_split(
+  //|--------+--------+--------+--------+--------+--------|            |--------+--------+--------+--------+--------+--------+--------+--------|
+     KC_ESC,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,                KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,   KC_F11, KC_F12,  KC_DEL,
+  //|--------+--------+--------+--------+--------+--------|            |--------+--------+--------+--------+--------+--------+--------+--------|
+     KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,                 KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_MINS, KC_EQL,  KC_BSPC,
+  //|--------+--------+--------+--------+--------+--------|            |--------+--------+--------+--------+--------+--------+--------+--------|
+     KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,                 KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_LBRC, KC_RBRC, KC_BSLS,
+  //|--------+--------+--------+--------+--------+--------|            |--------+--------+--------+--------+--------+--------+--------+--------|
+     KC_CAPS, KC_A,    KC_S,    KC_D,    KC_F,    KC_G,                 KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT,     KC_ENT,
+  //|--------+--------+--------+--------+--------+--------|            |--------+--------+--------+--------+--------+--------+--------+--------|
+     KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,                 KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_PGUP, KC_UP,   KC_PGDN,
+  //|--------+--------+--------+--------+--------+--------|   |--------+--------+--------+--------+--------+--------+--------+--------+--------|
+     KC_LCTL, KC_LGUI, KC_LALT, KC_RALT,     KC_SPACE,         KC_BTN1, KC_BTN3, KC_BTN2, KC_APP, KC_HOME, KC_END,  KC_LEFT, KC_DOWN, KC_RGHT
+  //|--------+--------+--------+--------+--------+--------|   |--------+--------+--------+--------+--------+--------+--------+--------+--------|
+
+    )
+};
+*/
+
+void keyboard_post_init_user(void) {
+    // Call the post init code.
+    pimoroni_trackball_set_rgbw(255, 127, 0, 0);
+    pointing_device_set_cpi(30000);
+
+    debug_enable=true;
+}
+
+bool set_scrolling = false;
+
+report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) {
+    if (set_scrolling) {
+        mouse_report.h = mouse_report.x;
+        mouse_report.v = mouse_report.y;
+        mouse_report.x = 0;
+        mouse_report.y = 0;
+    }
+    return mouse_report;
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record)
+{
+    if (keycode == KC_BTN3) {
+        if (record->event.pressed)
+        {
+            set_scrolling = true;
+            pointing_device_set_cpi(8000);
+            pimoroni_trackball_set_rgbw(0, 0, 255, 0);
+        }
+        else
+        {
+            set_scrolling = false;
+            pointing_device_set_cpi(30000);
+            pimoroni_trackball_set_rgbw(255, 127, 0, 0);
+        }
+    }
+    return true;
+}
+
+/*
+uint8_t pointing_device_handle_buttons(uint8_t buttons, bool pressed, pointing_device_buttons_t button)
+{
+    if (pressed) {
+        buttons |= 1 << (button);
+        if (buttons)
+        {
+            dprintf("buttons: %d\npressed: %d\nbutton: %d\n", buttons, pressed, button);
+        }
+    } else {
+        buttons &= ~(1 << (button));
+    }
+
+    return buttons;
+}
+*/
+