diff --git a/keyboards/jasonhazel/bad_wings/config.h b/keyboards/jasonhazel/bad_wings/config.h index 371c7dff8a..37a371713f 100644 --- a/keyboards/jasonhazel/bad_wings/config.h +++ b/keyboards/jasonhazel/bad_wings/config.h @@ -25,8 +25,16 @@ #define MATRIX_ROW_PINS_SR { GP26, GP27, GP28, GP29, GP6 } -#define POINTING_DEVICE_CS_PIN GP1 #define BOOTMAGIC_LITE_ROW 0 #define BOOTMAGIC_LITE_COLUMN 0 +#ifdef TRACKPAD_ENABLED + #define POINTING_DEVICE_CS_PIN GP1 + + #define POINTING_DEVICE_ROTATION_90 + + #ifndef CIRQUE_PINNACLE_DIAMETER_MM + #define CIRQUE_PINNACLE_DIAMETER_MM 35 + #endif +#endif \ No newline at end of file diff --git a/keyboards/jasonhazel/bad_wings/keymaps/default/config.h b/keyboards/jasonhazel/bad_wings/keymaps/default/config.h index d8c34b8691..e6753b74a2 100644 --- a/keyboards/jasonhazel/bad_wings/keymaps/default/config.h +++ b/keyboards/jasonhazel/bad_wings/keymaps/default/config.h @@ -20,8 +20,8 @@ #undef LOCKING_SUPPORT_ENABLE #undef LOCKING_RESYNC_ENABLE -#define POINTING_DEVICE_ROTATION_90 -#define CIRQUE_PINNACLE_DIAMETER_MM 35 -#define CIRQUE_PINNACLE_TAP_ENABLE -#define CIRQUE_PINNACLE_POSITION_MODE CIRQUE_PINNACLE_ABSOLUTE_MODE -#define CIRQUE_DEVICE_GESTURES_SCROLL_ENABLE +#ifdef TRACKPAD_ENABLED + #define CIRQUE_PINNACLE_TAP_ENABLE + #define CIRQUE_PINNACLE_POSITION_MODE CIRQUE_PINNACLE_ABSOLUTE_MODE + #define CIRQUE_DEVICE_GESTURES_SCROLL_ENABLE +#endif \ No newline at end of file diff --git a/keyboards/jasonhazel/bad_wings/keymaps/default/rules.mk b/keyboards/jasonhazel/bad_wings/keymaps/default/rules.mk index 43fb4527f8..56390c908b 100644 --- a/keyboards/jasonhazel/bad_wings/keymaps/default/rules.mk +++ b/keyboards/jasonhazel/bad_wings/keymaps/default/rules.mk @@ -1,9 +1,11 @@ +# Bad Wings Specific +TRACKPAD_ENABLE = yes + +# General QMK GRAVE_ESC_ENABLE = no SPACE_CADET_ENABLE = no CAPS_WORD_ENABLE = yes KEY_OVERRIDE_ENABLE = yes COMBO_ENABLE = yes -TAP_DANCE_ENABLE = yes - -POINTING_DEVICE_ENABLE = yes \ No newline at end of file +TAP_DANCE_ENABLE = yes \ No newline at end of file diff --git a/keyboards/jasonhazel/bad_wings/rules.mk b/keyboards/jasonhazel/bad_wings/rules.mk index cece6346be..ec8c04e957 100644 --- a/keyboards/jasonhazel/bad_wings/rules.mk +++ b/keyboards/jasonhazel/bad_wings/rules.mk @@ -1,7 +1,7 @@ MCU = RP2040 BOOTLOADER = rp2040 -POINTING_DEVICE_DRIVER = cirque_pinnacle_spi + # LTO_ENABLE = yes CONSOLE_ENABLE = no @@ -21,4 +21,10 @@ DEFERRED_EXEC_ENABLE = yes SRC += matrix.c QUANTUM_LIB_SRC += spi_master.c -CUSTOM_MATRIX = lite \ No newline at end of file +CUSTOM_MATRIX = lite + +ifeq ($(strip $(TRACKPAD_ENABLE)), yes) + POINTING_DEVICE_DRIVER = cirque_pinnacle_spi + POINTING_DEVICE_ENABLE = yes + OPT_DEFTS += -DTRACKPAD_ENABLED +endif \ No newline at end of file diff --git a/keyboards/jasonhazel/dust/config.h b/keyboards/jasonhazel/dust/config.h new file mode 100644 index 0000000000..bf059d4672 --- /dev/null +++ b/keyboards/jasonhazel/dust/config.h @@ -0,0 +1,29 @@ +#pragma once + +#include "config_common.h" + +#define DEVICE_VER 0x0001 +#define VENDOR_ID 0x4A48 // JH +#define PRODUCT_ID 0x6474 // dt + +#define MANUFACTURER jasonhazel +#define PRODUCT dust + +#define MATRIX_COLS 5 +#define MATRIX_ROWS 8 + + +#define DIODE_DIRECTION COL2ROW +#define MATRIX_ROW_PINS { GP3, GP4, GP2, GP1 } +#define MATRIX_COL_PINS { GP26, GP27, GP28, GP29, GP6 } + +#define SOFT_SERIAL_PIN GP0 +#define USE_SERIAL +#define SELECT_SOFT_SERIAL_SPEED 0 + +#define EE_HANDS + +#define BOOTMAGIC_LITE_ROW 3 +#define BOOTMAGIC_LITE_COLUMN 0 +#define BOOTMAGIC_LITE_ROW_RIGHT 3 +#define BOOTMAGIC_LITE_COLUMN_RIGHT 4 \ No newline at end of file diff --git a/keyboards/jasonhazel/dust/dust.c b/keyboards/jasonhazel/dust/dust.c new file mode 100644 index 0000000000..6d283cf668 --- /dev/null +++ b/keyboards/jasonhazel/dust/dust.c @@ -0,0 +1 @@ +#include "dust.h" \ No newline at end of file diff --git a/keyboards/jasonhazel/dust/dust.h b/keyboards/jasonhazel/dust/dust.h new file mode 100644 index 0000000000..75ab52b23f --- /dev/null +++ b/keyboards/jasonhazel/dust/dust.h @@ -0,0 +1,22 @@ +#pragma once +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT_3x5_2( \ + L00, L01, L02, L03, L04, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, R24, R23, R22, R21, R20, \ + L33, L34, R34, R33 \ +) { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { ___, ___, ___, L33, L34 }, \ + { R00, R01, R02, R03, R04 }, \ + { R10, R11, R12, R13, R14 }, \ + { R20, R21, R22, R23, R24 }, \ + { ___, ___, ___, R33, R34 }, \ +} + +#define LAYOUT LAYOUT_3x5_2 \ No newline at end of file diff --git a/keyboards/jasonhazel/dust/halconf.h b/keyboards/jasonhazel/dust/halconf.h new file mode 100644 index 0000000000..946a881623 --- /dev/null +++ b/keyboards/jasonhazel/dust/halconf.h @@ -0,0 +1,11 @@ +#pragma once + +#define HAL_USE_SERIAL FALSE +#define HAL_USE_SPI TRUE +#define HAL_USE_I2C TRUE + +#define HAL_USE_PWM TRUE +#define SPI_USE_WAIT TRUE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD + +#include_next "halconf.h" \ No newline at end of file diff --git a/keyboards/jasonhazel/dust/keymaps/default/config.h b/keyboards/jasonhazel/dust/keymaps/default/config.h new file mode 100644 index 0000000000..6e6ee5f494 --- /dev/null +++ b/keyboards/jasonhazel/dust/keymaps/default/config.h @@ -0,0 +1,21 @@ +#pragma once +#include "config_common.h" + +#define TAPPING_TERM 200 +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM_PER_KEY + +#define ONESHOT_TAP_TOGGLE 10 +#define ONESHOT_TIMEOUT 500 +#define COMBO_TERM 100 +#define COMBO_TERM_PER_COMBO + +#define DOUBLE_TAP_SHIFT_TURNS_ON_CAPS_WORD + +// disable shit +#define NO_MUSIC_MODE + +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE diff --git a/keyboards/jasonhazel/dust/keymaps/default/keymap.c b/keyboards/jasonhazel/dust/keymaps/default/keymap.c new file mode 100644 index 0000000000..b0bed0c44a --- /dev/null +++ b/keyboards/jasonhazel/dust/keymaps/default/keymap.c @@ -0,0 +1,115 @@ +#include QMK_KEYBOARD_H + +enum layers { + _ALPHA, + _SYMBOL, + _NUMBER, + _NAVIGATION, + LAYER_LENGTH +}; + + +enum tapdances { + TD_QESC, + TD_SBKT, + TD_CBKT, + TD_PARN, + TD_LTGT, + TD_ATAB, + TAPDANCE_LENGTH +}; + +enum combos { + COMBO_NAVIGATION, + COMBO_LENGTH +}; + + +// begin tapdances +#define KC_QESC TD(TD_QESC) +#define KC_SBKT TD(TD_SBKT) +#define KC_CBKT TD(TD_CBKT) +#define KC_PARN TD(TD_PARN) +#define KC_LTGT TD(TD_LTGT) +#define KC_ATAB TD(TD_ATAB) + +#define KC_GUIX LGUI_T(KC_X) +#define KC_ALTC LALT_T(KC_C) + +// oneshots +#define KC_OSFT OSM(MOD_LSFT) +#define KC_OALT OSM(MOD_LALT) + +// layer changing +#define KC_OSYM OSL(_SYMBOL) +#define KC_ONUM LT(_NUMBER, KC_BSPC) + +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case KC_GUIX: + case KC_ALTC: + return TAPPING_TERM * 2; + default: + return TAPPING_TERM; + } +} + +// tapdances +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_QESC] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_ESC), + [TD_SBKT] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC), + [TD_CBKT] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_RCBR), + [TD_PARN] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, KC_RPRN), + [TD_LTGT] = ACTION_TAP_DANCE_DOUBLE(KC_LABK, KC_RABK), + [TD_ATAB] = ACTION_TAP_DANCE_DOUBLE(KC_A, KC_TAB) +}; +// end tapdances + +uint16_t COMBO_LEN = COMBO_LENGTH; + +const uint16_t PROGMEM combo_navigation[] = { KC_OSYM, KC_ONUM, COMBO_END }; +combo_t key_combos[] = { + [COMBO_NAVIGATION] = COMBO(combo_navigation, OSL(_NAVIGATION)), +}; + +uint16_t get_combo_term(uint16_t index, combo_t *combo) { + switch(index) { + case COMBO_NAVIGATION: // extending the combo term here helps reduce sticky layers some more. + return 250; + default: + return COMBO_TERM; + } +} +// end combos + + +// begin layers +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_ALPHA] = LAYOUT( + KC_QESC, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, \ + KC_Z, KC_GUIX, KC_ALTC, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \ + KC_OSYM, KC_OSFT, KC_SPC, KC_ONUM + ), + [_SYMBOL] = LAYOUT( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_PIPE, KC_NO, \ + KC_GRV, KC_TILD, KC_UNDS, KC_EQL, KC_NO, KC_SBKT, KC_CBKT, KC_PARN, KC_LTGT, KC_BSLASH, \ + KC_NO, KC_NO, KC_PLUS, KC_MINS, KC_NO, KC_NO, KC_NO, KC_COLN, KC_DOT, KC_SCLN, \ + KC_OSYM, KC_OSFT, KC_SPC, KC_ONUM + ), + [_NUMBER] = LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DOT, KC_NO, \ + KC_OSYM, KC_OSFT, KC_SPC, KC_ONUM + ), + [_NAVIGATION] = LAYOUT( + KC_NO, KC_F2, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_UP, KC_END, KC_BSPC, \ + KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_ENT, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_DEL, \ + KC_OSYM, KC_OSFT, KC_SPC, KC_ONUM + ) +}; + + + diff --git a/keyboards/jasonhazel/dust/keymaps/default/rules.mk b/keyboards/jasonhazel/dust/keymaps/default/rules.mk new file mode 100644 index 0000000000..44f5dad643 --- /dev/null +++ b/keyboards/jasonhazel/dust/keymaps/default/rules.mk @@ -0,0 +1,8 @@ +# General QMK +GRAVE_ESC_ENABLE = no +SPACE_CADET_ENABLE = no + +CAPS_WORD_ENABLE = yes +KEY_OVERRIDE_ENABLE = yes +COMBO_ENABLE = yes +TAP_DANCE_ENABLE = yes \ No newline at end of file diff --git a/keyboards/jasonhazel/dust/mcuconf.c b/keyboards/jasonhazel/dust/mcuconf.c new file mode 100644 index 0000000000..8af485361e --- /dev/null +++ b/keyboards/jasonhazel/dust/mcuconf.c @@ -0,0 +1,9 @@ +#pragma once + +#include_next "mcuconf.h" + +#undef RP_SPI_USE_SPI0 +#define RP_SPI_USE_SPI0 TRUE + +#undef RP_I2C_USE_I2C1 +#define RP_I2C_USE_I2C1 TRUE \ No newline at end of file diff --git a/keyboards/jasonhazel/dust/rules.mk b/keyboards/jasonhazel/dust/rules.mk new file mode 100644 index 0000000000..c1aec476bc --- /dev/null +++ b/keyboards/jasonhazel/dust/rules.mk @@ -0,0 +1,21 @@ +MCU = RP2040 +BOOTLOADER = rp2040 + + +# LTO_ENABLE = yes + +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +NKRO_ENABLE = no +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no +AUDIO_ENABLE = no +UNICODE_ENABLE = no +MAGIC_ENABLE = no + +BOOTMAGIC_ENABLE = yes +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes + +SPLIT_KEYBOARD = yes +SERIAL_DRIVER = vendor \ No newline at end of file