diff options
Diffstat (limited to 'keyboards/checkerboards/quark_squared')
7 files changed, 30 insertions, 16 deletions
diff --git a/keyboards/checkerboards/quark_squared/config.h b/keyboards/checkerboards/quark_squared/config.h index 32546097f1..d9af2af4b3 100644 --- a/keyboards/checkerboards/quark_squared/config.h +++ b/keyboards/checkerboards/quark_squared/config.h @@ -18,13 +18,6 @@ #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x7070 -#define PRODUCT_ID 0x5342 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Nasp -#define PRODUCT QUARK² - /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 12 @@ -32,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { C5, C4, C6, C7, B7 } #define MATRIX_COL_PINS { B4, B5, B6, B3, C2, B2, D6, D2, D3, D4, D5, B1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -53,3 +45,7 @@ #define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue #define RGBLIGHT_SAT_STEP 12 // units to step when in/decresing saturation #define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness) + +/* define rotary encoder pins */ +#define ENCODERS_PAD_A {B0} +#define ENCODERS_PAD_B {D1} diff --git a/keyboards/checkerboards/quark_squared/info.json b/keyboards/checkerboards/quark_squared/info.json index 4d2ce21298..a7188c27e6 100644 --- a/keyboards/checkerboards/quark_squared/info.json +++ b/keyboards/checkerboards/quark_squared/info.json @@ -1,7 +1,13 @@ { - "keyboard_name": "Quark_Squared", + "keyboard_name": "Quark Squared", + "manufacturer": "Nasp", "url": "https://www.checkerboards.xyz/Quark2_p_35.html", "maintainer": "nasp", + "usb": { + "vid": "0x7070", + "pid": "0x5342", + "device_version": "0.0.1" + }, "layouts": { "LAYOUT_4_2x225u": { "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Back Space", "x":11, "y":0}, {"label":"Esc", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"'", "x":11, "y":1}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":",", "x":8, "y":2}, {"label":".", "x":9, "y":2}, {"label":"/", "x":10, "y":2}, {"label":"Return", "x":11, "y":2}, {"label":"Ctrl", "x":0, "y":3, "w":1.25}, {"label":"Super", "x":1.25, "y":3, "w":1.25}, {"label":"Alt", "x":2.5, "y":3, "w":1.25}, {"x":3.75, "y":3, "w":2.25}, {"x":6, "y":3, "w":2.25}, {"label":"Alt", "x":8.25, "y":3, "w":1.25}, {"label":"Super", "x":9.5, "y":3, "w":1.25}, {"label":"Ctrl", "x":10.75, "y":3, "w":1.25}] diff --git a/keyboards/checkerboards/quark_squared/keymaps/2u/keymap.c b/keyboards/checkerboards/quark_squared/keymaps/2u/keymap.c index 0f37a1d080..8af07a13ef 100644 --- a/keyboards/checkerboards/quark_squared/keymaps/2u/keymap.c +++ b/keyboards/checkerboards/quark_squared/keymaps/2u/keymap.c @@ -68,13 +68,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------------+------+------+------+------+-----+-----+------+------+------+------+-----| * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |-------+-------+-------+-------+-------+-------+------+------+------+------+------+---| - * | RESET | | | | | | | | + * | QK_BOOT | | | | | | | | * `---------------------------------------------------------------------------------------' */ [2] = LAYOUT_4_2u( _______, _______, _______, KC_UP, _______, _______, _______, KC_UNDS, _______, KC_LBRC, KC_RBRC, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_MINS, _______, KC_LCBR, KC_RCBR, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - RESET, _______, _______, _______, _______, _______, _______, _______, _______ + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______ ) }; diff --git a/keyboards/checkerboards/quark_squared/keymaps/5_2u/keymap.c b/keyboards/checkerboards/quark_squared/keymaps/5_2u/keymap.c index d7f7ff378d..e81759c5fe 100644 --- a/keyboards/checkerboards/quark_squared/keymaps/5_2u/keymap.c +++ b/keyboards/checkerboards/quark_squared/keymaps/5_2u/keymap.c @@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------------+------+------+------+------+-----+-----+------+------+------+------+-----| * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |-------+-------+-------+-------+-------+-------+------+------+------+------+------+---| - * | RESET | | | | | | + * | QK_BOOT | | | | | | * `---------------------------------------------------------------------------------------' */ [2] = LAYOUT_5_2u( @@ -81,6 +81,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, KC_UP, _______, _______, _______, KC_UNDS, _______, KC_LBRC, KC_RBRC, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_MINS, _______, KC_LCBR, KC_RCBR, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - RESET, _______, _______, _______, _______, _______, _______, _______, _______ + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______ ) }; diff --git a/keyboards/checkerboards/quark_squared/keymaps/5_2x225u/keymap.c b/keyboards/checkerboards/quark_squared/keymaps/5_2x225u/keymap.c index e116732b75..1d39ae9943 100644 --- a/keyboards/checkerboards/quark_squared/keymaps/5_2x225u/keymap.c +++ b/keyboards/checkerboards/quark_squared/keymaps/5_2x225u/keymap.c @@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------------+------+------+------+------+-----+-----+------+------+------+------+-----| * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |-------+-------+-------+-------+-------+-------+------+------+------+------+------+---| - * | RESET | | | | | | + * | QK_BOOT | | | | | | * `---------------------------------------------------------------------------------------' */ [2] = LAYOUT_5_2x225u( @@ -81,6 +81,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, KC_UP, _______, _______, _______, KC_UNDS, _______, KC_LBRC, KC_RBRC, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_MINS, _______, KC_LCBR, KC_RCBR, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - RESET, _______, _______, _______, _______, _______, _______, _______ + QK_BOOT, _______, _______, _______, _______, _______, _______, _______ ) }; diff --git a/keyboards/checkerboards/quark_squared/quark_squared.c b/keyboards/checkerboards/quark_squared/quark_squared.c index fbd7346cc0..1ead754eaf 100644 --- a/keyboards/checkerboards/quark_squared/quark_squared.c +++ b/keyboards/checkerboards/quark_squared/quark_squared.c @@ -15,3 +15,15 @@ */ #include "quark_squared.h" + +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { return false; } + if (index == 0) { + if (clockwise) { + tap_code_delay(KC_VOLD, 10); + } else { + tap_code_delay(KC_VOLU, 10); + } + } + return true; +} diff --git a/keyboards/checkerboards/quark_squared/rules.mk b/keyboards/checkerboards/quark_squared/rules.mk index d511396436..df6bcc2d31 100644 --- a/keyboards/checkerboards/quark_squared/rules.mk +++ b/keyboards/checkerboards/quark_squared/rules.mk @@ -17,7 +17,7 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output UNICODE_ENABLE = yes # Unicode - +ENCODER_ENABLE = yes # Enable Rotary Encoders # Disable unsupported hardware AUDIO_SUPPORTED = no BACKLIGHT_SUPPORTED = no |