summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c221
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.h73
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/config.h67
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/info.json75
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/config.h27
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/keymap.c63
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/config.h28
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/keymap.c197
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/rules.mk2
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.c225
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.h103
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360_firmware.h300
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/pointer_transport.c375
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/post_config.h33
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/readme.md21
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/rules.mk30
-rw-r--r--keyboards/handwired/dactyl_manuform/dactyl_manuform.h2
17 files changed, 1842 insertions, 0 deletions
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c
new file mode 100644
index 0000000000..c40e4173da
--- /dev/null
+++ b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c
@@ -0,0 +1,221 @@
+/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "5x6_right_trackball.h"
+
+#ifndef TRACKBALL_DPI_OPTIONS
+# define TRACKBALL_DPI_OPTIONS { 1200, 1600, 2400 }
+# ifndef TRACKBALL_DPI_DEFAULT
+# define TRACKBALL_DPI_DEFAULT 1
+# endif
+#endif
+#ifndef TRACKBALL_DPI_DEFAULT
+# define TRACKBALL_DPI_DEFAULT 0
+#endif
+
+keyboard_config_t keyboard_config;
+uint16_t dpi_array[] = TRACKBALL_DPI_OPTIONS;
+#define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t))
+
+bool BurstState = false; // init burst state for Trackball module
+uint16_t MotionStart = 0; // Timer for accel, 0 is resting state
+
+__attribute__((weak)) void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) {
+ mouse_report->x = x;
+ mouse_report->y = y;
+}
+
+__attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) {
+ report_pmw_t data = pmw_read_burst();
+ if (data.isOnSurface && data.isMotion) {
+ // Reset timer if stopped moving
+ if (!data.isMotion) {
+ if (MotionStart != 0) MotionStart = 0;
+ return;
+ }
+
+ // Set timer if new motion
+ if ((MotionStart == 0) && data.isMotion) {
+ if (debug_mouse) dprintf("Starting motion.\n");
+ MotionStart = timer_read();
+ }
+
+ if (debug_mouse) {
+ dprintf("Delt] d: %d t: %u\n", abs(data.dx) + abs(data.dy), MotionStart);
+ }
+ if (debug_mouse) {
+ dprintf("Pre ] X: %d, Y: %d\n", data.dx, data.dy);
+ }
+#if defined(PROFILE_LINEAR)
+ float scale = float(timer_elaspsed(MotionStart)) / 1000.0;
+ data.dx *= scale;
+ data.dy *= scale;
+#elif defined(PROFILE_INVERSE)
+ // TODO
+#else
+ // no post processing
+#endif
+
+ // Wrap to HID size
+ data.dx = constrain(data.dx, -127, 127);
+ data.dy = constrain(data.dy, -127, 127);
+ if (debug_mouse) dprintf("Cons] X: %d, Y: %d\n", data.dx, data.dy);
+ // dprintf("Elapsed:%u, X: %f Y: %\n", i, pgm_read_byte(firmware_data+i));
+
+ mouse_report->x = -data.dx;
+ mouse_report->y = data.dy;
+ }
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
+ if (!process_record_user(keycode, record)) { return false; }
+
+#ifdef POINTING_DEVICE_ENABLE
+ if (keycode == DPI_CONFIG && record->event.pressed) {
+ keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE;
+ eeconfig_update_kb(keyboard_config.raw);
+ trackball_set_cpi(dpi_array[keyboard_config.dpi_config]);
+ }
+#endif
+
+/* If Mousekeys is disabled, then use handle the mouse button
+ * keycodes. This makes things simpler, and allows usage of
+ * the keycodes in a consistent manner. But only do this if
+ * Mousekeys is not enable, so it's not handled twice.
+ */
+#ifndef MOUSEKEY_ENABLE
+ if (IS_MOUSEKEY_BUTTON(keycode)) {
+ report_mouse_t currentReport = pointing_device_get_report();
+ if (record->event.pressed) {
+ currentReport.buttons |= 1 << (keycode - KC_MS_BTN1);
+ } else {
+ currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1));
+ }
+ pointing_device_set_report(currentReport);
+ pointing_device_send();
+ }
+#endif
+
+ return true;
+}
+
+// Hardware Setup
+void keyboard_pre_init_kb(void) {
+ // debug_enable = true;
+ // debug_matrix = true;
+ // debug_mouse = true;
+ // debug_encoder = true;
+
+ /* Ground all output pins connected to ground. This provides additional
+ * pathways to ground. If you're messing with this, know this: driving ANY
+ * of these pins high will cause a short. On the MCU. Ka-blooey.
+ */
+
+ // This is the debug LED.
+#if defined(DEBUG_LED_PIN)
+ setPinOutput(DEBUG_LED_PIN);
+ writePin(DEBUG_LED_PIN, debug_enable);
+#endif
+
+ keyboard_pre_init_user();
+}
+
+#ifdef POINTING_DEVICE_ENABLE
+void pointing_device_init(void) {
+ if (!is_keyboard_left()) {
+ // initialize ball sensor
+ pmw_spi_init();
+ }
+ trackball_set_cpi(dpi_array[keyboard_config.dpi_config]);
+}
+
+static bool has_mouse_report_changed(report_mouse_t new, report_mouse_t old) {
+ return (new.buttons != old.buttons) ||
+ (new.x && new.x != old.x) ||
+ (new.y && new.y != old.y) ||
+ (new.h && new.h != old.h) ||
+ (new.v && new.v != old.v);
+}
+
+void pointing_device_task(void) {
+ report_mouse_t mouse_report = pointing_device_get_report();
+ if (!is_keyboard_left()) {
+ process_mouse(&mouse_report);
+ }
+
+ pointing_device_set_report(mouse_report);
+ pointing_device_send();
+}
+#endif
+
+void eeconfig_init_kb(void) {
+ keyboard_config.dpi_config = TRACKBALL_DPI_DEFAULT;
+ trackball_set_cpi(dpi_array[keyboard_config.dpi_config]);
+ eeconfig_update_kb(keyboard_config.raw);
+}
+
+void matrix_init_kb(void) {
+ // is safe to just read DPI setting since matrix init
+ // comes before pointing device init.
+ keyboard_config.raw = eeconfig_read_kb();
+ if (keyboard_config.dpi_config > DPI_OPTION_SIZE) {
+ eeconfig_init_kb();
+ }
+ matrix_init_user();
+}
+
+#ifdef POINTING_DEVICE_ENABLE
+void pointing_device_send(void) {
+ static report_mouse_t old_report = {};
+ report_mouse_t mouseReport = pointing_device_get_report();
+ if (is_keyboard_master()) {
+ int8_t x = mouseReport.x, y = mouseReport.y;
+ mouseReport.x = 0;
+ mouseReport.y = 0;
+ process_mouse_user(&mouseReport, x, y);
+ if (has_mouse_report_changed(mouseReport, old_report)) {
+ host_mouse_send(&mouseReport);
+ }
+ } else {
+ master_mouse_send(mouseReport.x, mouseReport.y);
+ }
+ mouseReport.x = 0;
+ mouseReport.y = 0;
+ mouseReport.v = 0;
+ mouseReport.h = 0;
+ old_report = mouseReport;
+ pointing_device_set_report(mouseReport);
+}
+#endif
+
+#ifdef SWAP_HANDS_ENABLE
+const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+ /* Left hand, matrix positions */
+ {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}},
+ {{5, 7}, {4, 7}, {3, 7}, {2, 7}, {1, 7}, {0, 7}},
+ {{5, 8}, {4, 8}, {3, 8}, {2, 8}, {1, 8}, {0, 8}},
+ {{5, 9}, {4, 9}, {3, 9}, {2, 9}, {1, 9}, {0, 9}},
+ {{5, 10}, {4, 10}, {3, 10}, {2, 10}, {1, 10}, {0, 10}},
+ {{5, 11}, {4, 11}, {3, 11}, {2, 11}, {1, 11}, {0, 11}},
+ /* Right hand, matrix positions */
+ {{5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
+ {{5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
+ {{5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
+ {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
+ {{5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}},
+ {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}
+};
+#endif
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.h b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.h
new file mode 100644
index 0000000000..c8650f73d3
--- /dev/null
+++ b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.h
@@ -0,0 +1,73 @@
+/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "dactyl_manuform.h"
+#include "quantum.h"
+#include "spi_master.h"
+#include "pmw3360.h"
+#include "pointing_device.h"
+
+
+#define ___ KC_NO
+
+#define LAYOUT_5x6_right_trackball(\
+ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
+ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
+ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
+ L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
+ L42, L43, R42, R43, \
+ L44, L45, R41, \
+ L54, L55, R51, \
+ L52, L53, R52, R53 \
+ ) \
+ { \
+ { L00, L01, L02, L03, L04, L05 }, \
+ { L10, L11, L12, L13, L14, L15 }, \
+ { L20, L21, L22, L23, L24, L25 }, \
+ { L30, L31, L32, L33, L34, L35 }, \
+ { ___, ___, L42, L43, L44, L45 }, \
+ { ___, ___, L52, L53, L54, L55 }, \
+ \
+ { R00, R01, R02, R03, R04, R05 }, \
+ { R10, R11, R12, R13, R14, R15 }, \
+ { R20, R21, R22, R23, R24, R25 }, \
+ { R30, R31, R32, R33, R34, R35 }, \
+ { ___, R41, R42, R43, ___, ___ }, \
+ { ___, R51, R52, R53, ___, ___ } \
+}
+
+
+void process_wheel(report_mouse_t* mouse_report);
+void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v);
+
+typedef union {
+ uint32_t raw;
+ struct {
+ uint8_t dpi_config;
+ };
+} keyboard_config_t;
+
+extern keyboard_config_t keyboard_config;
+
+enum ploopy_keycodes {
+ DPI_CONFIG = SAFE_RANGE,
+ KEYMAP_SAFE_RANGE,
+};
+
+void master_mouse_send(int8_t x, int8_t y);
+void trackball_set_cpi(uint16_t cpi);
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/config.h b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/config.h
new file mode 100644
index 0000000000..147f126006
--- /dev/null
+++ b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/config.h
@@ -0,0 +1,67 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+Copyright 2015 Jack Humbert
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+#define PRODUCT_ID 0x3536
+#define DEVICE_VER 0x0001
+#define PRODUCT Tractyl-Manuform (5x6 with right side Trackball)
+
+/* key matrix size */
+// Rows are doubled-up
+#define MATRIX_ROWS 12
+#define MATRIX_COLS 6
+
+// wiring of each half
+#define MATRIX_COL_PINS { C0, C1, C2, C3, C4, C5 }
+#define MATRIX_ROW_PINS { F7, F6, F5, F4, F3, F2 }
+
+#define DIODE_DIRECTION COL2ROW
+
+// WS2812 RGB LED strip input and number of LEDs
+#define RGB_DI_PIN D3
+#define RGBLED_NUM 8
+#define RGBLIGHT_SPLIT
+#define RGBLED_SPLIT { 0 , 8 }
+#define RGBLIGHT_SLEEP
+#define RGBW
+#define RGBLIGHT_LIMIT_VAL 150
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+// #define BACKLIGHT_LEVELS 3
+
+#define DEBUG_LED_PIN D6
+
+#define USB_POLLING_INTERVAL_MS 1
+
+#define ROTATIONAL_TRANSFORM_ANGLE -25
+
+/* Bootmagic Lite key configuration */
+#define BOOTMAGIC_LITE_ROW 0
+#define BOOTMAGIC_LITE_COLUMN 0
+#define BOOTMAGIC_LITE_ROW_RIGHT 6
+#define BOOTMAGIC_LITE_COLUMN_RIGHT 5
+
+#define C6_AUDIO
+
+#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 4095
+#define DYNAMIC_KEYMAP_LAYER_COUNT 16
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/info.json b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/info.json
new file mode 100644
index 0000000000..89f99dc231
--- /dev/null
+++ b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/info.json
@@ -0,0 +1,75 @@
+{
+ "keyboard_name": "Dactyl Manuform 5x6",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 17,
+ "height": 8,
+ "layouts": {
+ "LAYOUT_5x6": {
+ "layout": [
+ {"label":"L00", "x":0, "y":0},
+ {"label":"L01", "x":1, "y":0},
+ {"label":"L02", "x":2, "y":0},
+ {"label":"L03", "x":3, "y":0},
+ {"label":"L04", "x":4, "y":0},
+ {"label":"L05", "x":5, "y":0},
+ {"label":"R00", "x":11, "y":0},
+ {"label":"R01", "x":12, "y":0},
+ {"label":"R02", "x":13, "y":0},
+ {"label":"R03", "x":14, "y":0},
+ {"label":"R04", "x":15, "y":0},
+ {"label":"R05", "x":16, "y":0},
+ {"label":"L10", "x":0, "y":1},
+ {"label":"L11", "x":1, "y":1},
+ {"label":"L12", "x":2, "y":1},
+ {"label":"L13", "x":3, "y":1},
+ {"label":"L14", "x":4, "y":1},
+ {"label":"L15", "x":5, "y":1},
+ {"label":"R10", "x":11, "y":1},
+ {"label":"R11", "x":12, "y":1},
+ {"label":"R12", "x":13, "y":1},
+ {"label":"R13", "x":14, "y":1},
+ {"label":"R14", "x":15, "y":1},
+ {"label":"R15", "x":16, "y":1},
+ {"label":"L20", "x":0, "y":2},
+ {"label":"L21", "x":1, "y":2},
+ {"label":"L22", "x":2, "y":2},
+ {"label":"L23", "x":3, "y":2},
+ {"label":"L24", "x":4, "y":2},
+ {"label":"L25", "x":5, "y":2},
+ {"label":"R20", "x":11, "y":2},
+ {"label":"R21", "x":12, "y":2},
+ {"label":"R22", "x":13, "y":2},
+ {"label":"R23", "x":14, "y":2},
+ {"label":"R24", "x":15, "y":2},
+ {"label":"R25", "x":16, "y":2},
+ {"label":"L30", "x":0, "y":3},
+ {"label":"L31", "x":1, "y":3},
+ {"label":"L32", "x":2, "y":3},
+ {"label":"L33", "x":3, "y":3},
+ {"label":"L34", "x":4, "y":3},
+ {"label":"L35", "x":5, "y":3},
+ {"label":"R30", "x":11, "y":3},
+ {"label":"R31", "x":12, "y":3},
+ {"label":"R32", "x":13, "y":3},
+ {"label":"R33", "x":14, "y":3},
+ {"label":"R34", "x":15, "y":3},
+ {"label":"R35", "x":16, "y":3},
+ {"label":"L42", "x":2, "y":4},
+ {"label":"L43", "x":3, "y":4},
+ {"label":"R42", "x":13, "y":4},
+ {"label":"R43", "x":14, "y":4},
+ {"label":"L44", "x":4, "y":5},
+ {"label":"L45", "x":5, "y":5},
+ {"label":"R41", "x":12, "y":5},
+ {"label":"L54", "x":6, "y":6},
+ {"label":"L55", "x":7, "y":6},
+ {"label":"R51", "x":10, "y":6},
+ {"label":"L52", "x":6, "y":7},
+ {"label":"L53", "x":7, "y":7},
+ {"label":"R52", "x":9, "y":7},
+ {"label":"R53", "x":10, "y":7}
+ ]
+ }
+ }
+}
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/config.h
new file mode 100644
index 0000000000..4e35d4c4fc
--- /dev/null
+++ b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/config.h
@@ -0,0 +1,27 @@
+/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+
+#pragma once
+
+
+#define USE_SERIAL
+
+#define MASTER_LEFT
+// #define MASTER_RIGHT
+//#define EE_HANDS
+// Rows are doubled-up
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/keymap.c
new file mode 100644
index 0000000000..7550b1fd8a
--- /dev/null
+++ b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/keymap.c
@@ -0,0 +1,63 @@
+/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+
+
+#define _QWERTY 0
+#define _LOWER 1
+#define _RAISE 2
+
+#define RAISE MO(_RAISE)
+#define LOWER MO(_LOWER)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_QWERTY] = LAYOUT_5x6_right_trackball(
+ KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,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_MINS,
+ KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT,
+ KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_BSLASH,
+ KC_LBRC,KC_RBRC, KC_EQL,
+ RAISE,KC_SPC, LOWER,
+ KC_TAB,KC_HOME, KC_END, KC_DEL,
+ KC_BSPC, KC_GRV, KC_LGUI, KC_LALT
+ ),
+
+ [_LOWER] = LAYOUT_5x6_right_trackball(
+
+ KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_DEL,
+ _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC, KC_P7 , KC_P8 , KC_P9 ,_______,KC_PLUS,
+ _______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ,KC_LPRN, KC_RPRN, KC_P4 , KC_P5 , KC_P6 ,KC_MINS,KC_PIPE,
+ _______,_______,_______,_______,_______,_______, _______, KC_P1 , KC_P2 , KC_P3 ,KC_EQL ,KC_UNDS,
+ _______,KC_PSCR, KC_P0,
+ _______,_______, _______,
+ _______,_______, _______,_______,
+ _______,_______, _______,_______
+
+ ),
+
+ [_RAISE] = LAYOUT_5x6_right_trackball(
+ KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 ,
+ _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS ,KC_SLCK,KC_MUTE,
+ _______,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU,
+ _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_VOLD,
+ _______,_______, _______,
+ _______,_______, _______,
+ _______,_______, _______,_______,
+ _______,_______, _______,_______
+ ),
+};
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/config.h b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/config.h
new file mode 100644
index 0000000000..78dff38967
--- /dev/null
+++ b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/config.h
@@ -0,0 +1,28 @@
+/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+// #define USE_I2C
+
+#define EE_HANDS
+#define TRACKBALL_DPI_OPTIONS \
+ { 1200, 1800, 2600, 3400 }
+
+#define RGBLIGHT_EFFECT_TWINKLE_LIFE 50
+#define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1/63
+
+#define SOLENOID_PIN F1
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/keymap.c b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/keymap.c
new file mode 100644
index 0000000000..ca9733b6e3
--- /dev/null
+++ b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/keymap.c
@@ -0,0 +1,197 @@
+/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "drashna.h"
+
+#define TG_DBLO TG(_DIABLO)
+#define _MOUSE _MEDIA
+
+
+// clang-format off
+#define LAYOUT_5x6_right_trackball_wrapper(...) LAYOUT_5x6_right_trackball(__VA_ARGS__)
+#define LAYOUT_5x6_right_trackball_base( \
+ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
+ K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
+ K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
+ ) \
+ LAYOUT_5x6_right_trackball_wrapper( \
+ KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \
+ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \
+ LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
+ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
+ OS_LALT, OS_LGUI, TG_GAME, TG_DBLO, \
+ OS_LGUI, KC_GRV, OS_RGUI, \
+ KC_SPC, _______, KC_ENT, \
+ BK_LWER, MO(_MOUSE), MO(_MOUSE), DL_RAIS \
+ )
+#define LAYOUT_5x6_right_trackball_base_wrapper(...) LAYOUT_5x6_right_trackball_base(__VA_ARGS__)
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QWERTY] = LAYOUT_5x6_right_trackball_base_wrapper(
+ _________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
+ _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
+ _________________QWERTY_L3_________________, _________________QWERTY_R3_________________
+ ),
+
+ [_COLEMAK] = LAYOUT_5x6_right_trackball_base_wrapper(
+ _________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
+ _________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
+ _________________COLEMAK_L3________________, _________________COLEMAK_R3________________
+ ),
+
+ [_DVORAK] = LAYOUT_5x6_right_trackball_base_wrapper(
+ _________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
+ _________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
+ _________________DVORAK_L3_________________, _________________DVORAK_R3_________________
+ ),
+
+ [_WORKMAN] = LAYOUT_5x6_right_trackball_base_wrapper(
+ _________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
+ _________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
+ _________________WORKMAN_L3________________, _________________WORKMAN_R3________________
+ ),
+
+ [_NORMAN] = LAYOUT_5x6_right_trackball_base_wrapper(
+ _________________NORMAN_L1_________________, _________________NORMAN_L1_________________,
+ _________________NORMAN_L2_________________, _________________NORMAN_R2_________________,
+ _________________NORMAN_L3_________________, _________________NORMAN_R3_________________
+ ),
+
+ [_MALTRON] = LAYOUT_5x6_right_trackball_base_wrapper(
+ _________________MALTRON_L1________________, _________________MALTRON_R1________________,
+ _________________MALTRON_L2________________, _________________MALTRON_R2________________,
+ _________________MALTRON_L3________________, _________________MALTRON_R3________________
+ ),
+
+ [_EUCALYN] = LAYOUT_5x6_right_trackball_base_wrapper(
+ _________________EUCALYN_L1________________, _________________EUCALYN_R1________________,
+ _________________EUCALYN_L2________________, _________________EUCALYN_R2________________,
+ _________________EUCALYN_L3________________, _________________EUCALYN_R3________________
+ ),
+
+ [_CARPLAX] = LAYOUT_5x6_right_trackball_base_wrapper(
+ _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________,
+ _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________,
+ _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________
+ ),
+
+ [_MOUSE] = LAYOUT_5x6_right_trackball(
+ _______, _______, _______, _______, _______, _______, DPI_CONFIG, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_BTN4, KC_BTN5, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______,
+ _______, _______, _______,
+ _______, _______, _______, _______
+ ),
+ [_GAMEPAD] = LAYOUT_5x6_right_trackball(
+ KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, DPI_CONFIG, _______, _______, _______, _______, _______,
+ KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_WH_U, _______, _______, _______, _______, _______,
+ KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, _______, _______,
+ KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_H, _______, KC_BTN4, KC_BTN5, _______, _______, _______,
+ KC_I, KC_T, TG_GAME, KC_NO,
+ KC_V, KC_O, _______,
+ KC_SPC, KC_P, _______,
+ KC_H, KC_LGUI, _______, _______
+ ),
+ [_DIABLO] = LAYOUT_5x6_right_trackball(
+ KC_ESC, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
+ KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_NO, KC_N, KC_M, KC_NO, KC_NO, KC_NO,
+ KC_F, KC_L, KC_NO, TG_DBLO,
+ SFT_T(KC_SPC), KC_F, _______,
+ ALT_T(KC_Q), KC_J, _______,
+ KC_DIABLO_CLEAR, KC_LGUI, _______, _______
+ ),
+ [_LOWER] = LAYOUT_5x6_right_trackball_wrapper(
+ KC_F12, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, KC_F11,
+ _______, _________________LOWER_L1__________________, _________________LOWER_R1__________________, _______,
+ _______, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE,
+ _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______,
+ _______, _______, _______,
+ _______, _______, _______, _______
+ ),
+ [_RAISE] = LAYOUT_5x6_right_trackball_wrapper(
+ KC_F12, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, KC_F11,
+ KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______,
+ _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS,
+ _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______,
+ _______, _______, _______,
+ _______, _______, _______, _______
+ ),
+ [_ADJUST] = LAYOUT_5x6_right_trackb