forked from foostan/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Keyboard] Handwired Skeeb Keyboard (qmk#8161)
* adding Handwired Skeeb Keyboard * Apply suggestions from fauxpark * Apply more suggestions from fauxpark and small change to layout * Apply more suggestions from noroadsleft and last tap dance
- Loading branch information
Showing
7 changed files
with
523 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#pragma once | ||
|
||
#include "config_common.h" | ||
|
||
/* USB Device Descriptor Parameter */ | ||
#define VENDOR_ID 0xFEED | ||
#define PRODUCT_ID 0x6060 | ||
#define DEVICE_VER 0x0100 | ||
#define MANUFACTURER DAG3 | ||
#define PRODUCT MySKeeb | ||
#define DESCRIPTION Custom Split Keyboard | ||
|
||
// Key Matrix Size // | ||
// Rows are Doubled-up | ||
#define MATRIX_ROWS 10 | ||
#define MATRIX_COLS 7 | ||
|
||
// Wiring of Each Half | ||
#define DIODE_DIRECTION COL2ROW | ||
#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } | ||
#define MATRIX_COL_PINS { B6, B2, B3, B1, F6, F7, F5 } | ||
#define MATRIX_COL_PINS_RIGHT { F5, B3, F7, B1, F6, B2, B6 } | ||
|
||
// Comunication and Split Detection | ||
|
||
#define USE_SERIAL | ||
#define SOFT_SERIAL_PIN D3 | ||
#define SELECT_SOFT_SERIAL_SPEED 1 | ||
#define SPLIT_USB_DETECT | ||
#define EE_HANDS | ||
#define SPLIT_USB_TIMEOUT 1000 | ||
|
||
// OLED Display Config | ||
|
||
#define OLED_DISPLAY_128X64 | ||
#define OLED_FONT_HEIGHT 8 | ||
#define OLED_FONT_WIDTH 6 | ||
#define OLED_FONT_H "skeeb_font.c" | ||
|
||
// Tap Dance | ||
|
||
#define TAPPING_TERM 200 | ||
|
||
// Other | ||
|
||
#define DEBOUNCE 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
#include QMK_KEYBOARD_H | ||
#include "oled.c" | ||
|
||
// [Init Variables] ----------------------------------------------------------// | ||
|
||
// Tap Dance Enums Init | ||
enum { | ||
OP_QT = 0, | ||
CL_QT, | ||
TD_DQ, | ||
TL, | ||
}; | ||
|
||
// Tap Dance Functions | ||
void tri_open(qk_tap_dance_state_t *state, void *user_data) { | ||
if (state->count == 1) { | ||
tap_code16(KC_LPRN); | ||
} else if (state->count == 2) { | ||
tap_code(KC_LBRC); | ||
} else if (state->count == 3) { | ||
tap_code16(S(KC_LBRC)); | ||
} | ||
} | ||
|
||
void tri_close(qk_tap_dance_state_t *state, void *user_data) { | ||
if (state->count == 1) { | ||
tap_code16(KC_RPRN); | ||
} else if (state->count == 2) { | ||
tap_code(KC_RBRC); | ||
} else if (state->count == 3) { | ||
tap_code16(S(KC_RBRC)); | ||
} | ||
} | ||
|
||
void dquote(qk_tap_dance_state_t *state, void *user_data) { | ||
if (state->count == 1) { | ||
if (state->interrupted) | ||
tap_code(KC_QUOT); | ||
else if (state->pressed) | ||
tap_code(KC_QUOT); | ||
else | ||
tap_code16(KC_DQUO), | ||
tap_code(KC_SPC); | ||
} | ||
} | ||
|
||
void tilded(qk_tap_dance_state_t *state, void *user_data) { | ||
if (state->count == 1) { | ||
if (state->interrupted) | ||
tap_code16(KC_TILD); | ||
else if (state->pressed) | ||
tap_code16(KC_TILD); | ||
else | ||
tap_code16(KC_AT); | ||
} | ||
} | ||
|
||
qk_tap_dance_action_t tap_dance_actions[] = { | ||
[OP_QT] = ACTION_TAP_DANCE_FN(tri_open), | ||
[CL_QT] = ACTION_TAP_DANCE_FN(tri_close), | ||
[TD_DQ] = ACTION_TAP_DANCE_FN(dquote), | ||
[TL] = ACTION_TAP_DANCE_FN(tilded), | ||
}; | ||
|
||
// [Layer Keymaps] -----------------------------------------------------------// | ||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
[0] = LAYOUT( | ||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | ||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TD(OP_QT), TD(CL_QT), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, | ||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN, TD(TD_DQ), | ||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_CALC, KC_PSCR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, | ||
KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, LT(1,KC_BSPC), KC_SPC, KC_ENT, KC_ENT, KC_SPC, TD(TL), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
), | ||
[1] = LAYOUT( | ||
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_BSPC, | ||
KC_CAPS, KC_PDOT, KC_PPLS, KC_PMNS, KC_PAST, KC_PSLS, KC_MSEL, KC_MSTP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PWR, RESET, | ||
KC_TAB, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_NO, KC_NO, KC_SLCK, NK_ON, EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, | ||
KC_LSFT, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_MUTE, KC_MPLY, KC_NLCK, NK_OFF, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_TRNS, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, TO(2), KC_HOME, KC_PGDN, KC_PGUP, KC_END | ||
), | ||
[2] = LAYOUT( | ||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | ||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_7, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | ||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | ||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | ||
KC_NO, KC_NO, KC_NO, KC_NO, KC_SPC, KC_SPC, KC_SPC, KC_NO, KC_NO, TO(3), KC_NO, KC_NO, KC_LALT, KC_TAB | ||
), | ||
[3] = LAYOUT( | ||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | ||
KC_TAB, KC_A, KC_W, KC_E, KC_R, KC_T, KC_H, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | ||
KC_LSFT, KC_Z, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | ||
KC_LCTL, KC_NO, KC_X, KC_C, KC_V, KC_B, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | ||
KC_NO, KC_NO, KC_NO, KC_NO, KC_SPC, KC_SPC, KC_Q, KC_NO, KC_NO, TO(0), KC_NO, KC_NO, KC_LALT, KC_TAB | ||
) | ||
}; | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "myskeeb.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "quantum.h" | ||
|
||
#define LAYOUT( \ | ||
L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ | ||
L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ | ||
L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ | ||
L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ | ||
L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ | ||
) \ | ||
{ \ | ||
{ L00, L01, L02, L03, L04, L05, L06 }, \ | ||
{ L10, L11, L12, L13, L14, L15, L16 }, \ | ||
{ L20, L21, L22, L23, L24, L25, L26 }, \ | ||
{ L30, L31, L32, L33, L34, L35, L36 }, \ | ||
{ L40, L41, L42, L43, L44, L45, L46 }, \ | ||
{ R00, R01, R02, R03, R04, R05, R06 }, \ | ||
{ R10, R11, R12, R13, R14, R15, R16 }, \ | ||
{ R20, R21, R22, R23, R24, R25, R26 }, \ | ||
{ R30, R31, R32, R33, R34, R35, R36 }, \ | ||
{ R40, R41, R42, R43, R44, R45, R46 } \ | ||
} | ||
|
Oops, something went wrong.