commit
e6ab714a96
@ -0,0 +1 @@
|
|||||||
|
#include "alf_x2.h"
|
@ -0,0 +1,92 @@
|
|||||||
|
#ifndef ALF_X2_H
|
||||||
|
#define ALF_X2_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
// K404 and K408 are the microswitches at the top of the PCB
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
|
||||||
|
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
|
||||||
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
|
||||||
|
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \
|
||||||
|
K400, K401, K403, K404, K406, K408, K410, K411, K412, K413, K414 \
|
||||||
|
) { \
|
||||||
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
|
||||||
|
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
|
||||||
|
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \
|
||||||
|
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \
|
||||||
|
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_std_ansi( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \
|
||||||
|
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
|
||||||
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
|
||||||
|
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \
|
||||||
|
K400, K401, K403, K404, K406, K408, K410, K411, K413, K414 \
|
||||||
|
) { \
|
||||||
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \
|
||||||
|
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
|
||||||
|
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \
|
||||||
|
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \
|
||||||
|
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, K414 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_std_splits( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
|
||||||
|
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
|
||||||
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
|
||||||
|
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314,\
|
||||||
|
K400, K401, K403, K404, K406, K408, K410, K411, K413, K414 \
|
||||||
|
) { \
|
||||||
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
|
||||||
|
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
|
||||||
|
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \
|
||||||
|
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \
|
||||||
|
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, K414 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_hhkb( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
|
||||||
|
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
|
||||||
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
|
||||||
|
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314,\
|
||||||
|
K401, K403, K404, K406, K408, K410, K411 \
|
||||||
|
) { \
|
||||||
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
|
||||||
|
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
|
||||||
|
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \
|
||||||
|
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \
|
||||||
|
{ KC_NO, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, KC_NO, KC_NO } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_2u_split_arrows( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
|
||||||
|
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
|
||||||
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
|
||||||
|
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314,\
|
||||||
|
K400, K401, K403, K404, K406, K408, K410, K411, K412, K413, K414 \
|
||||||
|
) { \
|
||||||
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
|
||||||
|
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
|
||||||
|
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \
|
||||||
|
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \
|
||||||
|
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_split_arrows( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
|
||||||
|
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
|
||||||
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
|
||||||
|
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314,\
|
||||||
|
K400, K401, K403, K404, K406, K408, K410, K411, K412, K413, K414 \
|
||||||
|
) { \
|
||||||
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
|
||||||
|
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
|
||||||
|
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \
|
||||||
|
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_N), K313, K314 }, \
|
||||||
|
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,58 @@
|
|||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6060
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER ALF
|
||||||
|
#define PRODUCT X2
|
||||||
|
#define DESCRIPTION ALF X2 60
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 15
|
||||||
|
|
||||||
|
/* key matrix pins */
|
||||||
|
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
|
||||||
|
#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
#define BACKLIGHT_PIN B6
|
||||||
|
#ifdef BACKLIGHT_PIN
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* prevent stuck modifiers */
|
||||||
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
|
||||||
|
#define RGB_DI_PIN E2
|
||||||
|
#ifdef RGB_DI_PIN
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 4
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "ALF X2",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 15.0,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"x":12, "y":3}, {"label":"Shift", "x":13, "y":3}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":4.25, "y":4, "w":1.3}, {"x":6.0, "y":4, "w":2}, {"x":8.5, "y":4, "w":1.3}, {"label":"Alt", "x":10.0, "y":4}, {"label":"Alt", "x":11.0, "y":4}, {"label":"Win", "x":12.0, "y":4}, {"label":"Menu", "x":13.0, "y":4}, {"label":"Ctrl", "x":14.0, "y":4}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_std_ansi": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":4.25, "y":4}, {"x":5.5, "y":4, "w":2.75}, {"x":8.5, "y":4}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_hhkb": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Win", "x":1.75, "y":4, "w":1.25}, {"label":"Alt", "x":3, "y":4, "w":1.25}, {"x":4.75, "y":4}, {"x":6, "y":4, "w":2.75}, {"x":9, "y":4}, {"label":"Alt", "x":10.5, "y":4, "w":1.25}, {"label":"Win", "x":11.75, "y":4, "w":1.25}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_std_splits": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":4.25, "y":4}, {"x":5.5, "y":4, "w":2.75}, {"x":8.5, "y":4}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_2u_split_arrows": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":4.25, "y":4}, {"x":5.5, "y":4, "w":2.75}, {"x":8.5, "y":4}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_split_arrows": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"Shift", "x":11.25, "y":3, "w":1.75}, {"x":13, "y":3}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":4.25, "y":4}, {"x":5.5, "y":4, "w":2.75}, {"x":8.5, "y":4}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
LAYOUT(
|
||||||
|
KC_ESC, 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_NO, 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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, KC_NO,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_VOLU, KC_SPC, KC_VOLD, KC_RALT, MO(1), KC_NO, KC_APP, KC_RCTL),
|
||||||
|
|
||||||
|
LAYOUT(
|
||||||
|
KC_GRV, 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_TRNS, KC_DEL,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, RESET,
|
||||||
|
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_DOWN, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_TRNS, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
|
return MACRO_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||||
|
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
|
||||||
|
} else {
|
||||||
|
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
LAYOUT(
|
||||||
|
KC_ESC, 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_BSLS, KC_GRV,
|
||||||
|
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_BSPC,
|
||||||
|
KC_LCTL, 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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, MO(1),
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_VOLU, KC_SPC, KC_VOLD, KC_RALT, KC_RGUI, KC_NO, KC_APP, KC_RCTL),
|
||||||
|
|
||||||
|
LAYOUT(
|
||||||
|
KC_NO, 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_INS, KC_DEL,
|
||||||
|
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, RESET,
|
||||||
|
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_DOWN, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_TRNS, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
|
return MACRO_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||||
|
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
|
||||||
|
} else {
|
||||||
|
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
# ALF X2
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A customizable 60% keyboard.
|
||||||
|
|
||||||
|
In QMK Configurator, the two keys to the left and right of the spacebar are the microswitches at the top of the PCB.
|
||||||
|
|
||||||
|
In the LAYOUT macros, K404 and K408 are the microswitches at the top of the PCB.
|
||||||
|
|
||||||
|
Keyboard Maintainer: QMK Community
|
||||||
|
Hardware Supported: ALF X2 60%
|
||||||
|
Hardware Availability: [zfrontier](https://en.zfrontier.com/products/group-buy-alf-x2-60)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make alf_x2:default
|
||||||
|
|
||||||
|
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
@ -0,0 +1,56 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
AUDIO_ENABLE = no
|
||||||
|
RGBLIGHT_ENABLE = yes
|
@ -1,14 +1,17 @@
|
|||||||
# Alpha
|
# Alpha
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
A 28-key, semi-ortho keyboard designed by PyroL!
|
A 28-key, semi-ortho keyboard designed by PyroL!
|
||||||
Keyboard Maintainer: [PyroL](https://www.github.com/PyrooL)
|
|
||||||
Hardware Supported: Alpha PCB, Pro Micro
|
Keyboard Maintainer: [PyroL](https://www.github.com/PyrooL)
|
||||||
|
|
||||||
|
Hardware Supported: Alpha PCB, Pro Micro
|
||||||
|
|
||||||
Hardware Availability: on a group-buy basis for now. Pro Micros can be found on Ali or from the official Sparkfun website.
|
Hardware Availability: on a group-buy basis for now. Pro Micros can be found on Ali or from the official Sparkfun website.
|
||||||
|
|
||||||
Make example for Alpha (after setting up your build environment):
|
Make example for Alpha (after setting up your build environment):
|
||||||
|
|
||||||
make alpha:default
|
make alpha:default
|
||||||
|
|
||||||
See [build environment setup](https://docs.qmk.fm/install-build-tools) then the [make instructions](https://docs.qmk.fm/faq/build-compile-qmk) for more information.
|
See [build environment setup](https://docs.qmk.fm/install-build-tools) then the [make instructions](https://docs.qmk.fm/faq/build-compile-qmk) for more information.
|
@ -0,0 +1,22 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_CONFIG_H
|
||||||
|
|
||||||
|
#define SPACE_COUNT 3
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
|
||||||
|
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
||||||
|
K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
|
||||||
|
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
|
||||||
|
{ K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, KC_NO, K4B, K4C, KC_NO }\
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1 @@
|
|||||||
|
// This space intentionally left blank
|
@ -0,0 +1 @@
|
|||||||
|
#include "bfo9000.h"
|
@ -0,0 +1,37 @@
|
|||||||
|
#ifndef BFO9000_H
|
||||||
|
#define BFO9000_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#ifdef USE_I2C
|
||||||
|
#include <stddef.h>
|
||||||
|
#ifdef __AVR__
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
L00, L01, L02, L03, L04, L05, L06, L07, L08, R00, R01, R02, R03, R04, R05, R06, R07, R08, \
|
||||||
|
L10, L11, L12, L13, L14, L15, L16, L17, L18, R10, R11, R12, R13, R14, R15, R16, R17, R18, \
|
||||||
|
L20, L21, L22, L23, L24, L25, L26, L27, L28, R20, R21, R22, R23, R24, R25, R26, R27, R28, \
|
||||||
|
L30, L31, L32, L33, L34, L35, L36, L37, L38, R30, R31, R32, R33, R34, R35, R36, R37, R38, \
|
||||||
|
L40, L41, L42, L43, L44, L45, L46, L47, L48, R40, R41, R42, R43, R44, R45, R46, R47, R48, \
|
||||||
|
L50, L51, L52, L53, L54, L55, L56, L57, L58, R50, R51, R52, R53, R54, R55, R56, R57, R58 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ L00, L01, L02, L03, L04, L05, L06, L07, L08 }, \
|
||||||
|
{ L10, L11, L12, L13, L14, L15, L16, L17, L18 }, \
|
||||||
|
{ L20, L21, L22, L23, L24, L25, L26, L27, L28 }, \
|
||||||
|
{ L30, L31, L32, L33, L34, L35, L36, L37, L38 }, \
|
||||||
|
{ L40, L41, L42, L43, L44, L45, L46, L47, L48 }, \
|
||||||
|
{ L50, L51, L52, L53, L54, L55, L56, L57, L58 }, \
|
||||||
|
{ R00, R01, R02, R03, R04, R05, R06, R07, R08 }, \
|
||||||
|
{ R10, R11, R12, R13, R14, R15, R16, R17, R18 }, \
|
||||||
|
{ R20, R21, R22, R23, R24, R25, R26, R27, R28 }, \
|
||||||
|
{ R30, R31, R32, R33, R34, R35, R36, R37, R38 }, \
|
||||||
|
{ R40, R41, R42, R43, R44, R45, R46, R47, R48 }, \
|
||||||
|
{ R50, R51, R52, R53, R54, R55, R56, R57, R58 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,78 @@
|
|||||||
|
/*
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xCEEB
|
||||||
|
#define PRODUCT_ID 0x1169
|
||||||
|
#define DEVICE_VER 0x0100
|
||||||
|
#define MANUFACTURER Keebio
|
||||||
|
#define PRODUCT BFO-9000
|
||||||
|
#define DESCRIPTION Really big split ortholinear keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
// Rows are doubled-up
|
||||||
|
#define MATRIX_ROWS 12
|
||||||
|
#define MATRIX_COLS 9
|
||||||
|
|
||||||
|
// wiring of each half
|
||||||
|
#define MATRIX_ROW_PINS { D3, D2, D4, C6, D7, E6 }
|
||||||
|
#define MATRIX_COL_PINS { B5, B6, B2, B3, B1, F7, F6, F5, F4 }
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* ws2812 RGB LED */
|
||||||
|
#define RGB_DI_PIN B4
|
||||||
|
#define RGBLIGHT_TIMER
|
||||||
|
#define RGBLED_NUM 20 // Number of LEDs
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
// #define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
// #define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,162 @@
|
|||||||
|
#include <util/twi.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#include <util/twi.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include "i2c.h"
|
||||||
|
|
||||||
|
#ifdef USE_I2C
|
||||||
|
|
||||||
|
// Limits the amount of we wait for any one i2c transaction.
|
||||||
|
// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is
|
||||||
|
// 9 bits, a single transaction will take around 90μs to complete.
|
||||||
|
//
|
||||||
|
// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit
|
||||||
|
// poll loop takes at least 8 clock cycles to execute
|
||||||
|
#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8
|
||||||
|
|
||||||
|
#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE)
|
||||||
|
|
||||||
|
volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
|
||||||
|
|
||||||
|
static volatile uint8_t slave_buffer_pos;
|
||||||
|
static volatile bool slave_has_register_set = false;
|
||||||
|
|
||||||
|
// Wait for an i2c operation to finish
|
||||||
|
inline static
|
||||||
|
void i2c_delay(void) {
|
||||||
|
uint16_t lim = 0;
|
||||||
|
while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT)
|
||||||
|
lim++;
|
||||||
|
|
||||||
|
// easier way, but will wait slightly longer
|
||||||
|
// _delay_us(100);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Setup twi to run at 100kHz
|
||||||
|
void i2c_master_init(void) {
|
||||||
|
// no prescaler
|
||||||
|
TWSR = 0;
|
||||||
|
// Set TWI clock frequency to SCL_CLOCK. Need TWBR>10.
|
||||||
|
// Check datasheets for more info.
|
||||||
|
TWBR = ((F_CPU/SCL_CLOCK)-16)/2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start a transaction with the given i2c slave address. The direction of the
|
||||||
|
// transfer is set with I2C_READ and I2C_WRITE.
|
||||||
|
// returns: 0 => success
|
||||||
|
// 1 => error
|
||||||
|
uint8_t i2c_master_start(uint8_t address) {
|
||||||
|
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA);
|
||||||
|
|
||||||
|
i2c_delay();
|
||||||
|
|
||||||
|
// check that we started successfully
|
||||||
|
if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
TWDR = address;
|
||||||
|
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||||
|
|
||||||
|
i2c_delay();
|
||||||
|
|
||||||
|
if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) )
|
||||||
|
return 1; // slave did not acknowledge
|
||||||
|
else
|
||||||
|
return 0; // success
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Finish the i2c transaction.
|
||||||
|
void i2c_master_stop(void) {
|
||||||
|
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
|
||||||
|
|
||||||
|
uint16_t lim = 0;
|
||||||
|
while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT)
|
||||||
|
lim++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write one byte to the i2c slave.
|
||||||
|
// returns 0 => slave ACK
|
||||||
|
// 1 => slave NACK
|
||||||
|
uint8_t i2c_master_write(uint8_t data) {
|
||||||
|
TWDR = data;
|
||||||
|
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||||
|
|
||||||
|
i2c_delay();
|
||||||
|
|
||||||
|
// check if the slave acknowledged us
|
||||||
|
return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read one byte from the i2c slave. If ack=1 the slave is acknowledged,
|
||||||
|
// if ack=0 the acknowledge bit is not set.
|
||||||
|
// returns: byte read from i2c device
|
||||||
|
uint8_t i2c_master_read(int ack) {
|
||||||
|
TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA);
|
||||||
|
|
||||||
|
i2c_delay();
|
||||||
|
return TWDR;
|
||||||
|
}
|
||||||
|
|
||||||
|
void i2c_reset_state(void) {
|
||||||
|
TWCR = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void i2c_slave_init(uint8_t address) {
|
||||||
|
TWAR = address << 0; // slave i2c address
|
||||||
|
// TWEN - twi enable
|
||||||
|
// TWEA - enable address acknowledgement
|
||||||
|
// TWINT - twi interrupt flag
|
||||||
|
// TWIE - enable the twi interrupt
|
||||||
|
TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
ISR(TWI_vect);
|
||||||
|
|
||||||
|
ISR(TWI_vect) {
|
||||||
|
uint8_t ack = 1;
|
||||||
|
switch(TW_STATUS) {
|
||||||
|
case TW_SR_SLA_ACK:
|
||||||
|
// this device has been addressed as a slave receiver
|
||||||
|
slave_has_register_set = false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TW_SR_DATA_ACK:
|
||||||
|
// this device has received data as a slave receiver
|
||||||
|
// The first byte that we receive in this transaction sets the location
|
||||||
|
// of the read/write location of the slaves memory that it exposes over
|
||||||
|
// i2c. After that, bytes will be written at slave_buffer_pos, incrementing
|
||||||
|
// slave_buffer_pos after each write.
|
||||||
|
if(!slave_has_register_set) {
|
||||||
|
slave_buffer_pos = TWDR;
|
||||||
|
// don't acknowledge the master if this memory loctaion is out of bounds
|
||||||
|
if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) {
|
||||||
|
ack = 0;
|
||||||
|
slave_buffer_pos = 0;
|
||||||
|
}
|
||||||
|
slave_has_register_set = true;
|
||||||
|
} else {
|
||||||
|
i2c_slave_buffer[slave_buffer_pos] = TWDR;
|
||||||
|
BUFFER_POS_INC();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TW_ST_SLA_ACK:
|
||||||
|
case TW_ST_DATA_ACK:
|
||||||
|
// master has addressed this device as a slave transmitter and is
|
||||||
|
// requesting data.
|
||||||
|
TWDR = i2c_slave_buffer[slave_buffer_pos];
|
||||||
|
BUFFER_POS_INC();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TW_BUS_ERROR: // something went wrong, reset twi state
|
||||||
|
TWCR = 0;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// Reset everything, so we are ready for the next TWI interrupt
|
||||||
|
TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN);
|
||||||
|
}
|
||||||
|
#endif
|
@ -0,0 +1,49 @@
|
|||||||
|
#ifndef I2C_H
|
||||||
|
#define I2C_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#ifndef F_CPU
|
||||||
|
#define F_CPU 16000000UL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define I2C_READ 1
|
||||||
|
#define I2C_WRITE 0
|
||||||
|
|
||||||
|
#define I2C_ACK 1
|
||||||
|
#define I2C_NACK 0
|
||||||
|
|
||||||
|
#define SLAVE_BUFFER_SIZE 0x10
|
||||||
|
|
||||||
|
// i2c SCL clock frequency
|
||||||
|
#define SCL_CLOCK 400000L
|
||||||
|
|
||||||
|
extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
|
||||||
|
|
||||||
|
void i2c_master_init(void);
|
||||||
|
uint8_t i2c_master_start(uint8_t address);
|
||||||
|
void i2c_master_stop(void);
|
||||||
|
uint8_t i2c_master_write(uint8_t data);
|
||||||
|
uint8_t i2c_master_read(int);
|
||||||
|
void i2c_reset_state(void);
|
||||||
|
void i2c_slave_init(uint8_t address);
|
||||||
|
|
||||||
|
|
||||||
|
static inline unsigned char i2c_start_read(unsigned char addr) {
|
||||||
|
return i2c_master_start((addr << 1) | I2C_READ);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline unsigned char i2c_start_write(unsigned char addr) {
|
||||||
|
return i2c_master_start((addr << 1) | I2C_WRITE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// from SSD1306 scrips
|
||||||
|
extern unsigned char i2c_rep_start(unsigned char addr);
|
||||||
|
extern void i2c_start_wait(unsigned char addr);
|
||||||
|
extern unsigned char i2c_readAck(void);
|
||||||
|
extern unsigned char i2c_readNak(void);
|
||||||
|
extern unsigned char i2c_read(unsigned char ack);
|
||||||
|
|
||||||
|
#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,19 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#define _BASE 0
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_BASE] = LAYOUT( \
|
||||||
|
KC_ESC, KC_VOLU, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
|
||||||
|
KC_HOME, KC_VOLD, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
|
||||||
|
KC_END, KC_TAB, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||||
|
KC_PGUP, KC_CAPS, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, \
|
||||||
|
KC_PGDN, KC_UP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, XXXXXXX, \
|
||||||
|
KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_ENT, KC_BSPC, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
|
||||||
|
)
|
||||||
|
};
|
@ -0,0 +1,342 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* scan matrix
|
||||||
|
*/
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#ifdef USE_I2C
|
||||||
|
// provides memcpy for copying TWI slave buffer
|
||||||
|
// #include <string.h>
|
||||||
|
#endif
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <avr/wdt.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include "print.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
#include "split_util.h"
|
||||||
|
#include "pro_micro.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifdef USE_I2C
|
||||||
|
# include "i2c.h"
|
||||||
|
#else // USE_SERIAL
|
||||||
|
# include "serial.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DEBOUNCE
|
||||||
|
# define DEBOUNCE 5
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ERROR_DISCONNECT_COUNT 5
|
||||||
|
|
||||||
|
static uint8_t debouncing = DEBOUNCE;
|
||||||
|
static const int ROWS_PER_HAND = MATRIX_ROWS/2;
|
||||||
|
static uint8_t error_count = 0;
|
||||||
|
|
||||||
|
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||||
|
static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
||||||
|
|
||||||
|
/* matrix state(1:on, 0:off) */
|
||||||
|
static matrix_row_t matrix[MATRIX_ROWS];
|
||||||
|
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||||
|
|
||||||
|
static matrix_row_t read_cols(void);
|
||||||
|
static void init_cols(void);
|
||||||
|
static void unselect_rows(void);
|
||||||
|
static void select_row(uint8_t row);
|
||||||
|
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
uint8_t matrix_rows(void)
|
||||||
|
{
|
||||||
|
return MATRIX_ROWS;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
uint8_t matrix_cols(void)
|
||||||
|
{
|
||||||
|
return MATRIX_COLS;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init(void)
|
||||||
|
{
|
||||||
|
debug_enable = true;
|
||||||
|
debug_matrix = true;
|
||||||
|
debug_mouse = true;
|
||||||
|
// initialize row and col
|
||||||
|
unselect_rows();
|
||||||
|
init_cols();
|
||||||
|
|
||||||
|
TX_RX_LED_INIT;
|
||||||
|
|
||||||
|
// initialize matrix state: all keys off
|
||||||
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = 0;
|
||||||
|
matrix_debouncing[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_init_quantum();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t _matrix_scan(void)
|
||||||
|
{
|
||||||
|
// Right hand is stored after the left in the matrix so, we need to offset it
|
||||||
|
int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
|
||||||
|
|
||||||
|
for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
|
||||||
|
select_row(i);
|
||||||
|
_delay_us(30); // without this wait read unstable value.
|
||||||
|
matrix_row_t cols = read_cols();
|
||||||
|
if (matrix_debouncing[i+offset] != cols) {
|
||||||
|
matrix_debouncing[i+offset] = cols;
|
||||||
|
debouncing = DEBOUNCE;
|
||||||
|
}
|
||||||
|
unselect_rows();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (debouncing) {
|
||||||
|
if (--debouncing) {
|
||||||
|
_delay_ms(1);
|
||||||
|
} else {
|
||||||
|
for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
|
||||||
|
matrix[i+offset] = matrix_debouncing[i+offset];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef USE_I2C
|
||||||
|
|
||||||
|
// Get rows from other half over i2c
|
||||||
|
int i2c_transaction(void) {
|
||||||
|
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
||||||
|
|
||||||
|
int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
|
||||||
|
if (err) goto i2c_error;
|
||||||
|
|
||||||
|
// start of matrix stored at 0x00
|
||||||
|
err = i2c_master_write(0x00);
|
||||||
|
if (err) goto i2c_error;
|
||||||
|
|
||||||
|
// Start read
|
||||||
|
err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);
|
||||||
|
if (err) goto i2c_error;
|
||||||
|
|
||||||
|
if (!err) {
|
||||||
|
/*
|
||||||
|
// read from TWI byte-by-byte into matrix_row_t memory space
|
||||||
|
size_t i;
|
||||||
|
for (i = 0; i < SLAVE_BUFFER_SIZE-1; ++i) {
|
||||||
|
*((uint8_t*)&matrix[slaveOffset]+i) = i2c_master_read(I2C_ACK);
|
||||||
|
}
|
||||||
|
// last byte to be read / end of chunk
|
||||||
|
*((uint8_t*)&matrix[slaveOffset]+i) = i2c_master_read(I2C_NACK);
|
||||||
|
*/
|
||||||
|
|
||||||
|
// kludge for column #9: unpack bits for keys (2,9) and (3,9) from (1,7) and (1,8)
|
||||||
|
// i2c_master_read(I2C_ACK);
|
||||||
|
matrix[slaveOffset+0] = i2c_master_read(I2C_ACK);
|
||||||
|
// i2c_master_read(I2C_ACK);
|
||||||
|
matrix[slaveOffset+1] = (matrix_row_t)i2c_master_read(I2C_ACK)\
|
||||||
|
| (matrix[slaveOffset+0]&0x40U)<<2;
|
||||||
|
// i2c_master_read(I2C_ACK);
|
||||||
|
matrix[slaveOffset+2] = (matrix_row_t)i2c_master_read(I2C_NACK)\
|
||||||
|
| (matrix[slaveOffset+0]&0x80U)<<1;
|
||||||
|
// clear highest two bits on row 1, where the col9 bits were transported
|
||||||
|
matrix[slaveOffset+0] &= 0x3F;
|
||||||
|
|
||||||
|
i2c_master_stop();
|
||||||
|
} else {
|
||||||
|
i2c_error: // the cable is disconnected, or something else went wrong
|
||||||
|
i2c_reset_state();
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else // USE_SERIAL
|
||||||
|
|
||||||
|
int serial_transaction(void) {
|
||||||
|
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
||||||
|
|
||||||
|
if (serial_update_buffers()) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||||
|
matrix[slaveOffset+i] = serial_slave_buffer[i];
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void)
|
||||||
|
{
|
||||||
|
int ret = _matrix_scan();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef USE_I2C
|
||||||
|
if( i2c_transaction() ) {
|
||||||
|
#else // USE_SERIAL
|
||||||
|
if( serial_transaction() ) {
|
||||||
|
#endif
|
||||||
|
// turn on the indicator led when halves are disconnected
|
||||||
|
TXLED1;
|
||||||
|
|
||||||
|
error_count++;
|
||||||
|
|
||||||
|
if (error_count > ERROR_DISCONNECT_COUNT) {
|
||||||
|
// reset other half if disconnected
|
||||||
|
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
||||||
|
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||||
|
matrix[slaveOffset+i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// turn off the indicator led on no error
|
||||||
|
TXLED0;
|
||||||
|
error_count = 0;
|
||||||
|
}
|
||||||
|
matrix_scan_quantum();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_slave_scan(void) {
|
||||||
|
_matrix_scan();
|
||||||
|
|
||||||
|
int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
|
||||||
|
|
||||||
|
#ifdef USE_I2C
|
||||||
|
// SLAVE_BUFFER_SIZE is from i2c.h
|
||||||
|
// (MATRIX_ROWS/2*sizeof(matrix_row_t))
|
||||||
|
// memcpy((void*)i2c_slave_buffer, (const void*)&matrix[offset], (ROWS_PER_HAND*sizeof(matrix_row_t)));
|
||||||
|
|
||||||
|
// kludge for column #9: put bits for keys (2,9) and (3,9) into (1,7) and (1,8)
|
||||||
|
i2c_slave_buffer[0] = (uint8_t)(matrix[offset+0])\
|
||||||
|
| (matrix[offset+1]&0x100U)>>2\
|
||||||
|
| (matrix[offset+2]&0x100U)>>1;
|
||||||
|
i2c_slave_buffer[1] = (uint8_t)(matrix[offset+1]);
|
||||||
|
i2c_slave_buffer[2] = (uint8_t)(matrix[offset+2]);
|
||||||
|
// note: looks like a possible operator-precedence bug here, in last version?
|
||||||
|
/*
|
||||||
|
i2c_slave_buffer[1] = (uint8_t)matrix[offset+0];
|
||||||
|
i2c_slave_buffer[2] = (uint8_t)(matrix[offset+1]>>8);
|
||||||
|
i2c_slave_buffer[3] = (uint8_t)(matrix[offset+1]>>8);
|
||||||
|
i2c_slave_buffer[4] = (uint8_t)(matrix[offset+2]>>8);
|
||||||
|
i2c_slave_buffer[5] = (uint8_t)matrix[offset+2];
|
||||||
|
*/
|
||||||
|
#else // USE_SERIAL
|
||||||
|
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||||
|
serial_slave_buffer[i] = matrix[offset+i];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool matrix_is_modified(void)
|
||||||
|
{
|
||||||
|
if (debouncing) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||||
|
{
|
||||||
|
return (matrix[row] & ((matrix_row_t)1<<col));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
matrix_row_t matrix_get_row(uint8_t row)
|
||||||
|
{
|
||||||
|
return matrix[row];
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_print(void)
|
||||||
|
{
|
||||||
|
print("\nr/c 0123456789ABCDEF\n");
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
phex(row); print(": ");
|
||||||
|
pbin_reverse16(matrix_get_row(row));
|
||||||
|
print("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_key_count(void)
|
||||||
|
{
|
||||||
|
uint8_t count = 0;
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
count += bitpop16(matrix[i]);
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void init_cols(void)
|
||||||
|
{
|
||||||
|
for(int x = 0; x < MATRIX_COLS; x++) {
|
||||||
|
_SFR_IO8((col_pins[x] >> 4) + 1) &= ~_BV(col_pins[x] & 0xF);
|
||||||
|
_SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static matrix_row_t read_cols(void)
|
||||||
|
{
|
||||||
|
matrix_row_t result = 0;
|
||||||
|
for(int x = 0; x < MATRIX_COLS; x++) {
|
||||||
|
result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void unselect_rows(void)
|
||||||
|
{
|
||||||
|
for(int x = 0; x < ROWS_PER_HAND; x++) {
|
||||||
|
_SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF);
|
||||||
|
_SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void select_row(uint8_t row)
|
||||||
|
{
|
||||||
|
_SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF);
|
||||||
|
_SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF);
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
BFO-9000
|
||||||
|
========
|
||||||
|
|
||||||
|
A split full-size ortholinear keyboard made and sold by Keebio. Each half is a 6x9 arrangement, with breakable pieces to allow the number of rows to be customized between 4 to 6, and the number of columns to be between 7 to 9. [More info at Keebio](https://keeb.io).
|
||||||
|
|
||||||
|
Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges)
|
||||||
|
Hardware Supported: Pro Micro
|
||||||
|
Hardware Availability: [Keebio](https://keeb.io)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make bfo9000:default
|
||||||
|
|
||||||
|
Example of flashing this keyboard:
|
||||||
|
|
||||||
|
make bfo9000:default:avrdude
|
||||||
|
|
||||||
|
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
@ -0,0 +1,70 @@
|
|||||||
|
SRC += matrix.c \
|
||||||
|
i2c.c \
|
||||||
|
split_util.c \
|
||||||
|
serial.c
|
||||||
|
|
||||||
|
# MCU name
|
||||||
|
#MCU = at90usb1287
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Bootloader
|
||||||
|
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||||
|
# different sizes, comment this out, and the correct address will be loaded
|
||||||
|
# automatically (+60). See bootloader.mk for all options.
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
CUSTOM_MATRIX = yes
|
@ -0,0 +1,230 @@
|
|||||||
|
/*
|
||||||
|
* WARNING: be careful changing this code, it is very timing dependent
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef F_CPU
|
||||||
|
#define F_CPU 16000000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include "serial.h"
|
||||||
|
|
||||||
|
#ifdef USE_SERIAL
|
||||||
|
|
||||||
|
// Serial pulse period in microseconds. Its probably a bad idea to lower this
|
||||||
|
// value.
|
||||||
|
#define SERIAL_DELAY 24
|
||||||
|
|
||||||
|
matrix_row_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
|
||||||
|
matrix_row_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
|
||||||
|
|
||||||
|
#define ROW_MASK (((matrix_row_t)0-1)>>(8*sizeof(matrix_row_t)-MATRIX_COLS))
|
||||||
|
|
||||||
|
#define SLAVE_DATA_CORRUPT (1<<0)
|
||||||
|
volatile uint8_t status = 0;
|
||||||
|
|
||||||
|
inline static
|
||||||
|
void serial_delay(void) {
|
||||||
|
_delay_us(SERIAL_DELAY);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static
|
||||||
|
void serial_output(void) {
|
||||||
|
SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
|
||||||
|
}
|
||||||
|
|
||||||
|
// make the serial pin an input with pull-up resistor
|
||||||
|
inline static
|
||||||
|
void serial_input(void) {
|
||||||
|
SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
|
||||||
|
SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static
|
||||||
|
matrix_row_t serial_read_pin(void) {
|
||||||
|
return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static
|
||||||
|
void serial_low(void) {
|
||||||
|
SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static
|
||||||
|
void serial_high(void) {
|
||||||
|
SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void serial_master_init(void) {
|
||||||
|
serial_output();
|
||||||
|
serial_high();
|
||||||
|
}
|
||||||
|
|
||||||
|
void serial_slave_init(void) {
|
||||||
|
serial_input();
|
||||||
|
|
||||||
|
// Enable INT0
|
||||||
|
EIMSK |= _BV(INT0);
|
||||||
|
// Trigger on falling edge of INT0
|
||||||
|
EICRA &= ~(_BV(ISC00) | _BV(ISC01));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Used by the master to synchronize timing with the slave.
|
||||||
|
static
|
||||||
|
void sync_recv(void) {
|
||||||
|
serial_input();
|
||||||
|
// This shouldn't hang if the slave disconnects because the
|
||||||
|
// serial line will float to high if the slave does disconnect.
|
||||||
|
while (!serial_read_pin());
|
||||||
|
serial_delay();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Used by the slave to send a synchronization signal to the master.
|
||||||
|
static
|
||||||
|
void sync_send(void) {
|
||||||
|
serial_output();
|
||||||
|
|
||||||
|
serial_low();
|
||||||
|
serial_delay();
|
||||||
|
|
||||||
|
serial_high();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reads a byte from the serial line
|
||||||
|
static
|
||||||
|
matrix_row_t serial_read_byte(void) {
|
||||||
|
matrix_row_t byte = 0;
|
||||||
|
serial_input();
|
||||||
|
for ( uint8_t i = 0; i < MATRIX_COLS; ++i) {
|
||||||
|
byte = (byte << 1) | serial_read_pin();
|
||||||
|
serial_delay();
|
||||||
|
_delay_us(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return byte;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sends a byte with MSB ordering
|
||||||
|
static
|
||||||
|
void serial_write_byte(matrix_row_t data) {
|
||||||
|
matrix_row_t b = MATRIX_COLS;
|
||||||
|
serial_output();
|
||||||
|
while( b-- ) {
|
||||||
|
if(data & (1UL << b)) {
|
||||||
|
serial_high();
|
||||||
|
} else {
|
||||||
|
serial_low();
|
||||||
|
}
|
||||||
|
serial_delay();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// interrupt handle to be used by the slave device
|
||||||
|
ISR(SERIAL_PIN_INTERRUPT) {
|
||||||
|
sync_send();
|
||||||
|
|
||||||
|
matrix_row_t checksum = 0;
|
||||||
|
for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
|
||||||
|
serial_write_byte(serial_slave_buffer[i]);
|
||||||
|
sync_send();
|
||||||
|
checksum += ROW_MASK & serial_slave_buffer[i];
|
||||||
|
}
|
||||||
|
serial_write_byte(checksum);
|
||||||
|
sync_send();
|
||||||
|
|
||||||
|
// wait for the sync to finish sending
|
||||||
|
serial_delay();
|
||||||
|
|
||||||
|
// read the middle of pulses
|
||||||
|
_delay_us(SERIAL_DELAY/2);
|
||||||
|
|
||||||
|
matrix_row_t checksum_computed = 0;
|
||||||
|
for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
|
||||||
|
serial_master_buffer[i] = serial_read_byte();
|
||||||
|
sync_send();
|
||||||
|
checksum_computed += ROW_MASK & serial_master_buffer[i];
|
||||||
|
}
|
||||||
|
matrix_row_t checksum_received = serial_read_byte();
|
||||||
|
sync_send();
|
||||||
|
|
||||||
|
serial_input(); // end transaction
|
||||||
|
|
||||||
|
if ( checksum_computed != checksum_received ) {
|
||||||
|
status |= SLAVE_DATA_CORRUPT;
|
||||||
|
} else {
|
||||||
|
status &= ~SLAVE_DATA_CORRUPT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
bool serial_slave_DATA_CORRUPT(void) {
|
||||||
|
return status & SLAVE_DATA_CORRUPT;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copies the serial_slave_buffer to the master and sends the
|
||||||
|
// serial_master_buffer to the slave.
|
||||||
|
//
|
||||||
|
// Returns:
|
||||||
|
// 0 => no error
|
||||||
|
// 1 => slave did not respond
|
||||||
|
int serial_update_buffers(void) {
|
||||||
|
// this code is very time dependent, so we need to disable interrupts
|
||||||
|
cli();
|
||||||
|
|
||||||
|
// signal to the slave that we want to start a transaction
|
||||||
|
serial_output();
|
||||||
|
serial_low();
|
||||||
|
_delay_us(1);
|
||||||
|
|
||||||
|
// wait for the slaves response
|
||||||
|
serial_input();
|
||||||
|
serial_high();
|
||||||
|
_delay_us(SERIAL_DELAY);
|
||||||
|
|
||||||
|
// check if the slave is present
|
||||||
|
if (serial_read_pin()) {
|
||||||
|
// slave failed to pull the line low, assume not present
|
||||||
|
sei();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// if the slave is present syncronize with it
|
||||||
|
sync_recv();
|
||||||
|
|
||||||
|
matrix_row_t checksum_computed = 0;
|
||||||
|
// receive data from the slave
|
||||||
|
for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
|
||||||
|
serial_slave_buffer[i] = serial_read_byte();
|
||||||
|
sync_recv();
|
||||||
|
checksum_computed += ROW_MASK & serial_slave_buffer[i];
|
||||||
|
}
|
||||||
|
matrix_row_t checksum_received = serial_read_byte();
|
||||||
|
sync_recv();
|
||||||
|
|
||||||
|
if (checksum_computed != checksum_received) {
|
||||||
|
sei();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_row_t checksum = 0;
|
||||||
|
// send data to the slave
|
||||||
|
for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
|
||||||
|
serial_write_byte(serial_master_buffer[i]);
|
||||||
|
sync_recv();
|
||||||
|
checksum += ROW_MASK & serial_master_buffer[i];
|
||||||
|
}
|
||||||
|
serial_write_byte(checksum);
|
||||||
|
sync_recv();
|
||||||
|
|
||||||
|
// always, release the line when not in use
|
||||||
|
serial_output();
|
||||||
|
serial_high();
|
||||||
|
|
||||||
|
sei();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,27 @@
|
|||||||
|
#ifndef MY_SERIAL_H
|
||||||
|
#define MY_SERIAL_H
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
/* TODO: some defines for interrupt setup */
|
||||||
|
#define SERIAL_PIN_DDR DDRD
|
||||||
|
#define SERIAL_PIN_PORT PORTD
|
||||||
|
#define SERIAL_PIN_INPUT PIND
|
||||||
|
#define SERIAL_PIN_MASK _BV(PD0)
|
||||||
|
#define SERIAL_PIN_INTERRUPT INT0_vect
|
||||||
|
|
||||||
|
#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
|
||||||
|
#define SERIAL_MASTER_BUFFER_LENGTH 1
|
||||||
|
|
||||||
|
// Buffers for master - slave communication
|
||||||
|
extern volatile matrix_row_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
|
||||||
|
extern volatile matrix_row_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
|
||||||
|
|
||||||
|
void serial_master_init(void);
|
||||||
|
void serial_slave_init(void);
|
||||||
|
int serial_update_buffers(void);
|
||||||
|
bool serial_slave_data_corrupt(void);
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,86 @@
|
|||||||
|
#include <avr/io.h>
|
||||||
|
#include <avr/wdt.h>
|
||||||
|
#include <avr/power.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include <avr/eeprom.h>
|
||||||
|
#include "split_util.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
#include "keyboard.h"
|
||||||
|
#include "config.h"
|
||||||
|
#include "timer.h"
|
||||||
|
|
||||||
|
#ifdef USE_I2C
|
||||||
|
# include "i2c.h"
|
||||||
|
#else
|
||||||
|
# include "serial.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
volatile bool isLeftHand = true;
|
||||||
|
|
||||||
|
static void setup_handedness(void) {
|
||||||
|
#ifdef EE_HANDS
|
||||||
|
isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
|
||||||
|
#else
|
||||||
|
// I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c
|
||||||
|
#if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT)
|
||||||
|
isLeftHand = !has_usb();
|
||||||
|
#else
|
||||||
|
isLeftHand = has_usb();
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static void keyboard_master_setup(void) {
|
||||||
|
#ifdef USE_I2C
|
||||||
|
i2c_master_init();
|
||||||
|
#ifdef SSD1306OLED
|
||||||
|
matrix_master_OLED_init();
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
serial_master_init();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static void keyboard_slave_setup(void) {
|
||||||
|
timer_init();
|
||||||
|
#ifdef USE_I2C
|
||||||
|
i2c_slave_init(SLAVE_I2C_ADDRESS);
|
||||||
|
#else
|
||||||
|
serial_slave_init();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool has_usb(void) {
|
||||||
|
USBCON |= (1 << OTGPADE); //enables VBUS pad
|
||||||
|
_delay_us(5);
|
||||||
|
return (USBSTA & (1<<VBUS)); //checks state of VBUS
|
||||||
|
}
|
||||||
|
|
||||||
|
void split_keyboard_setup(void) {
|
||||||
|
setup_handedness();
|
||||||
|
|
||||||
|
if (has_usb()) {
|
||||||
|
keyboard_master_setup();
|
||||||
|
} else {
|
||||||
|
keyboard_slave_setup();
|
||||||
|
}
|
||||||
|
sei();
|
||||||
|
}
|
||||||
|
|
||||||
|
void keyboard_slave_loop(void) {
|
||||||
|
matrix_init();
|
||||||
|
|
||||||
|
while (1) {
|
||||||
|
matrix_slave_scan();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// this code runs before the usb and keyboard is initialized
|
||||||
|
void matrix_setup(void) {
|
||||||
|
split_keyboard_setup();
|
||||||
|
|
||||||
|
if (!has_usb()) {
|
||||||
|
keyboard_slave_loop();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
#ifndef SPLIT_KEYBOARD_UTIL_H
|
||||||
|
#define SPLIT_KEYBOARD_UTIL_H
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
#define SLAVE_I2C_ADDRESS 0x32
|
||||||
|
|
||||||
|
extern volatile bool isLeftHand;
|
||||||
|
|
||||||
|
// slave version of matix scan, defined in matrix.c
|
||||||
|
void matrix_slave_scan(void);
|
||||||
|
|
||||||
|
void split_keyboard_setup(void);
|
||||||
|
bool has_usb(void);
|
||||||
|
void keyboard_slave_loop(void);
|
||||||
|
|
||||||
|
void matrix_master_OLED_init (void);
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Ergodone",
|
||||||
|
"maintainer": "Yu He",
|
||||||
|
"width": 19.5,
|
||||||
|
"height": 9.375,
|
||||||
|
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_ergodox": {
|
||||||
|
"layout": [{"x":0, "y":0, "w":1.5}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, {"x":15.5, "y":0, "w":1.5}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1, "h":1.5}, {"x":9.5, "y":1, "h":1.5}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1}, {"x":15.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2, "w":1.5}, {"x":6.5, "y":2.5, "h":1.5}, {"x":9.5, "y":2.5, "h":1.5}, {"x":0, "y":3, "w":1.5}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.5}, {"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4}, {"x":3.5, "y":4}, {"x":4.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}]
|
||||||
|
},
|
||||||
|
"LAYOUT_ergodox_pretty": {
|
||||||
|
"layout": [{"x":0, "y":0, "w":1.5}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, {"x":15.5, "y":0, "w":1.5}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1, "h":1.5}, {"x":9.5, "y":1, "h":1.5}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1}, {"x":15.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2, "w":1.5}, {"x":6.5, "y":2.5, "h":1.5}, {"x":9.5, "y":2.5, "h":1.5}, {"x":0, "y":3, "w":1.5}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.5}, {"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4}, {"x":3.5, "y":4}, {"x":4.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "fc660c",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 16.5,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"x":15.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.25}, {"x":14.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6}, {"label":"Alt", "x":9.75, "y":4, "w":1.25}, {"label":"Win", "x":11, "y":4, "w":1.25}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,80 +1,15 @@
|
|||||||
#include "dactyl.h"
|
#include "dactyl.h"
|
||||||
#include "i2cmaster.h"
|
#include "i2cmaster.h"
|
||||||
|
|
||||||
|
|
||||||
bool i2c_initialized = 0;
|
|
||||||
uint8_t mcp23018_status = 0x20;
|
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
|
||||||
DDRB &= ~(1<<4); // set B(4) as input
|
|
||||||
PORTB &= ~(1<<4); // set B(4) internal pull-up disabled
|
|
||||||
|
|
||||||
// unused pins - C7, D4, D5, D7, E6
|
|
||||||
// set as input with internal pull-up enabled
|
|
||||||
DDRC &= ~(1<<7);
|
|
||||||
DDRD &= ~(1<<5 | 1<<4);
|
|
||||||
DDRE &= ~(1<<6);
|
|
||||||
PORTC |= (1<<7);
|
|
||||||
PORTD |= (1<<5 | 1<<4);
|
|
||||||
PORTE |= (1<<6);
|
|
||||||
|
|
||||||
matrix_init_user();
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t init_mcp23018(void) {
|
|
||||||
mcp23018_status = 0x20;
|
|
||||||
|
|
||||||
// I2C subsystem
|
|
||||||
|
|
||||||
if (i2c_initialized == 0) {
|
|
||||||
i2c_init(); // on pins D(1,0)
|
|
||||||
i2c_initialized = true;
|
|
||||||
_delay_ms(1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
// set pin direction
|
|
||||||
// - unused : input : 1
|
|
||||||
// - input : input : 1
|
|
||||||
// - driving : output : 0
|
|
||||||
mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
|
|
||||||
mcp23018_status = i2c_write(IODIRA); if (mcp23018_status) goto out;
|
|
||||||
mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out;
|
|
||||||
mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out;
|
|
||||||
i2c_stop();
|
|
||||||
|
|
||||||
// set pull-up
|
|
||||||
// - unused : on : 1
|
|
||||||
// - input : on : 1
|
|
||||||
// - driving : off : 0
|
|
||||||
mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
|
|
||||||
mcp23018_status = i2c_write(GPPUA); if (mcp23018_status) goto out;
|
|
||||||
mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out;
|
|
||||||
mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out;
|
|
||||||
|
|
||||||
out:
|
|
||||||
i2c_stop();
|
|
||||||
|
|
||||||
return mcp23018_status;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef SWAP_HANDS_ENABLE
|
#ifdef SWAP_HANDS_ENABLE
|
||||||
__attribute__ ((weak))
|
__attribute__ ((weak))
|
||||||
// swap-hands action needs a matrix to define the swap
|
// swap-hands action needs a matrix to define the swap
|
||||||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Left hand, matrix positions */
|
{{0,11}, {0,10}, {0,9}, {0,8}, {0,7}, {0,6}, {0,5}, {0,4}, {0,3}, {0,2}, {0,1}, {0,0}},
|
||||||
{{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}},
|
{{1,11}, {1,11}, {1,9}, {1,8}, {1,7}, {1,6}, {1,5}, {1,4}, {1,3}, {1,2}, {1,1}, {1,0}},
|
||||||
{{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}},
|
{{2,11}, {2,12}, {2,9}, {2,8}, {2,7}, {2,6}, {2,5}, {2,4}, {2,3}, {2,2}, {2,1}, {2,0}},
|
||||||
{{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}},
|
{{3,11}, {3,13}, {3,9}, {3,8}, {3,7}, {3,6}, {3,5}, {3,4}, {3,3}, {3,2}, {3,1}, {3,0}},
|
||||||
{{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}},
|
{{4,11}, {4,14}, {4,9}, {4,8}, {4,7}, {4,6}, {4,5}, {4,4}, {4,3}, {4,2}, {4,1}, {4,0}},
|
||||||
{{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}},
|
{{5,11}, {5,15}, {5,9}, {5,8}, {5,7}, {5,6}, {5,5}, {5,4}, {5,3}, {5,2}, {5,1}, {5,0}},
|
||||||
{{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}},
|
|
||||||
|
|
||||||
/* Right hand, matrix positions */
|
|
||||||
{{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}},
|
|
||||||
{{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}},
|
|
||||||
{{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}},
|
|
||||||
{{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}},
|
|
||||||
{{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}},
|
|
||||||
{{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -0,0 +1,98 @@
|
|||||||
|
# The Default Helix Layout
|
||||||
|
## 配列
|
||||||
|
|
||||||
|
### Qwerty配列
|
||||||
|
|
||||||
|
```
|
||||||
|
,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||||
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
|
||||||
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
| Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' |
|
||||||
|
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
| Shift| Z | X | C | V | B | [ | ] | N | M | , | . | / |Enter |
|
||||||
|
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
|Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
|
||||||
|
`-------------------------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
他の配列(Colemak,Dvorak)は、[readme.md](readme.md) を参照
|
||||||
|
|
||||||
|
## コンパイルの仕方
|
||||||
|
|
||||||
|
コンパイルは、qmk_firmware のトップディレクトリで行います。
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cd qmk_firmware
|
||||||
|
```
|
||||||
|
qmk_firmwareでは各キーボードのコンパイルは、`<キーボード名>:<キーマップ名>`という指定で行います。
|
||||||
|
|
||||||
|
```
|
||||||
|
$ make helix:default
|
||||||
|
```
|
||||||
|
|
||||||
|
キーボードへの書き込みまで同時に行うには下記のように`:avrdude`を付けます。
|
||||||
|
|
||||||
|
```
|
||||||
|
$ make helix:default:avrdude
|
||||||
|
```
|
||||||
|
|
||||||
|
コンパイル結果と中間生成物を消去したい場合は以下のようにします。
|
||||||
|
|
||||||
|
```
|
||||||
|
$ make helix:default:clean
|
||||||
|
```
|
||||||
|
|
||||||
|
## カスタマイズ
|
||||||
|
|
||||||
|
Helix キーボードを4行版として製作したり、オプションの OLED をつけたり、
|
||||||
|
RGB バックライトまたは、RGB Underglow をつけた場合は、
|
||||||
|
`qmk_firmware/keyboards/helix/rev2/keymaps/default/rules.mk` の以下の部分を編集して機能を有効化してください。
|
||||||
|
|
||||||
|
```
|
||||||
|
# Helix keyboard customize
|
||||||
|
# you can edit follows 5 Variables
|
||||||
|
# jp: 以下の5つの変数を必要に応じて編集します。
|
||||||
|
HELIX_ROWS = 5 # Helix Rows is 4 or 5
|
||||||
|
OLED_ENABLE = no # OLED_ENABLE
|
||||||
|
LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.)
|
||||||
|
LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
|
||||||
|
LED_ANIMATIONS = yes # LED animations
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## 4行版Helix に対応する
|
||||||
|
|
||||||
|
rules.mk の下記の部分を編集して 5 を 4 に変更してください。
|
||||||
|
|
||||||
|
```
|
||||||
|
HELIX_ROWS = 4 # Helix Rows is 4 or 5
|
||||||
|
```
|
||||||
|
|
||||||
|
## RGB バックライトを有効にする
|
||||||
|
|
||||||
|
rules.mk の下記の部分を編集して no を yes に変更してください。
|
||||||
|
|
||||||
|
```
|
||||||
|
LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.)
|
||||||
|
```
|
||||||
|
|
||||||
|
## RGB Underglow を有効にする
|
||||||
|
|
||||||
|
rules.mk の下記の部分を編集して no を yes に変更してください。
|
||||||
|
```
|
||||||
|
LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.)
|
||||||
|
```
|
||||||
|
|
||||||
|
## OLEDを有効にする
|
||||||
|
|
||||||
|
rules.mk の下記の部分を編集して no を yes に変更してください。
|
||||||
|
```
|
||||||
|
OLED_ENABLE = yes # OLED_ENABLE
|
||||||
|
```
|
||||||
|
|
||||||
|
## リンク
|
||||||
|
|
||||||
|
* さらに詳細は、[こちら helix/Doc/firmware_jp.md](https://github.com/MakotoKurauchi/helix/blob/master/Doc/firmware_jp.md)をご覧ください。
|
||||||
|
* [Helix top](https://github.com/MakotoKurauchi/helix)
|
@ -1,158 +0,0 @@
|
|||||||
#include "iris.h"
|
|
||||||
#include "action_layer.h"
|
|
||||||
#include "eeconfig.h"
|
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
|
||||||
|
|
||||||
//keycode shorthands
|
|
||||||
#define KC____ KC_TRNS
|
|
||||||
#define KC_SYM MO(3)
|
|
||||||
#define KC_MAC TO(0)
|
|
||||||
#define KC_PC TO(1)
|
|
||||||
#define KC_GM TO(2)
|
|
||||||
#define KC_NAV LT(4, KC_TAB)
|
|
||||||
#define KC_NAVPC LT(5, KC_TAB)
|
|
||||||
|
|
||||||
//text editor shortcuts for NAV and NAVPC
|
|
||||||
#define KC_AL LALT(KC_LEFT)
|
|
||||||
#define KC_AR LALT(KC_RGHT)
|
|
||||||
#define KC_CL LCTL(KC_LEFT)
|
|
||||||
#define KC_CR LCTL(KC_RGHT)
|
|
||||||
#define KC_A_BS LALT(KC_BSPC)
|
|
||||||
#define KC_C_BS LALT(KC_BSPC)
|
|
||||||
|
|
||||||
//internet browser tab shortcuts and window swapping for Mac and Windows
|
|
||||||
#define KC_GSL LGUI(S(KC_LEFT))
|
|
||||||
#define KC_GSR LGUI(S(KC_RGHT))
|
|
||||||
#define KC_CPGD LCTL(KC_PGDN)
|
|
||||||
#define KC_CPGU LCTL(KC_PGUP)
|
|
||||||
|
|
||||||
#define KC_CMBS GUI_T(KC_BSPC)
|
|
||||||
#define KC_CTBS CTL_T(KC_BSPC)
|
|
||||||
#define KC_C_TAB LCTL(KC_TAB)
|
|
||||||
#define KC_G_TAB LGUI(KC_TAB)
|
|
||||||
#define KC_A_TAB LALT(KC_TAB)
|
|
||||||
|
|
||||||
//layer shorthands
|
|
||||||
#define _COLEMAK 0
|
|
||||||
#define _PC 1
|
|
||||||
#define _GAME 2
|
|
||||||
#define _SYMBOL 3
|
|
||||||
#define _NAV 4
|
|
||||||
#define _NAVPC 5
|
|
||||||
|
|
||||||
enum {
|
|
||||||
// SFT_LCK //tapdance declarations
|
|
||||||
COLEMAK = 0,
|
|
||||||
PC,
|
|
||||||
GAME,
|
|
||||||
SYMBOL,
|
|
||||||
NAV, //Navigation layer for Mac Colemak
|
|
||||||
NAVPC, //Navigation layer for PC Colemak
|
|
||||||
SFT_LCK //tapdance declaration
|
|
||||||
};
|
|
||||||
|
|
||||||
#define KC_SFLK TD(SFT_LCK) // alias for tapdance
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
||||||
|
|
||||||
[_COLEMAK] = KC_KEYMAP(
|
|
||||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
|
||||||
ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,
|
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
||||||
GRV , Q , W , F , P , G , J , L , U , Y ,SCLN,BSPC,
|
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
|
||||||
NAV , A , R , S , T , D , H , N , E , I , O ,QUOT,
|
|
||||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
|
||||||
SFLK, Z , X , C , V , B , PC , ENT , K , M ,COMM, DOT,SLSH,RSFT,
|
|
||||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
|
||||||
LCTL,LGUI,CMBS, SPC, SYM, LALT
|
|
||||||
// `----+----+----' `----+----+----'
|
|
||||||
),
|
|
||||||
|
|
||||||
[_PC] = KC_KEYMAP(
|
|
||||||
___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ ,
|
|
||||||
|
|
||||||
___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ ,
|
|
||||||
|
|
||||||
NAVPC,___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ ,
|
|
||||||
|
|
||||||
___ , ___ , ___ , ___ , ___ , ___ , GM, ___, ___ , ___ , ___ , ___ , ___ , ___ ,
|
|
||||||
|
|
||||||
LGUI , LCTL , CTBS , ___ , ___ , ___
|
|
||||||
),
|
|
||||||
|
|
||||||
[_GAME] = KC_KEYMAP(
|
|
||||||
___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ ,
|
|
||||||
|
|
||||||
___ , T , Q , W , E , R , ___ , ___ , ___ , ___ , ___ , ___ ,
|
|
||||||
|
|
||||||
TAB , LSFT, A , S , D , F , ___ , ___ , ___ , ___ , ___ , ___ ,
|
|
||||||
|
|
||||||
I , LCTL, Z , X , C , V , M, P , ___, ___ , ___ , ___ , ___ , ___ ,
|
|
||||||
|
|
||||||
LALT , LALT , SPC, BSPC, MAC, ___
|
|
||||||
),
|
|
||||||
|
|
||||||
[_SYMBOL] = KC_KEYMAP(
|
|
||||||
|
|
||||||
___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ ,
|
|
||||||
|
|
||||||
LBRC, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , RBRC,
|
|
||||||
|
|
||||||
BSLS, EXLM, AT , HASH, DLR , PERC, CIRC, AMPR, ASTR, LPRN, RPRN, EQL ,
|
|
||||||
|
|
||||||
___ , HOME, END , VOLD, VOLU, MPLY,___, ___,___, MINS, ___ , ___ , ___ , ___ ,
|
|
||||||
|
|
||||||
___ , ___ , A_BS, ___, ___ , ___
|
|
||||||
),
|
|
||||||
|
|
||||||
[_NAV] = KC_KEYMAP(
|
|
||||||
|
|
||||||
___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ ,
|
|
||||||
|
|
||||||
___ , ___ , ___ , ___ , ___ , ___ , C_TAB, AL , UP , AR , DEL , ___ ,
|
|
||||||
|
|
||||||
___ , ___ , ___ , ___ , ___ , ___ , GSL , LEFT, DOWN, RGHT, GSR , ___ ,
|
|
||||||
|
|
||||||
___ , ___ , ___ , ___ , ___ , ___ ,___, ___,G_TAB, ___ , ___ , ___ , ___ , ___ ,
|
|
||||||
|
|
||||||
___ , ___ , ___ , ___ , ___ , ___
|
|
||||||
),
|
|
||||||
|
|
||||||
[_NAVPC] = KC_KEYMAP(
|
|
||||||
|
|
||||||
___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ ,
|
|
||||||
|
|
||||||
___ , ___ , ___ , ___ , ___ , ___ , C_TAB, CL , UP , CR , DEL , ___ ,
|
|
||||||
|
|
||||||
___ , ___ , ___ , ___ , ___ , ___ , CPGU, LEFT, DOWN, RGHT, CPGD, ___ ,
|
|
||||||
|
|
||||||
___ , ___ , ___ , ___ , ___ , ___ ,___, ___,A_TAB, ___ , ___ , ___ , ___ , ___ ,
|
|
||||||
|
|
||||||
___ , ___ , ___ , ___ , ___ , ___
|
|
||||||
),
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
// Shift vs. capslock function. From bbaserdem's Planck keymap.
|
|
||||||
void caps_tap (qk_tap_dance_state_t *state, void *user_data) {
|
|
||||||
if (state->count == 1) {
|
|
||||||
register_code (KC_LSFT);
|
|
||||||
} else if (state->count == 2) {
|
|
||||||
unregister_code (KC_LSFT);
|
|
||||||
register_code (KC_CAPS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void caps_tap_end (qk_tap_dance_state_t *state, void *user_data) {
|
|
||||||
if (state->count == 1) {
|
|
||||||
unregister_code (KC_LSFT);
|
|
||||||
} else {
|
|
||||||
unregister_code (KC_CAPS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
|
||||||
//Tap once for Shift, twice for Caps Lock
|
|
||||||
[SFT_LCK] = ACTION_TAP_DANCE_FN_ADVANCED( caps_tap, NULL, caps_tap_end)
|
|
||||||
};
|
|
@ -1,3 +0,0 @@
|
|||||||
# Colemak layout for Iris rev2.1 with Mac and Windows layers and a Gaming Layer.
|
|
||||||
# Symbol layer is based on my Planck layout, so it provides numbers, symbols, and volume controls.
|
|
||||||
# Two Navigation layers, for Mac and Windows Colemak layers respectively.
|
|
@ -1,7 +0,0 @@
|
|||||||
RGBLIGHT_ENABLE = no
|
|
||||||
BACKLIGHT_ENABLE = no
|
|
||||||
TAP_DANCE_ENABLE = yes
|
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
|
||||||
include ../../../../Makefile
|
|
||||||
endif
|
|
@ -0,0 +1,13 @@
|
|||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = yes # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
SUBPROJECT_rev1 = no
|
@ -0,0 +1,190 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2018 MechMerlin
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x0000
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Switchmod Keyboards
|
||||||
|
#define PRODUCT Meme
|
||||||
|
#define DESCRIPTION A custom 65% gasket mount keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 10
|
||||||
|
#define MATRIX_COLS 8
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { C2, D0, D1, D4, D5, D6, B0, B1, B2, B3 }
|
||||||
|
#define MATRIX_COL_PINS { D3, D2, B5, B6, C7, C6, C5, C4 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN B7
|
||||||
|
#define BACKLIGHT_BREATHING
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||||
|
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||||
|
*/
|
||||||
|
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO
|
||||||
|
*
|
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||||
|
* makefile for this to work.)
|
||||||
|
*
|
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||||
|
* until the next keyboard reset.
|
||||||
|
*
|
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||||
|
* fully operational during normal computer usage.
|
||||||
|
*
|
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||||
|
* power-up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Magic Key Options
|
||||||
|
*
|
||||||
|
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||||
|
* the keyboard. They are best used in combination with the HID Listen program,
|
||||||
|
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||||
|
*
|
||||||
|
* The options below allow the magic key functionality to be changed. This is
|
||||||
|
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP1 H
|
||||||
|
//#define MAGIC_KEY_HELP2 SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
//#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Meme",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 16,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_all": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_vanilla": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_aria": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"x":11.5, "y":4, "w":1.5}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_true": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"x":11.5, "y":4, "w":1.5}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
/* Copyright 2018 MechMerlin
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[0] = LAYOUT_all(\
|
||||||
|
KC_GESC, 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_BSLS, KC_BSPC, KC_INS,
|
||||||
|
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_DEL,
|
||||||
|
KC_RCTL, 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_PGUP,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
|
||||||
|
)
|
||||||
|
};
|
@ -0,0 +1 @@
|
|||||||
|
# The default keymap for Meme
|
@ -0,0 +1,43 @@
|
|||||||
|
/* Copyright 2018 MechMerlin
|
||||||
|
*
|
||||||
|
* 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 "meme.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// put your per-action keyboard code here
|
||||||
|
// runs for every action, just before processing by the firmware
|
||||||
|
|
||||||
|
return process_record_user(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
@ -0,0 +1,102 @@
|
|||||||
|
/* Copyright 2018 MechMerlin
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
#ifndef MEME_H
|
||||||
|
#define MEME_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT_all( \
|
||||||
|
K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07, K17, \
|
||||||
|
K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K37, \
|
||||||
|
K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56, K57, \
|
||||||
|
K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K76, K67, K77, \
|
||||||
|
K80, K90, K81, K92, K85, K95, K86, K96, K87, K97 \
|
||||||
|
)\
|
||||||
|
{\
|
||||||
|
{K00, K01, K02, K03, K04, K05, K06, K07}, \
|
||||||
|
{K10, K11, K12, K13, K14, K15, K16, K17}, \
|
||||||
|
{K20, K21, K22, K23, K24, K25, K26, KC_NO}, \
|
||||||
|
{K30, K31, K32, K33, K34, K35, K36, K37}, \
|
||||||
|
{K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \
|
||||||
|
{K50, K51, K52, K53, K54, K55, K56, K57}, \
|
||||||
|
{K60, K61, K62, K63, K64, K65, KC_NO, K67}, \
|
||||||
|
{K70, K71, K72, K73, K74, KC_NO, K76, K77}, \
|
||||||
|
{K80, K81, KC_NO, KC_NO, KC_NO, K85, K86, K87}, \
|
||||||
|
{K90, KC_NO, K92, KC_NO, KC_NO, K95, K96, K97}, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_vanilla( \
|
||||||
|
K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K07, K17, \
|
||||||
|
K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K37, \
|
||||||
|
K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56, K57, \
|
||||||
|
K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K76, K67, K77, \
|
||||||
|
K80, K90, K81, K92, K85, K95, K86, K96, K87, K97 \
|
||||||
|
)\
|
||||||
|
{\
|
||||||
|
{K00, K01, K02, K03, K04, K05, K06, K07}, \
|
||||||
|
{K10, K11, K12, K13, K14, K15, KC_NO, K17}, \
|
||||||
|
{K20, K21, K22, K23, K24, K25, K26, KC_NO}, \
|
||||||
|
{K30, K31, K32, K33, K34, K35, K36, K37}, \
|
||||||
|
{K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \
|
||||||
|
{K50, K51, K52, K53, K54, K55, K56, K57}, \
|
||||||
|
{K60, K61, K62, K63, K64, K65, KC_NO, K67}, \
|
||||||
|
{K70, K71, K72, K73, K74, KC_NO, K76, K77}, \
|
||||||
|
{K80, K81, KC_NO, KC_NO, KC_NO, K85, K86, K87}, \
|
||||||
|
{K90, KC_NO, K92, KC_NO, KC_NO, K95, K96, K97}, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_aria( \
|
||||||
|
K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K07, K17, \
|
||||||
|
K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K37, \
|
||||||
|
K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56, K57, \
|
||||||
|
K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K76, K67, K77, \
|
||||||
|
K80, K90, K81, K92, K85, K86, K96, K87, K97 \
|
||||||
|
)\
|
||||||
|
{\
|
||||||
|
{K00, K01, K02, K03, K04, K05, K06, K07}, \
|
||||||
|
{K10, K11, K12, K13, K14, K15, KC_NO, K17}, \
|
||||||
|
{K20, K21, K22, K23, K24, K25, K26, KC_NO}, \
|
||||||
|
{K30, K31, K32, K33, K34, K35, K36, K37}, \
|
||||||
|
{K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \
|
||||||
|
{K50, K51, K52, K53, K54, K55, K56, K57}, \
|
||||||
|
{K60, K61, K62, K63, K64, K65, KC_NO, K67}, \
|
||||||
|
{K70, K71, K72, K73, K74, KC_NO, K76, K77}, \
|
||||||
|
{K80, K81, KC_NO, KC_NO, KC_NO, K85, K86, K87}, \
|
||||||
|
{K90, KC_NO, K92, KC_NO, KC_NO, KC_NO, K96, K97}, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_true( \
|
||||||
|
K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07, K17, \
|
||||||
|
K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K37, \
|
||||||
|
K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56, K57, \
|
||||||
|
K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K76, K67, K77, \
|
||||||
|
K80, K90, K81, K92, K85, K86, K96, K87, K97 \
|
||||||
|
)\
|
||||||
|
{\
|
||||||
|
{K00, K01, K02, K03, K04, K05, K06, K07}, \
|
||||||
|
{K10, K11, K12, K13, K14, K15, K16, K17}, \
|
||||||
|
{K20, K21, K22, K23, K24, K25, K26, KC_NO}, \
|
||||||
|
{K30, K31, K32, K33, K34, K35, K36, K37}, \
|
||||||
|
{K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \
|
||||||
|
{K50, K51, K52, K53, K54, K55, K56, K57}, \
|
||||||
|
{K60, K61, K62, K63, K64, K65, KC_NO, K67}, \
|
||||||
|
{K70, K71, K72, K73, K74, KC_NO, K76, K77}, \
|
||||||
|
{K80, K81, KC_NO, KC_NO, KC_NO, K85, K86, K87}, \
|
||||||
|
{K90, KC_NO, K92, KC_NO, KC_NO, KC_NO, K96, K97}, \
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,15 @@
|
|||||||
|
# Meme
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
65% gasket mount keyboard.
|
||||||
|
|
||||||
|
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
|
||||||
|
Hardware Supported: Meme
|
||||||
|
Hardware Availability: [Switchmod Keyboards](http://www.switchmod.net/)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make meme:default
|
||||||
|
|
||||||
|
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
@ -0,0 +1,68 @@
|
|||||||
|
# MCU name
|
||||||
|
#MCU = at90usb1286
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||||
|
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "MF68",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 17.25,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15.25, "y":1}, {"x":16.25, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"x":15.25, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"x":14.25, "y":4}, {"x":15.25, "y":4}, {"x":16.25, "y":4}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "MF68 BLE",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 17.25,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15.25, "y":1}, {"x":16.25, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"x":15.25, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"x":14.25, "y":4}, {"x":15.25, "y":4}, {"x":16.25, "y":4}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,86 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 Danny Nguyen <danny@keeb.io>
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef REV2_CONFIG_H
|
||||||
|
#define REV2_CONFIG_H
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_CONFIG_H
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xCB10
|
||||||
|
#define PRODUCT_ID 0x1156
|
||||||
|
#define DEVICE_VER 0x0200
|
||||||
|
#define MANUFACTURER Keebio
|
||||||
|
#define PRODUCT The Nyquist Keyboard
|
||||||
|
#define DESCRIPTION Split 60 percent ortholinear keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
// Rows are doubled-up
|
||||||
|
#define MATRIX_ROWS 10
|
||||||
|
#define MATRIX_COLS 6
|
||||||
|
|
||||||
|
// wiring of each half
|
||||||
|
#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 }
|
||||||
|
#define MATRIX_COL_PINS { D2, F5, F6, F7, B1, B3 }
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* define if matrix has ghost */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* ws2812 RGB LED */
|
||||||
|
#define RGB_DI_PIN D3
|
||||||
|
#define RGBLIGHT_TIMER
|
||||||
|
#define RGBLED_NUM 16 // Number of LEDs
|
||||||
|
|
||||||
|
/* Backlight LEDs */
|
||||||
|
#define BACKLIGHT_PIN B6
|
||||||
|
#define BACKLIGHT_LEVELS 7
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
// #define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
// #define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,21 @@
|
|||||||
|
#include "rev2.h"
|
||||||
|
|
||||||
|
#ifdef SSD1306OLED
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
|
// // green led on
|
||||||
|
// DDRD |= (1<<5);
|
||||||
|
// PORTD &= ~(1<<5);
|
||||||
|
|
||||||
|
// // orange led on
|
||||||
|
// DDRB |= (1<<0);
|
||||||
|
// PORTB &= ~(1<<0);
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
};
|
@ -0,0 +1,68 @@
|
|||||||
|
#ifndef REV2_H
|
||||||
|
#define REV2_H
|
||||||
|
|
||||||
|
#include "nyquist.h"
|
||||||
|
|
||||||
|
//void promicro_bootloader_jmp(bool program);
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef USE_I2C
|
||||||
|
#include <stddef.h>
|
||||||
|
#ifdef __AVR__
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//void promicro_bootloader_jmp(bool program);
|
||||||
|
|
||||||
|
#ifndef FLIP_HALF
|
||||||
|
// Standard Keymap
|
||||||
|
// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
|
||||||
|
#define LAYOUT( \
|
||||||
|
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, \
|
||||||
|
L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ L00, L01, L02, L03, L04, L05 }, \
|
||||||
|
{ L10, L11, L12, L13, L14, L15 }, \
|
||||||
|
{ L20, L21, L22, L23, L24, L25 }, \
|
||||||
|
{ L30, L31, L32, L33, L34, L35 }, \
|
||||||
|
{ L40, L41, L42, L43, L44, L45 }, \
|
||||||
|
{ R05, R04, R03, R02, R01, R00 }, \
|
||||||
|
{ R15, R14, R13, R12, R11, R10 }, \
|
||||||
|
{ R25, R24, R23, R22, R21, R20 }, \
|
||||||
|
{ R35, R34, R33, R32, R31, R30 }, \
|
||||||
|
{ R45, R44, R43, R42, R41, R40 } \
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
// Keymap with right side flipped
|
||||||
|
// (TRRS jack on both halves are to the right)
|
||||||
|
#define LAYOUT( \
|
||||||
|
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, \
|
||||||
|
L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ L00, L01, L02, L03, L04, L05 }, \
|
||||||
|
{ L10, L11, L12, L13, L14, L15 }, \
|
||||||
|
{ L20, L21, L22, L23, L24, L25 }, \
|
||||||
|
{ L30, L31, L32, L33, L34, L35 }, \
|
||||||
|
{ L40, L41, L42, L43, L44, L45 }, \
|
||||||
|
{ R00, R01, R02, R03, R04, R05 }, \
|
||||||
|
{ R10, R11, R12, R13, R14, R15 }, \
|
||||||
|
{ R20, R21, R22, R23, R24, R25 }, \
|
||||||
|
{ R30, R31, R32, R33, R34, R35 }, \
|
||||||
|
{ R40, R41, R42, R43, R44, R45 } \
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define LAYOUT_ortho_5x12 LAYOUT
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1 @@
|
|||||||
|
BACKLIGHT_ENABLE = yes
|
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Pearl",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"bootloader": "",
|
||||||
|
"width": 13,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_all": {
|
||||||
|
"layout": [{"label":"Esc", "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":"{", "x":11, "y":0}, {"label":"Backspace", "x":12, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"A", "x":1.5, "y":1}, {"label":"S", "x":2.5, "y":1}, {"label":"D", "x":3.5, "y":1}, {"label":"F", "x":4.5, "y":1}, {"label":"G", "x":5.5, "y":1}, {"label":"H", "x":6.5, "y":1}, {"label":"J", "x":7.5, "y":1}, {"label":"K", "x":8.5, "y":1}, {"label":"L", "x":9.5, "y":1}, {"label":":", "x":10.5, "y":1}, {"label":"\\", "x":11.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, {"label":">", "x":9.75, "y":2}, {"label":"?", "x":10.75, "y":2}, {"label":"Shift", "x":11.75, "y":2, "w":1.25}, {"label":"Alt", "x":1.13, "y":3}, {"label":"Ctrl", "x":2.13, "y":3, "w":1.25}, {"label":"Win", "x":3.375, "y":3, "w":1.25}, {"label":"Shift", "x":4.625, "y":3, "w":2.25}, {"x":6.875, "y":3, "w":1.25}, {"x":8.125, "y":3, "w":1.5}, {"label":"Menu", "x":9.625, "y":3}, {"label":"Fn", "x":10.63, "y":3, "w":1.25}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_splits": {
|
||||||
|
"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":"{", "x":11, "y":0}, {"label":"}", "x":12, "y":0}, {"label":"Caps Lock", "x":0, "y":1, "w":1.5}, {"label":"A", "x":1.5, "y":1}, {"label":"S", "x":2.5, "y":1}, {"label":"D", "x":3.5, "y":1}, {"label":"F", "x":4.5, "y":1}, {"label":"G", "x":5.5, "y":1}, {"label":"H", "x":6.5, "y":1}, {"label":"J", "x":7.5, "y":1}, {"label":"K", "x":8.5, "y":1}, {"label":"L", "x":9.5, "y":1}, {"label":":", "x":10.5, "y":1}, {"label":"Enter", "x":11.5, "y":1, "w":1.5}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, {"label":">", "x":9.75, "y":2}, {"label":"?", "x":10.75, "y":2}, {"label":"Shift", "x":11.75, "y":2, "w":1.25}, {"label":"Ctrl", "x":1, "y":3}, {"label":"Win", "x":2, "y":3, "w":1.25}, {"label":"Alt", "x":3.25, "y":3, "w":1.25}, {"x":4.5, "y":3, "w":2.25}, {"label":"Alt", "x":6.75, "y":3, "w":2.75}, {"label":"Win", "x":9.5, "y":3, "w":1.25}, {"label":"Menu", "x":10.75, "y":3}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_spacebar": {
|
||||||
|
"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":"{", "x":11, "y":0}, {"label":"}", "x":12, "y":0}, {"label":"Caps Lock", "x":0, "y":1, "w":1.5}, {"label":"A", "x":1.5, "y":1}, {"label":"S", "x":2.5, "y":1}, {"label":"D", "x":3.5, "y":1}, {"label":"F", "x":4.5, "y":1}, {"label":"G", "x":5.5, "y":1}, {"label":"H", "x":6.5, "y":1}, {"label":"J", "x":7.5, "y":1}, {"label":"K", "x":8.5, "y":1}, {"label":"L", "x":9.5, "y":1}, {"label":":", "x":10.5, "y":1}, {"label":"Enter", "x":11.5, "y":1, "w":1.5}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, {"label":">", "x":9.75, "y":2}, {"label":"?", "x":10.75, "y":2}, {"label":"Shift", "x":11.75, "y":2, "w":1.25}, {"label":"Ctrl", "x":1, "y":3}, {"label":"Win", "x":2, "y":3, "w":1.25}, {"x":3.25, "y":3, "w":6.25}, {"label":"Win", "x":9.5, "y":3, "w":1.25}, {"label":"Menu", "x":10.75, "y":3}]
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,142 @@
|
|||||||
|
#include "planck.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
enum custom_layers {
|
||||||
|
_QWERTY,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_ARROW
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
ARROW
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* QWERTY
|
||||||
|
* .----------------------------------------------------------------------------------.
|
||||||
|
* | Esc | Q | W | E | R | T | Y | U | I | O | P |Enter |
|
||||||
|
* |-----+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Tab | A | S | D | F | G | H | J | K | L | ; | " |
|
||||||
|
* |-----+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* |Lshft| Z | X | C | V | B | N | M | , | . | / |Rshft |
|
||||||
|
* |-----+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* |Arrow| LCtrl| LAlt | LGui | Lower| Bspc | Space| Raise| RGui | RAlt |RCtrl | - |
|
||||||
|
* `----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_QWERTY] = {
|
||||||
|
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT},
|
||||||
|
{KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||||
|
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
|
||||||
|
{ARROW, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_MINS}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | 7 | 8 | 9 | / | \ | ` |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | | | | | | 4 | 5 | 6 | * | ( | ) |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Lshft| | | | | | 1 | 2 | 3 | - | [ | ] |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | | | LGui | | | 0 | . | = | + | { | } |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_LOWER] = {
|
||||||
|
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, KC_PSLS, KC_BSLS, KC_GRV},
|
||||||
|
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, KC_PAST, KC_LPRN, KC_RPRN},
|
||||||
|
{_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_MINS, KC_LBRC, KC_RBRC},
|
||||||
|
{XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, KC_0, KC_DOT, KC_PEQL, KC_PPLS, KC_LCBR, KC_RCBR}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | >/|| | Mute | Vol- | Vol+ | |<< | >>| | | | | | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_RAISE] = {
|
||||||
|
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
|
||||||
|
{KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
|
||||||
|
{KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
|
||||||
|
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Arrow
|
||||||
|
* ,----------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | Up | | | |
|
||||||
|
* |------+------+------+------+------+------|-----+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Left | Down |Right | | |
|
||||||
|
* |------+------+------+------+------+------|-----+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------|-----+------+------+------+------+------|
|
||||||
|
* | | | | Gui | | | | | | | | |
|
||||||
|
* `----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_ARROW] = {
|
||||||
|
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX},
|
||||||
|
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX},
|
||||||
|
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
|
||||||
|
{_______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case ARROW:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_ARROW);
|
||||||
|
} else {
|
||||||
|
layer_off(_ARROW);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
TAP_DANCE_ENABLE = no # Enable Tap Dance
|
@ -1,9 +0,0 @@
|
|||||||
#ifndef CONFIG_USER_H
|
|
||||||
|
|
||||||
#define CONFIG_USER_H
|
|
||||||
#define TAPPING_TERM 200
|
|
||||||
#include "../../config.h"
|
|
||||||
#define PERMISSIVE_HOLD
|
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,98 +0,0 @@
|
|||||||
#include "planck.h"
|
|
||||||
|
|
||||||
//alias for clarity in layering
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define A_BSPC LALT(KC_BSPC)
|
|
||||||
#define A_LEFT LALT(KC_LEFT)
|
|
||||||
#define A_RGHT LALT(KC_RGHT)
|
|
||||||
#define C_TAB LCTL(KC_TAB)
|
|
||||||
#define GSL LGUI(S(KC_LEFT))
|
|
||||||
#define GSR LGUI(S(KC_RGHT))
|
|
||||||
#define G_TAB LGUI(KC_TAB)
|
|
||||||
#define G_GRV LGUI(KC_GRV) // MAC: switch between windows within an application
|
|
||||||
#define SftEnt SFT_T(KC_ENT)
|
|
||||||
#define NAV LT(2, KC_TAB)
|
|
||||||
|
|
||||||
#define _COLEMAK 0
|
|
||||||
#define _SYMBOL 1
|
|
||||||
#define _NAVIGATION 2
|
|
||||||
|
|
||||||
//tapdance declarations
|
|
||||||
enum {
|
|
||||||
SFT_LCK
|
|
||||||
};
|
|
||||||
|
|
||||||
//alias for tapdance
|
|
||||||
#define SftLck TD(SFT_LCK)
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
||||||
|
|
||||||
/* Colemak
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | ESC` | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
|
||||||
* | Tab | A | R | S | T | D | H | N | E | I | O | " |
|
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
|
||||||
* |SftLck| Z | X | C | V | B | K | M | , | . | /? |SftEnt|
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | Del | GUI | Ctrl | Alt | GUI | Space |Symbol| Left | Down | Up |Right |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
|
|
||||||
[_COLEMAK] = {
|
|
||||||
{KC_GESC, KC_Q , KC_W , KC_F , KC_P , KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
|
|
||||||
{NAV , KC_A , KC_R , KC_S , KC_T , KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
|
|
||||||
{SftLck , KC_Z , KC_X , KC_C , KC_V , KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt },
|
|
||||||
{KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
|
||||||
},
|
|
||||||
|
|
||||||
/* Symbol
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | [ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ] |
|
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
|
||||||
* | \| | ! | @ | # | $ | % | ^ | & | * | ( | ) | =+ |
|
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
|
||||||
* | | Home | End | ScUp | ScDn | F1 | F2 | -_ |Pg Up | | / | |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | `~ | | | |Alt(Bk)| | |Pg Dn | Vol- | Vol+ | |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
[_SYMBOL] = {
|
|
||||||
{KC_LBRC, KC_1, KC_2, KC_3, KC_4 , KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC},
|
|
||||||
{KC_BSLS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL },
|
|
||||||
{_______, KC_HOME, KC_END, KC_WH_U, KC_WH_D,KC_F1 , KC_F2 , KC_MINS, KC_PGUP, _______, _______, _______},
|
|
||||||
{KC_GRV, _______, _______, _______, A_BSPC, _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_MUTE}
|
|
||||||
},
|
|
||||||
|
|
||||||
/* Navigation*/
|
|
||||||
|
|
||||||
[_NAVIGATION] = {
|
|
||||||
{_______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______},
|
|
||||||
{_______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______},
|
|
||||||
{_______, _______, _______, _______, _______, _______, G_TAB , KC_HOME, _______, KC_END, G_GRV , _______},
|
|
||||||
{RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Shift vs capslock function. From bbaserdem's Planck keymap.
|
|
||||||
void caps_tap (qk_tap_dance_state_t *state, void *user_data) {
|
|
||||||
if (state->count == 1) {
|
|
||||||
register_code (KC_LSFT);
|
|
||||||
} else if (state->count == 2) {
|
|
||||||
unregister_code (KC_LSFT);
|
|
||||||
register_code (KC_CAPS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void caps_tap_end (qk_tap_dance_state_t *state, void *user_data) {
|
|
||||||
if (state->count == 1) {
|
|
||||||
unregister_code (KC_LSFT);
|
|
||||||
} else {
|
|
||||||
unregister_code (KC_CAPS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Tap Dance Definitions
|
|
||||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
|
||||||
//Tap once for Shift, twice for Caps Lock
|
|
||||||
[SFT_LCK] = ACTION_TAP_DANCE_FN_ADVANCED( caps_tap, NULL, caps_tap_end )
|
|
||||||
};
|
|
@ -1,6 +0,0 @@
|
|||||||
TAP_DANCE_ENABLE = yes
|
|
||||||
MOUSEKEY_ENABLE = yes
|
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
|
||||||
include ../../../../Makefile
|
|
||||||
endif
|
|
@ -0,0 +1,124 @@
|
|||||||
|
#include "tada68.h"
|
||||||
|
|
||||||
|
// Layers
|
||||||
|
|
||||||
|
#define _BL 0
|
||||||
|
#define _FL 1
|
||||||
|
#define _NUM 2
|
||||||
|
#define _BSPC 3
|
||||||
|
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
// Macros
|
||||||
|
// name macros here for keymap reference
|
||||||
|
enum {
|
||||||
|
EMAIL_ADD = SAFE_RANGE,
|
||||||
|
OTHER_MACRO
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if(record->event.pressed){
|
||||||
|
switch(keycode) {
|
||||||
|
// copy these lines to define new macro
|
||||||
|
case EMAIL_ADD:
|
||||||
|
SEND_STRING("email@example.com");
|
||||||
|
return false; break;
|
||||||
|
// copy to here
|
||||||
|
case OTHER_MACRO:
|
||||||
|
SEND_STRING("The Other Macro");
|
||||||
|
return false; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Keymaps
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap _BL: (Base Layer) Default Layer
|
||||||
|
* .----------------------------------------------------------------.
|
||||||
|
* |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |~ ` |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |Home|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |End |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lft|Dwn|Rig |
|
||||||
|
* '----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_BL] = KEYMAP_ANSI(
|
||||||
|
KC_ESC, 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_BSPACE, KC_GRAVE, \
|
||||||
|
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_DELETE, \
|
||||||
|
LT(_BSPC,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_HOME, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,KC_UP,KC_END, \
|
||||||
|
KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_FL),KC_RCTRL, KC_LEFT,KC_DOWN,KC_RGHT),
|
||||||
|
|
||||||
|
|
||||||
|
/* Keymap _FL: Function Layer
|
||||||
|
* .-----------------------------------------------------------------.
|
||||||
|
* | | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Paus |
|
||||||
|
* |-----------------------------------------------------------------|
|
||||||
|
* | | | | | | | | | |BLB|BL-|BL |BL+|Foobr|ToNUM|
|
||||||
|
* |-----------------------------------------------------------------|
|
||||||
|
* |KC_NO | | | | | | | | | | |Mnu| |PgUp |
|
||||||
|
* |-----------------------------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | | |PgDn |
|
||||||
|
* |-----------------------------------------------------------------|
|
||||||
|
* |WinUl|WinLk| | | | | |Nxt|Stp|Prev |
|
||||||
|
* '-----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FL] = KEYMAP_ANSI(
|
||||||
|
_______, 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_PAUSE , \
|
||||||
|
_______,_______,_______,_______,_______,_______,_______,_______,_______,BL_BRTG,BL_DEC,BL_TOGG, BL_INC, KC_MAIL,TG(_NUM), \
|
||||||
|
XXXXXXX,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_APPLICATION, _______,KC_PGUP, \
|
||||||
|
_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_BTN1, KC_MS_U, KC_PGDOWN, \
|
||||||
|
MAGIC_UNNO_GUI,MAGIC_NO_GUI,_______, _______, _______,_______,_______,KC_MPRV,KC_MSTP, KC_MNXT),
|
||||||
|
|
||||||
|
|
||||||
|
/* Keymap _NUM: Numpad Layer
|
||||||
|
* .----------------------------------------------------------------.
|
||||||
|
* |Esc| 1 | 2 | 3 | 4 | 5 | 6 |NP7|Np8|Np9| | - | + |Backspc|CALC| 15
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Tab |NumL| up| | | |Np4|Np5|Np6| | | / | * | | | 15
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |To__BL|lft|dwn|rit| | |Np1|Np2|Np3| | | |Enter |Prsc| 14
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Shift | Z | X | C | V | |Np.|Np.|Np.| | | |msU|Rclk| 14
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Ctrl|Win |Alt | Np0 |Emal| |Lclk|msL|msD|msR | 10
|
||||||
|
* '----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_NUM] = KEYMAP_ANSI(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_P7, KC_P8, KC_P9,XXXXXXX, KC_KP_MINUS, KC_KP_PLUS, KC_BSPC,KC_CALC, \
|
||||||
|
KC_TAB,KC_NUMLOCK, KC_UP,XXXXXXX,XXXXXXX, XXXXXXX,KC_P4,KC_P5,KC_P6,XXXXXXX,XXXXXXX,KC_PSLS,KC_PAST, XXXXXXX,_______, \
|
||||||
|
TG(_NUM), KC_LEFT, KC_DOWN, KC_RIGHT,XXXXXXX,XXXXXXX,KC_P1,KC_P2,KC_P3,XXXXXXX,XXXXXXX,XXXXXXX, KC_KP_ENTER,KC_PSCREEN, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V,XXXXXXX, KC_PDOT, KC_PDOT, KC_PDOT,XXXXXXX,XXXXXXX,XXXXXXX, KC_MS_U, KC_BTN2, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT,KC_P0,EMAIL_ADD,_______,KC_BTN1,KC_MS_L,KC_MS_D, KC_MS_R),
|
||||||
|
|
||||||
|
|
||||||
|
/* Keymap _BSPC: back_SPACE Layer
|
||||||
|
* .----------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | | | | | | | | |Up | | | | | | |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | | | | | | | |Lft|Dwn|Rig|End| | | |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | | | | Backspace | |NO | | | | |
|
||||||
|
* '----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_BSPC] = KEYMAP_ANSI(
|
||||||
|
_______, _______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______,_______,_______,_______,_______,_______,_______,_______,KC_UP,_______,_______,_______, _______, _______,_______, \
|
||||||
|
_______,_______,_______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_RIGHT,KC_END,_______, _______,_______, \
|
||||||
|
_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, _______, _______, \
|
||||||
|
_______,_______,_______, KC_BSPACE, _______,XXXXXXX,_______,_______,_______, _______)
|
||||||
|
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,8 @@
|
|||||||
|
## Fezzant's Tada68 keymap
|
||||||
|
|
||||||
|
Includes easy copy-paste macro creation for strings or combo keypresses.
|
||||||
|
|
||||||
|
* Layer 0: Mostly-standard base layer, with home/end replacing pgup/pgdn.
|
||||||
|
* Layer 1: Momentary function layer, with some added buttons.
|
||||||
|
* Layer 2: Toggle numpad layer, with a layout conducive to spreadsheets and calculations
|
||||||
|
* Layer 3: Momentary function layer to put backspace on spacebar, with arrow keys on right hand homerow area.
|
@ -0,0 +1,21 @@
|
|||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = yes # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,420 @@
|
|||||||
|
#include <FastGPIO.h>
|
||||||
|
#include <TimerOne.h>
|
||||||
|
|
||||||
|
int iByte;
|
||||||
|
byte col = 0;
|
||||||
|
byte leds[12][4];
|
||||||
|
byte pass = 1;
|
||||||
|
int fadecount = 1;
|
||||||
|
const int fadelimit = 3000;
|
||||||
|
const int fadelimitshort = 1000;
|
||||||
|
byte mode = 4;
|
||||||
|
byte brightness = 2;
|
||||||
|
boolean changemode = 0;
|
||||||
|
int rain = 0;
|
||||||
|
const int rainlimit = 5000;
|
||||||
|
const int rainfade = 5000;
|
||||||
|
byte rx = 0;
|
||||||
|
byte ry = 0;
|
||||||
|
|
||||||
|
// pin[xx] on led matrix connected to nn on Arduino (-1 is dummy to make array start at pos 1)
|
||||||
|
int pins[17] = {
|
||||||
|
-1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 16, 14, 15, 18, 19, 20, 21
|
||||||
|
};
|
||||||
|
|
||||||
|
// col[xx] of leds = pin yy on led matrix
|
||||||
|
int cols[12] = {
|
||||||
|
pins[8], pins[7], pins[6], pins[5], pins[9], pins[10], pins[11], pins[12], pins[13], pins[14], pins[15], pins[16]
|
||||||
|
};
|
||||||
|
|
||||||
|
// row[xx] of leds = pin yy on led matrix
|
||||||
|
int rows[4] = {
|
||||||
|
pins[1], pins[2], pins[3], pins[4]
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#define DELAY 0
|
||||||
|
extern byte leds[12][4];
|
||||||
|
|
||||||
|
void setup() {
|
||||||
|
Serial1.begin(9600);
|
||||||
|
setupLeds();
|
||||||
|
for (int s = 0; s < 5; s++) {
|
||||||
|
for ( int r = 1; r < 9; r++) {
|
||||||
|
delayMicroseconds(65000);
|
||||||
|
delayMicroseconds(65000);
|
||||||
|
for (int j = 0; j < 4; j++) {
|
||||||
|
for (int i = 0; i < 12; i++) {
|
||||||
|
leds[i][j] = 1;
|
||||||
|
for (int p = 0; p < 25; p++) {
|
||||||
|
}
|
||||||
|
leds[i][j] = r;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for ( int r = 9; r > 0; r--) {
|
||||||
|
delayMicroseconds(65000);
|
||||||
|
delayMicroseconds(65000);
|
||||||
|
delayMicroseconds(65000);
|
||||||
|
for (int j = 0; j < 4; j++) {
|
||||||
|
for (int i = 0; i < 12; i++) {
|
||||||
|
leds[i][j] = 1;
|
||||||
|
for (int p = 0; p < 25; p++) {
|
||||||
|
}
|
||||||
|
leds[i][j] = r;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop() {
|
||||||
|
|
||||||
|
switch (mode) {
|
||||||
|
case 0:
|
||||||
|
//Blacklight
|
||||||
|
for (int i = 0; i < 12; i++) {
|
||||||
|
for (int j = 0; j < 4; j++) {
|
||||||
|
leds[i][j] = brightness;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
checkserial();
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
//Breathing
|
||||||
|
for ( int r = 1; r < 9; r++) {
|
||||||
|
checkserial();
|
||||||
|
if (changemode == 0) {
|
||||||
|
delayMicroseconds(65000);
|
||||||
|
delayMicroseconds(65000);
|
||||||
|
delayMicroseconds(65000);
|
||||||
|
for (int j = 0; j < 4; j++) {
|
||||||
|
for (int i = 0; i < 12; i++) {
|
||||||
|
leds[i][j] = 1;
|
||||||
|
for (int p = 0; p < 25; p++) {
|
||||||
|
}
|
||||||
|
leds[i][j] = r;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for ( int r = 9; r > 0; r--) {
|
||||||
|
checkserial();
|
||||||
|
if (changemode == 0) {
|
||||||
|
delayMicroseconds(65000);
|
||||||
|
delayMicroseconds(65000);
|
||||||
|
delayMicroseconds(65000);
|
||||||
|
delayMicroseconds(65000);
|
||||||
|
for (int j = 0; j < 4; j++) {
|
||||||
|
for (int i = 0; i < 12; i++) {
|
||||||
|
leds[i][j] = 1;
|
||||||
|
for (int p = 0; p < 25; p++) {
|
||||||
|
}
|
||||||
|
leds[i][j] = r;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for ( int r = 1; r < 30; r++) {
|
||||||
|
checkserial();
|
||||||
|
if (changemode == 0) {
|
||||||
|
delayMicroseconds(65000);
|
||||||
|
delayMicroseconds(65000);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
//Random
|
||||||
|
leds[random(12)][random(4)] = random(8);
|
||||||
|
delayMicroseconds(10000);
|
||||||
|
checkserial();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
//Rain
|
||||||
|
rain++;
|
||||||
|
if (rain > rainlimit) {
|
||||||
|
rain = 0;
|
||||||
|
rx = random(12);
|
||||||
|
ry = random(4);
|
||||||
|
if (leds[rx][ry] == 0) {
|
||||||
|
leds[rx][ry] = 18;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fadecount++;
|
||||||
|
if (fadecount > rainfade) {
|
||||||
|
fadecount = 1;
|
||||||
|
for (int i = 0; i < 12; i++) {
|
||||||
|
for (int j = 0; j < 4; j++) {
|
||||||
|
if (leds[i][j] > 0) {
|
||||||
|
leds[i][j] = leds[i][j] - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
checkserial();
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
//Reactive
|
||||||
|
fadecount++;
|
||||||
|
if (fadecount > fadelimit) {
|
||||||
|
fadecount = 1;
|
||||||
|
for (int i = 0; i < 12; i++) {
|
||||||
|
for (int j = 0; j < 4; j++) {
|
||||||
|
if (leds[i][j] > 0) {
|
||||||
|
leds[i][j] = leds[i][j] - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
checkserial();
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
//Reactive Target
|
||||||
|
fadecount++;
|
||||||
|
if (fadecount > fadelimitshort) {
|
||||||
|
fadecount = 1;
|
||||||
|
for (int i = 0; i < 12; i++) {
|
||||||
|
for (int j = 0; j < 4; j++) {
|
||||||
|
if (leds[i][j] > 0) {
|
||||||
|
leds[i][j] = leds[i][j] - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
checkserial();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
mode = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
changemode = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void checkserial() {
|
||||||
|
if (Serial1.available() > 0) {
|
||||||
|
iByte = Serial1.read();
|
||||||
|
if (iByte == 100) {
|
||||||
|
brightness++;
|
||||||
|
if (brightness > 9) {
|
||||||
|
brightness = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (iByte == 101) {
|
||||||
|
mode++;
|
||||||
|
}
|
||||||
|
if (iByte < 100) {
|
||||||
|
if (mode == 4) {
|
||||||
|
byte row = iByte / 16;
|
||||||
|
byte col = iByte % 16;
|
||||||
|
leds[col][row] = 18;
|
||||||
|
}
|
||||||
|
if (mode == 5) {
|
||||||
|
byte row = iByte / 16;
|
||||||
|
byte col = iByte % 16;
|
||||||
|
for (byte i = 0; i < 12; i++) {
|
||||||
|
leds[i][row] = 18;
|
||||||
|
}
|
||||||
|
for (byte p = 0; p < 4; p++) {
|
||||||
|
leds[col][p] = 18;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void setupLeds() {
|
||||||
|
// sets the pins as output
|
||||||
|
FastGPIO::Pin<2>::setOutputLow();
|
||||||
|
FastGPIO::Pin<3>::setOutputLow();
|
||||||
|
FastGPIO::Pin<4>::setOutputLow();
|
||||||
|
FastGPIO::Pin<5>::setOutputLow();
|
||||||
|
FastGPIO::Pin<6>::setOutputLow();
|
||||||
|
FastGPIO::Pin<7>::setOutputLow();
|
||||||
|
FastGPIO::Pin<8>::setOutputLow();
|
||||||
|
FastGPIO::Pin<9>::setOutputLow();
|
||||||
|
FastGPIO::Pin<10>::setOutputLow();
|
||||||
|
FastGPIO::Pin<16>::setOutputLow();
|
||||||
|
FastGPIO::Pin<14>::setOutputLow();
|
||||||
|
FastGPIO::Pin<15>::setOutputLow();
|
||||||
|
FastGPIO::Pin<18>::setOutputLow();
|
||||||
|
FastGPIO::Pin<19>::setOutputLow();
|
||||||
|
FastGPIO::Pin<20>::setOutputLow();
|
||||||
|
FastGPIO::Pin<21>::setOutputLow();
|
||||||
|
|
||||||
|
// set up Cols
|
||||||
|
FastGPIO::Pin<6>::setOutputValueLow();
|
||||||
|
FastGPIO::Pin<7>::setOutputValueLow();
|
||||||
|
FastGPIO::Pin<8>::setOutputValueLow();
|
||||||
|
FastGPIO::Pin<9>::setOutputValueLow();
|
||||||
|
FastGPIO::Pin<10>::setOutputValueLow();
|
||||||
|
FastGPIO::Pin<16>::setOutputValueLow();
|
||||||
|
FastGPIO::Pin<14>::setOutputValueLow();
|
||||||
|
FastGPIO::Pin<15>::setOutputValueLow();
|
||||||
|
FastGPIO::Pin<18>::setOutputValueLow();
|
||||||
|
FastGPIO::Pin<19>::setOutputValueLow();
|
||||||
|
FastGPIO::Pin<20>::setOutputValueLow();
|
||||||
|
FastGPIO::Pin<21>::setOutputValueLow();
|
||||||
|
|
||||||
|
// set up Rows
|
||||||
|
FastGPIO::Pin<2>::setOutputValueLow();
|
||||||
|
FastGPIO::Pin<3>::setOutputValueLow();
|
||||||
|
FastGPIO::Pin<4>::setOutputValueLow();
|
||||||
|
FastGPIO::Pin<5>::setOutputValueLow();
|
||||||
|
|
||||||
|
clearLeds();
|
||||||
|
Timer1.initialize(25);
|
||||||
|
Timer1.attachInterrupt(display);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void clearLeds() {
|
||||||
|
// Clear display array
|
||||||
|
for (int i = 0; i < 12; i++) {
|
||||||
|
for (int j = 0; j < 4; j++) {
|
||||||
|
leds[i][j] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onLeds() {
|
||||||
|
// Clear display array
|
||||||
|
for (int i = 0; i < 12; i++) {
|
||||||
|
for (int j = 0; j < 4; j++) {
|
||||||
|
leds[i][j] = 7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Interrupt routine
|
||||||
|
void display() {
|
||||||
|
|
||||||
|
switch (col) { // Turn whole previous column off
|
||||||
|
case 0:
|
||||||
|
FastGPIO::Pin<6>::setOutputValueLow();
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
FastGPIO::Pin<7>::setOutputValueLow();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
FastGPIO::Pin<8>::setOutputValueLow();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
FastGPIO::Pin<9>::setOutputValueLow();
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
FastGPIO::Pin<10>::setOutputValueLow();
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
FastGPIO::Pin<16>::setOutputValueLow();
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
FastGPIO::Pin<14>::setOutputValueLow();
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
FastGPIO::Pin<15>::setOutputValueLow();
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
FastGPIO::Pin<18>::setOutputValueLow();
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
FastGPIO::Pin<19>::setOutputValueLow();
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
FastGPIO::Pin<20>::setOutputValueLow();
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
FastGPIO::Pin<21>::setOutputValueLow();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
col++;
|
||||||
|
if (col == 12) {
|
||||||
|
col = 0;
|
||||||
|
pass++;
|
||||||
|
if (pass > 8) {
|
||||||
|
pass = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int row = 0; row < 4; row++) {
|
||||||
|
if (leds[col][row] > pass) {
|
||||||
|
switch (row) { // Turn on this led
|
||||||
|
case 0:
|
||||||
|
FastGPIO::Pin<2>::setOutputValueLow();
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
FastGPIO::Pin<3>::setOutputValueLow();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
FastGPIO::Pin<4>::setOutputValueLow();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
FastGPIO::Pin<5>::setOutputValueLow();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
switch (row) { // Turn off this led
|
||||||
|
case 0:
|
||||||
|
FastGPIO::Pin<2>::setOutputValueHigh();
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
FastGPIO::Pin<3>::setOutputValueHigh();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
FastGPIO::Pin<4>::setOutputValueHigh();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
FastGPIO::Pin<5>::setOutputValueHigh();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
switch (col) { // Turn column on
|
||||||
|
case 0:
|
||||||
|
FastGPIO::Pin<6>::setOutputValueHigh();
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
FastGPIO::Pin<7>::setOutputValueHigh();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
FastGPIO::Pin<8>::setOutputValueHigh();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
FastGPIO::Pin<9>::setOutputValueHigh();
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
FastGPIO::Pin<10>::setOutputValueHigh();
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
FastGPIO::Pin<16>::setOutputValueHigh();
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
FastGPIO::Pin<14>::setOutputValueHigh();
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
FastGPIO::Pin<15>::setOutputValueHigh();
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
FastGPIO::Pin<18>::setOutputValueHigh();
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
FastGPIO::Pin<19>::setOutputValueHigh();
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
FastGPIO::Pin<20>::setOutputValueHigh();
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
FastGPIO::Pin<21>::setOutputValueHigh();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2018 Carlos Filoteo
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x0000
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER 40percent.club
|
||||||
|
#define PRODUCT ut47
|
||||||
|
#define DESCRIPTION An awesome 40% keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 12
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS { D1, D0, D4, C6 }
|
||||||
|
#define MATRIX_COL_PINS { D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
// #define BACKLIGHT_PIN B7
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* Enable GNAP matrix serial output */
|
||||||
|
#define GNAP_ENABLE
|
||||||
|
|
||||||
|
/* USART configuration */
|
||||||
|
#ifdef __AVR_ATmega32U4__
|
||||||
|
# define SERIAL_UART_BAUD 9600
|
||||||
|
# define SERIAL_UART_DATA UDR1
|
||||||
|
# define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1)
|
||||||
|
# define SERIAL_UART_RXD_VECT USART1_RX_vect
|
||||||
|
# define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
|
||||||
|
# define SERIAL_UART_INIT() do { \
|
||||||
|
/* baud rate */ \
|
||||||
|
UBRR1L = SERIAL_UART_UBRR; \
|
||||||
|
/* baud rate */ \
|
||||||
|
UBRR1H = SERIAL_UART_UBRR >> 8; \
|
||||||
|
/* enable TX */ \
|
||||||
|
UCSR1B = _BV(TXEN1); \
|
||||||
|
/* 8-bit data */ \
|
||||||
|
UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
|
||||||
|
sei(); \
|
||||||
|
} while(0)
|
||||||
|
# else
|
||||||
|
# error "USART configuration is needed."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,24 @@
|
|||||||
|
/* Copyright 2018 Carlos Filoteo
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,88 @@
|
|||||||
|
/* Copyright 2018 Carlos Filoteo
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
#ifdef LED_ENABLE
|
||||||
|
#include "protocol/serial.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define LT3_TAB LT(3, KC_TAB)
|
||||||
|
#define MT_RSFT_ENT MT(MOD_RSFT, KC_ENT)
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
LED_TOG = SAFE_RANGE,
|
||||||
|
LED_CHG
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
LAYOUT(
|
||||||
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
LT3_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT_RSFT_ENT,
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_APP, MO(2), KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
LAYOUT(
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELETE,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
|
_______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______,
|
||||||
|
_______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
|
||||||
|
),
|
||||||
|
|
||||||
|
LAYOUT(
|
||||||
|
KC_FN6, KC_FN7, KC_FN8, KC_FN9, KC_FN10, KC_FN11, KC_FN12, KC_FN13, KC_FN14, KC_FN15, KC_FN16, KC_DELETE,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_FN17, KC_FN18, KC_FN19, KC_FN20, KC_FN21,
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
|
||||||
|
_______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
|
||||||
|
),
|
||||||
|
|
||||||
|
LAYOUT( /* Tab */
|
||||||
|
KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, _______, _______, _______, _______, _______, KC_PSCR, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, LED_TOG, LED_CHG, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
//LED keymap functions
|
||||||
|
#ifdef LED_ENABLE
|
||||||
|
void led_chmode(void) {
|
||||||
|
serial_send(101);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_toggle(void) {
|
||||||
|
serial_send(100);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
switch(keycode) {
|
||||||
|
case LED_TOG:
|
||||||
|
#ifdef LED_ENABLE
|
||||||
|
led_toggle();
|
||||||
|
#endif
|
||||||
|
return false;
|
||||||
|
case LED_CHG:
|
||||||
|
#ifdef LED_ENABLE
|
||||||
|
led_chmode();
|
||||||
|
#endif
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
#endif
|
@ -0,0 +1,19 @@
|
|||||||
|
# UT47 default keymap
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
[KLE](http://www.keyboard-layout-editor.com/##@@_y:0%3B&=Esc&=Q&=W&=E&=R&=T&=Y&=U&=I&=O&=P&_w:1.5%3B&=Back%20Space&_x:0.25&a:4&f:4&w:4&h:4&d:true%3B&=%3Cb%3EGNAP!%3C%2F%2Fb%3E%3Cp%3E%3Cp%3EMinimum%20stagger%3Cp%3E47%20key%20layout%3B&@_a:7&f:3&w:1.25%3B&=Tab&=A&=S&=D&=F&=G&=H&=J&=K&=L&=%2F%3B&_w:1.25%3B&=%27%3B&@_w:1.5%3B&=Shift&=Z&=X&=C&=V&=B&=N&=M&=,&=.&=%2F%2F&=Return%3B&@=Ctrl&=Alt&=Super&=Menu&_w:1.25%3B&=%2F&dArr%2F%3B&_w:2%3B&=&_w:1.25%3B&=%2F&uArr%2F%3B&=%2F&larr%2F%3B&=%2F&darr%2F%3B&=%2F&uarr%2F%3B&=%2F&rarr%2F%3B%3B&=undefined)
|
||||||
|
|
||||||
|
### LED Controls
|
||||||
|
|
||||||
|
Use <kbd>TAB</kbd>+<kbd>Z</kbd> to cycle through brightness (8 steps)
|
||||||
|
|
||||||
|
Use <kbd>TAB</kbd>+<kbd>X</kbd> to cycle through the following LED modes:
|
||||||
|
|
||||||
|
- solid
|
||||||
|
- breathing
|
||||||
|
- random
|
||||||
|
- rain
|
||||||
|
- reactive
|
||||||
|
- poptang
|
||||||
|
- off
|
@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.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 <avr/io.h>
|
||||||
|
#include "stdint.h"
|
||||||
|
#include "led.h"
|
||||||
|
|
||||||
|
|
||||||
|
void led_set(uint8_t usb_led)
|
||||||
|
{
|
||||||
|
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||||
|
// output low
|
||||||
|
DDRB |= (1<<0);
|
||||||
|
PORTB &= ~(1<<0);
|
||||||
|
DDRD |= (1<<5);
|
||||||
|
PORTD &= ~(1<<5);
|
||||||
|
} else {
|
||||||
|
// Hi-Z
|
||||||
|
DDRB &= ~(1<<0);
|
||||||
|
PORTB &= ~(1<<0);
|
||||||
|
DDRD &= ~(1<<5);
|
||||||
|
PORTD &= ~(1<<5);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,209 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2018 Carlos Filoteo
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* scan matrix
|
||||||
|
*/
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include "print.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
#include "protocol/serial.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef DEBOUNCE
|
||||||
|
# define DEBOUNCE 5
|
||||||
|
#endif
|
||||||
|
static uint8_t debouncing = DEBOUNCE;
|
||||||
|
|
||||||
|
/* matrix state(1:on, 0:off) */
|
||||||
|
static matrix_row_t matrix[MATRIX_ROWS];
|
||||||
|
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||||
|
|
||||||
|
static matrix_row_t read_cols(void);
|
||||||
|
static void init_cols(void);
|
||||||
|
static void unselect_rows(void);
|
||||||
|
static void select_row(uint8_t row);
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
|
uint8_t matrix_rows(void)
|
||||||
|
{
|
||||||
|
return MATRIX_ROWS;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
uint8_t matrix_cols(void)
|
||||||
|
{
|
||||||
|
return MATRIX_COLS;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init(void)
|
||||||
|
{
|
||||||
|
// initialize row and col
|
||||||
|
unselect_rows();
|
||||||
|
init_cols();
|
||||||
|
|
||||||
|
// initialize matrix state: all keys off
|
||||||
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = 0;
|
||||||
|
matrix_debouncing[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
serial_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void)
|
||||||
|
{
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
select_row(i);
|
||||||
|
_delay_us(30); // without this wait read unstable value.
|
||||||
|
matrix_row_t cols = read_cols();
|
||||||
|
if (matrix_debouncing[i] != cols) {
|
||||||
|
matrix_debouncing[i] = cols;
|
||||||
|
if (debouncing) {
|
||||||
|
debug("bounce!: "); debug_hex(debouncing); debug("\n");
|
||||||
|
}
|
||||||
|
debouncing = DEBOUNCE;
|
||||||
|
}
|
||||||
|
unselect_rows();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (debouncing) {
|
||||||
|
if (--debouncing) {
|
||||||
|
_delay_ms(1);
|
||||||
|
} else {
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = matrix_debouncing[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool matrix_is_modified(void)
|
||||||
|
{
|
||||||
|
if (debouncing) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||||
|
{
|
||||||
|
return (matrix[row] & ((matrix_row_t)1<<col));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
matrix_row_t matrix_get_row(uint8_t row)
|
||||||
|
{
|
||||||
|
return matrix[row];
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_print(void)
|
||||||
|
{
|
||||||
|
print("\nr/c 0123456789ABCDEF\n");
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
phex(row); print(": ");
|
||||||
|
pbin_reverse16(matrix_get_row(row));
|
||||||
|
print("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_key_count(void)
|
||||||
|
{
|
||||||
|
uint8_t count = 0;
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
count += bitpop16(matrix[i]);
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Column pin configuration
|
||||||
|
* col: 0 1 2 3 4 5 6 7 8 9 10 11
|
||||||
|
* pin: D7 E6 B4 B5 B6 B2 B3 B1 F7 F6 F5 F4
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void init_cols(void)
|
||||||
|
{
|
||||||
|
// Input with pull-up(DDR:0, PORT:1)
|
||||||
|
DDRF &= ~(1<<4 | 1<<5 | 1<<6 | 1<<7);
|
||||||
|
PORTF |= (1<<4 | 1<<5 | 1<<6 | 1<<7);
|
||||||
|
DDRE &= ~(1<<6);
|
||||||
|
PORTE |= (1<<6);
|
||||||
|
DDRD &= ~(1<<7);
|
||||||
|
PORTD |= (1<<7);
|
||||||
|
DDRB &= ~(1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<6);
|
||||||
|
PORTB |= (1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<6);
|
||||||
|
}
|
||||||
|
|
||||||
|
static matrix_row_t read_cols(void)
|
||||||
|
{
|
||||||
|
return (PIND&(1<<7) ? 0 : (1<<0)) |
|
||||||
|
(PINE&(1<<6) ? 0 : (1<<1)) |
|
||||||
|
(PINB&(1<<4) ? 0 : (1<<2)) |
|
||||||
|
(PINB&(1<<5) ? 0 : (1<<3)) |
|
||||||
|
(PINB&(1<<6) ? 0 : (1<<4)) |
|
||||||
|
(PINB&(1<<2) ? 0 : (1<<5)) |
|
||||||
|
(PINB&(1<<3) ? 0 : (1<<6)) |
|
||||||
|
(PINB&(1<<1) ? 0 : (1<<7)) |
|
||||||
|
(PINF&(1<<7) ? 0 : (1<<8)) |
|
||||||
|
(PINF&(1<<6) ? 0 : (1<<9)) |
|
||||||
|
(PINF&(1<<5) ? 0 : (1<<10)) |
|
||||||
|
(PINF&(1<<4) ? 0 : (1<<11));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Row pin configuration
|
||||||
|
* row: 0 1 2 3
|
||||||
|
* pin: D1 D0 D4 C6
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void unselect_rows(void)
|
||||||
|
{
|
||||||
|
// Hi-Z(DDR:0, PORT:0) to unselect
|
||||||
|
DDRD &= ~0b00010011;
|
||||||
|
PORTD &= ~0b00010011;
|
||||||
|
DDRC &= ~0b01000000;
|
||||||
|
PORTC &= ~0b01000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void select_row(uint8_t row)
|
||||||
|
{
|
||||||
|
// Output low(DDR:1, PORT:0) to select
|
||||||
|
switch (row) {
|
||||||
|
case 0:
|
||||||
|
DDRD |= (1<<1);
|
||||||
|
PORTD &= ~(1<<1);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
DDRD |= (1<<0);
|
||||||
|
PORTD &= ~(1<<0);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
DDRD |= (1<<4);
|
||||||
|
PORTD &= ~(1<<4);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
DDRC |= (1<<6);
|
||||||
|
PORTC &= ~(1<<6);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
# ut47
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Somewhere between ortholinear and standard offset. Created to have all the same functions on a Planck in a keyboard but with a more conventional keyboard row stagger.
|
||||||
|
|
||||||
|
Keyboard Maintainer: [filoxo](https://github.com/filoxo), [network_operations]
|
||||||
|
|
||||||
|
Hardware Supported: [PCB design](http://www.40percent.club/2016/10/gnap-20-plateless.html), Arduino Pro Micro
|
||||||
|
|
||||||
|
Hardware Availability: [How to order](http://www.40percent.club/2017/03/ordering-pcb.html)
|
||||||
|
|
||||||
|
### Instructions
|
||||||
|
|
||||||
|
To flash the UT47 without LEDs (single controller), run:
|
||||||
|
|
||||||
|
make ut47:default
|
||||||
|
|
||||||
|
To enable the UT47 LEDs (dual controller), run this for the main controller:
|
||||||
|
|
||||||
|
make ut47:default LED_ENABLE=yes
|
||||||
|
|
||||||
|
Or you can add `LED_ENABLE = yes` to *rules.mk*
|
||||||
|
|
||||||
|
And then flash [LED_controls.ino](LED_controls.ino) to the second controller using [Arduino IDE](https://www.arduino.cc/en/Main/Software) or similar. NOTE: Arduino IDE will require importing additional libraries to compile.
|
||||||
|
|
||||||
|
<small>The reason this is an "opt-in" feature is to prevent sending serial communication over the pin, in case it ends up being used for something else (like RGB underglow).</small>
|
||||||
|
|
||||||
|
### Layout
|
||||||
|
|
||||||
|
Go to the [default layout README](keymaps/default/readme.md) for more information.
|
||||||
|
|
||||||
|
### Additional info
|
||||||
|
|
||||||
|
Credit: Forked from [di0ib TMK version](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/gnap)
|
||||||
|
|
||||||
|
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||||
|
|
||||||
|
### Build Guide
|
||||||
|
|
||||||
|
[u/network_operations' build guide thread](https://www.reddit.com/r/MechanicalKeyboards/comments/7wqktu/gnap_the_cheap_40/)
|
@ -0,0 +1,70 @@
|
|||||||
|
# MCU name
|
||||||
|
#MCU = at90usb1286
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
# Bootloader
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# custom matrix setup
|
||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
SRC += matrix.c protocol/serial_uart.c
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||||
|
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
|
||||||
|
ifeq ($(strip $(LED_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DLED_ENABLE
|
||||||
|
SRC += led.c
|
||||||
|
endif
|
@ -0,0 +1,50 @@
|
|||||||
|
/* Copyright 2018 Carlos Filoteo
|
||||||
|
*
|
||||||
|
* 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 "ut47.h"
|
||||||
|
#ifdef LED_ENABLE
|
||||||
|
#include "protocol/serial.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// put your per-action keyboard code here
|
||||||
|
// runs for every action, just before processing by the firmware
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef LED_ENABLE
|
||||||
|
serial_send((record->event.key.row*16)+record->event.key.col);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
return process_record_user(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
/* Copyright 2018 Carlos Filoteo
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
#ifndef UT47_H
|
||||||
|
#define UT47_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K37, K38, K39, K3a, K3b \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b }, \
|
||||||
|
{ K30, K31, K32, K33, K34, KC_NO, K35, K37, K38, K39, K3a, K3b } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_kc( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K37, K38, K39, K3a, K3b \
|
||||||
|
) \
|
||||||
|
LAYOUT( \
|
||||||
|
KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0a, KC_##K0b, \
|
||||||
|
KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1a, KC_##K1b, \
|
||||||
|
KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2a, KC_##K2b, \
|
||||||
|
KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_NO,KC_##K35, KC_##K37, KC_##K38, KC_##K39, KC_##K3a, KC_##K3b \
|
||||||
|
)
|
||||||
|
|
||||||
|
#define LAYOUT_kc_ut47 LAYOUT_kc
|
||||||
|
|
||||||
|
#endif
|
@ -1,150 +0,0 @@
|
|||||||
#include "xd75.h"
|
|
||||||
|
|
||||||
//aliases for clarity in layering
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define A_BSPC LALT(KC_BSPC) // delete whole word in Mac
|
|
||||||
#define C_BSPS LCTL(KC_BSPC) // delete whole word in PC
|
|
||||||
#define A_LEFT LALT(KC_LEFT)
|
|
||||||
#define A_RGHT LALT(KC_RGHT)
|
|
||||||
#define C_RGHT LCTL(KC_RGHT)
|
|
||||||
#define C_LEFT LCTL(KC_LEFT)
|
|
||||||
#define SftEnt SFT_T(KC_ENT)
|
|
||||||
#define GBSPC LGUI_T(KC_BSPC)
|
|
||||||
#define CBSPC LCTL_T(KC_BSPC)
|
|
||||||
|
|
||||||
//internet browser tab shortcuts and window swapping for Mac and Win
|
|
||||||
#define GSL LGUI(S(KC_LEFT)) // back one tab in Safari
|
|
||||||
#define GSR LGUI(S(KC_RGHT)) // forward one tab in Safari
|
|
||||||
#define CTLPGDN LCTL(KC_PGDN) // back one tab on Windows
|
|
||||||
#define CTLPGUP LCTL(KC_PGUP) // forward one tab on Windows
|
|
||||||
#define G_TAB LGUI(KC_TAB) // MAC: switch applications
|
|
||||||
#define G_GRV LGUI(KC_GRV) // MAC: switch between windows within an application
|
|
||||||
#define A_TAB LALT(KC_TAB)
|
|
||||||
#define C_TAB LCTL(KC_TAB)
|
|
||||||
|
|
||||||
//
|
|
||||||
#define NAV LT(3, KC_TAB)
|
|
||||||
#define NAVPC LT(4, KC_TAB)
|
|
||||||
|
|
||||||
// Layer shorthand
|
|
||||||
#define _COLEMAK 0
|
|
||||||
#define _PC 1
|
|
||||||
#define _SYMBOL 2 //Function keys, numbers, symbols, Backlighting
|
|
||||||
#define _NAV 3 //Navigation Layer on Mac
|
|
||||||
#define _NAVPC 4 //Navigation Layer on Win
|
|
||||||
|
|
||||||
//tapdance declarations
|
|
||||||
enum {
|
|
||||||
SFT_LCK
|
|
||||||
};
|
|
||||||
|
|
||||||
//alias for tapdance
|
|
||||||
#define SftLck TD(SFT_LCK)
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
||||||
|
|
||||||
/* COLEMAK
|
|
||||||
* .--------------------------------------------------------------------------------------------------------------------------------------.
|
|
||||||
* | `~ | 1 | 2 | 3 | 4 | 5 | - | SWITCH | = | 6 | 7 | 8 | 9 | 0 | BACKSP |
|
|
||||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
|
||||||
* | ESC/`~ | Q | W | F | P | G | [ | \ | ] | J | L | U | Y | ; | BACKSP |
|
|
||||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
|
||||||
* | NAVTAB | A | S | D | F | G | PgUp |PlayPaus| ENTER | H | N | E | I | O | ' |
|
|
||||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
|
||||||
* |SFT/CAPS| Z | X | C | V | B | PgDn | UP | ENTER | K | M | , | . | / | SftEnt |
|
|
||||||
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------|
|
|
||||||
* | DEL | LGUI | LCTRL | LALT | LGUI | BKSPC | LEFT | DOWN | RIGHT | SPACE | SYMBOL | RGUI | RALT | RCTRL | BL |
|
|
||||||
* '--------------------------------------------------------------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
|
|
||||||
[_COLEMAK] = { /* COLEMAK */
|
|
||||||
{ KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, TG(1) , KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC },
|
|
||||||
{ KC_GESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_BSLS, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC },
|
|
||||||
{ NAV , KC_A, KC_R, KC_S, KC_T, KC_D, KC_PGUP, KC_ESC , KC_ENT , KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT },
|
|
||||||
{ SftLck , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN, KC_UP , KC_ENT , KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt },
|
|
||||||
{ KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, GBSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, MO(2) , KC_RGUI, KC_RALT, KC_RCTL, BL_STEP },
|
|
||||||
},
|
|
||||||
|
|
||||||
// Windows Layer: essentially swaps Control and GUI
|
|
||||||
|
|
||||||
[_PC] = { /* WINDOWS */
|
|
||||||
{ _______, _______, _______, _______, _______, _______, _______, TG(0) , _______, _______, _______, _______, _______, _______, _______ },
|
|
||||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
|
||||||
{ NAVPC , _______, _______, _______, _______, _______, _______, KC_MPLY, _______, _______, _______, _______, _______, _______, _______ },
|
|
||||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
|
||||||
{ _______, KC_LCTL, KC_LGUI, _______, KC_LCTL, CBSPC , _______, _______, _______, _______, _______, KC_RCTL, KC_RALT, KC_RGUI, _______ },
|
|
||||||
},
|
|
||||||
|
|
||||||
/* SYMBOL
|
|
||||||
* .--------------------------------------------------------------------------------------------------------------------------------------.
|
|
||||||
* | F12 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
|
||||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
|
||||||
* | [{ | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | }] |
|
|
||||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
|
||||||
* | | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | = |
|
|
||||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
|
||||||
* | | | | | | | | | | | -_ | | | | |
|
|
||||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
|
||||||
* | | | | | | | | | | | | | | | |
|
|
||||||
* '--------------------------------------------------------------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
|
|
||||||
[_SYMBOL] = { /* SYMBOL */
|
|
||||||
{ _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , _______, _______, _______, KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , _______},
|
|
||||||
{ KC_LBRC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , _______, _______, _______, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_RBRC},
|
|
||||||
{ _______, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL },
|
|
||||||
{ _______, BL_OFF , BL_ON , BL_DEC , BL_INC , KC_F11 , _______, _______, _______, KC_F12 , KC_MINS, _______, _______, _______, _______},
|
|
||||||
{ _______, _______, _______, _______, _______, A_BSPC , _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
[_NAV] = { /* NAVIGATION for Mac */
|
|
||||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
|
||||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______},
|
|
||||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______},
|
|
||||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, G_TAB , KC_HOME, _______, KC_END , G_GRV , _______},
|
|
||||||
{ RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
|
||||||
},
|
|
||||||
|
|
||||||
[_NAVPC] = { /* NAVIGATION FOR WINDOWS: replaces Alt with Control, GUI with Alt, and browser tab shortcuts*/
|
|
||||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
|
||||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , C_LEFT, KC_UP, C_RGHT , KC_DEL , _______},
|
|
||||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, CTLPGDN, KC_LEFT, KC_DOWN, KC_RGHT, CTLPGUP, _______},
|
|
||||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, A_TAB , KC_HOME, _______, KC_END , _______, _______},
|
|
||||||
{ RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Shift vs capslock function. From bbaserdem's Planck keymap.
|
|
||||||
void caps_tap (qk_tap_dance_state_t *state, void *user_data) {
|
|
||||||
if (state->count == 1) {
|
|
||||||
register_code (KC_LSFT);
|
|
||||||
} else if (state->count == 2) {
|
|
||||||
unregister_code (KC_LSFT);
|
|
||||||
register_code (KC_CAPS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void caps_tap_end (qk_tap_dance_state_t *state, void *user_data) {
|
|
||||||
if (state->count == 1) {
|
|
||||||
unregister_code (KC_LSFT);
|
|
||||||
} else {
|
|
||||||
unregister_code (KC_CAPS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Tap Dance Definitions
|
|
||||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
|
||||||
//Tap once for Shift, twice for Caps Lock
|
|
||||||
[SFT_LCK] = ACTION_TAP_DANCE_FN_ADVANCED( caps_tap, NULL, caps_tap_end )
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Template for future layers
|
|
||||||
[_LAYER_NAME] = {
|
|
||||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
|
||||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
|
||||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
|
||||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
|
||||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
|
||||||
}
|
|
||||||
};
|
|
||||||
*/
|
|
@ -1,4 +0,0 @@
|
|||||||
# A Colemak layout for XD75 with both Mac and Windows layers.
|
|
||||||
# These two layers share momentary toggle access to a "Symbol" layer, which is modeled after my Planck layout.
|
|
||||||
# Each of the base Colemak layers have their own Navigation layers for the right hand to use arrows and shortcuts for both text editing and web browsing.
|
|
||||||
# The rules.mk file overrides the XD75's "BACKLIGHT_ENABLE" with YES and also adds tap dance functionality.
|
|
@ -1,2 +0,0 @@
|
|||||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
|
||||||
TAP_DANCE_ENABLE = yes # Enable tap dance functionality
|
|
@ -0,0 +1,29 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#define BASE 0
|
||||||
|
#define FN 1
|
||||||
|
#define ARROWS 2
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[BASE] = LAYOUT_60_ansi(
|
||||||
|
KC_GESC, 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_BSLASH, \
|
||||||
|
KC_LCTL, 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_RSFT, \
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPACE, MO(1), KC_RALT, KC_RGUI, KC_RCTL),
|
||||||
|
|
||||||
|
[FN] = LAYOUT_60_ansi(
|
||||||
|
KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, TG(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
|
||||||
|
[ARROWS] = LAYOUT_60_ansi(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT)
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,18 @@
|
|||||||
|
MechMerlin's Standard ANSI 60% Layout
|
||||||
|
======================
|
||||||
|
|
||||||
|
This is the 60% layout used by u/merlin36, host of the [MechMerlin](www.youtube.com/mechmerlin)
|
||||||
|
YouTube channel.
|
||||||
|
|
||||||
|
It is used on his
|
||||||
|
[Duck Eagle V2](https://github.com/qmk/qmk_firmware/tree/master/keyboards/eagle_viper/v2)
|
||||||
|
[KBP V60 Type R Polestar](https://github.com/qmk/qmk_firmware/tree/master/keyboards/v60_type_r)
|
||||||
|
[NPKC KC60](https://github.com/qmk/qmk_firmware/tree/master/keyboards/kc60)
|
||||||
|
|
||||||
|
## Keymap Notes
|
||||||
|
- Highly influenced by the KBP V60 and WKL B.Face standard layouts
|
||||||
|
- Does not support any form of inswitch or underglow lighting as Merlin hates them.
|
||||||
|
- Arrow toggle switch is FN + Space
|
||||||
|
|
||||||
|
### Build
|
||||||
|
To build this keymap, simply run `make your_keyboard:mechmerlin-ansi`.
|
@ -0,0 +1,22 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_CONFIG_H
|
||||||
|
|
||||||
|
#define ENABLE_GAME_LAYER
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
|
||||||
|
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
||||||
|
K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \
|
||||||
|
) LAYOUT_60_ansi( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
|
||||||
|
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
|
||||||
|
K40, K41, K42, K45, K48, K49, K4B, K4C \
|
||||||
|
)
|
||||||
|
|
||||||
|
#endif //CONFIG_USER_H
|
@ -0,0 +1 @@
|
|||||||
|
// This space intentionally left blank
|
@ -0,0 +1 @@
|
|||||||
|
USER_NAME := talljoe
|
@ -0,0 +1,29 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#define BASE 0
|
||||||
|
#define FN 1
|
||||||
|
#define ARROWS 2
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[BASE] = LAYOUT_60_ansi_split_bs_rshift(
|
||||||
|
KC_GESC, 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_NO, 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_BSLASH, \
|
||||||
|
KC_LCTL, 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_RSFT, TG(2), \
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPACE, MO(1), KC_RALT, KC_RGUI, KC_RCTL),
|
||||||
|
|
||||||
|
[FN] = LAYOUT_60_ansi_split_bs_rshift(
|
||||||
|
KC_TRNS, 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_NO, KC_DEL, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
|
||||||
|
[ARROWS] = LAYOUT_60_ansi_split_bs_rshift(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT)
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,17 @@
|
|||||||
|
MechMerlin's Split ANSI 60% Layout
|
||||||
|
======================
|
||||||
|
|
||||||
|
This is the 60% layout with split backspace and right shift used by u/merlin36,
|
||||||
|
host of the [MechMerlin](www.youtube.com/mechmerlin) YouTube channel.
|
||||||
|
|
||||||
|
It is used on his
|
||||||
|
[Sentraq S60-X RGB](https://github.com/qmk/qmk_firmware/tree/master/keyboards/s60_x)
|
||||||
|
[MechanicalKeyboards.com FaceW](https://github.com/qmk/qmk_firmware/tree/master/keyboards/bfake)
|
||||||
|
|
||||||
|
## Keymap Notes
|
||||||
|
- Highly influenced by the KBP V60 and WKL B.Face standard layouts
|
||||||
|
- Does not support any form of inswitch or underglow lighting as Merlin hates them.
|
||||||
|
- Arrow toggle switch is the 1u key by right shift
|
||||||
|
|
||||||
|
### Build
|
||||||
|
To build this keymap, simply run `make your_keyboard:mechmerlin-split`.
|
@ -1,113 +1,89 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#ifdef KEYBOARD_zeal60
|
||||||
|
#include "config.h"
|
||||||
|
#include "zeal60.h"
|
||||||
|
#include "zeal_backlight.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "solarized.h"
|
||||||
|
#include "talljoe.h"
|
||||||
|
|
||||||
enum layers {
|
// from zeal_backlight.c
|
||||||
_BASE = 0,
|
// we want to be able to set indicators for the spacebar stabs
|
||||||
_WORKMAN,
|
// but they are not represented by a row/index.
|
||||||
_NORMAN,
|
extern zeal_backlight_config g_config;
|
||||||
_DVORAK,
|
void map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led );
|
||||||
_COLMAK,
|
|
||||||
_GAME,
|
|
||||||
_NAV,
|
|
||||||
_ADJUST,
|
|
||||||
_RESET,
|
|
||||||
};
|
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
void set_backlight_defaults(void) {
|
||||||
#define XXXXXXX KC_NO
|
uint8_t space;
|
||||||
|
uint8_t caps_lock;
|
||||||
|
map_row_column_to_led(3, 12, &caps_lock);
|
||||||
|
map_row_column_to_led(4, 7, &space);
|
||||||
|
zeal_backlight_config default_values = {
|
||||||
|
.use_split_backspace = USE_SPLIT_BACKSPACE,
|
||||||
|
.use_split_left_shift = USE_SPLIT_LEFT_SHIFT,
|
||||||
|
.use_split_right_shift = USE_SPLIT_RIGHT_SHIFT,
|
||||||
|
.use_7u_spacebar = USE_7U_SPACEBAR,
|
||||||
|
.use_iso_enter = USE_ISO_ENTER,
|
||||||
|
.disable_when_usb_suspended = 1,
|
||||||
|
.disable_after_timeout = 0,
|
||||||
|
.brightness = 255,
|
||||||
|
.effect = 10,
|
||||||
|
.color_1 = solarized.base2,
|
||||||
|
.color_2 = solarized.base02,
|
||||||
|
.caps_lock_indicator = { .index = caps_lock, .color = solarized.red },
|
||||||
|
.layer_1_indicator = { .index = space, .color = solarized.blue },
|
||||||
|
.layer_2_indicator = { .index = space, .color = solarized.yellow },
|
||||||
|
.layer_3_indicator = { .index = 254, .color = solarized.red },
|
||||||
|
.alphas_mods = {
|
||||||
|
BACKLIGHT_ALPHAS_MODS_ROW_0,
|
||||||
|
BACKLIGHT_ALPHAS_MODS_ROW_1,
|
||||||
|
BACKLIGHT_ALPHAS_MODS_ROW_2,
|
||||||
|
BACKLIGHT_ALPHAS_MODS_ROW_3,
|
||||||
|
BACKLIGHT_ALPHAS_MODS_ROW_4 }
|
||||||
|
};
|
||||||
|
memcpy(&g_config, &default_values, sizeof(zeal_backlight_config));
|
||||||
|
backlight_config_save();
|
||||||
|
|
||||||
#define NV_SPC LT(_NAV, KC_SPC)
|
solarized_t* S = &solarized;
|
||||||
#define AD_GRV LT(_ADJUST, KC_GRV)
|
HSV alphas = S->base2;
|
||||||
|
HSV custom_color_map[MATRIX_ROWS][MATRIX_COLS] = CM(
|
||||||
#define MO_NAV MO(_NAV)
|
S->red, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, S->red,
|
||||||
#define MO_ADJ MO(_ADJUST)
|
S->orange, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, S->orange,
|
||||||
#define MO_RST MO(_RESET)
|
S->green, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, S->green,
|
||||||
#define TG_ADJ TG(_ADJUST)
|
S->blue, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, S->blue, S->blue,
|
||||||
#define TG_GAME TG(_GAME)
|
S->violet, S->magenta, S->yellow, alphas, S->yellow, S->magenta, S->violet, S->green
|
||||||
#define LY_QWER DF(_BASE)
|
);
|
||||||
#define LY_WORK DF(_WORKMAN)
|
for (uint8_t row = 0; row < MATRIX_ROWS; ++row) {
|
||||||
#define LY_NRMN DF(_NORMAN)
|
for (uint8_t col = 0; col < MATRIX_COLS; ++col) {
|
||||||
#define LY_DVRK DF(_DVORAK)
|
backlight_set_key_color(row, col, custom_color_map[row][col]);
|
||||||
#define LY_CLMK DF(_COLMAK)
|
|
||||||
#define TG_NKRO MAGIC_TOGGLE_NKRO
|
|
||||||
#define KC_PTT KC_F24
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
||||||
[_BASE] = KM(
|
|
||||||
KC_ESC , 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_BSLS, KC_GRV,
|
|
||||||
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_BSPC,
|
|
||||||
KC_LCTL, 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_RSFT, AD_GRV ,
|
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, NV_SPC , KC_RALT, KC_RGUI, KC_RCTL, KC_PTT ),
|
|
||||||
[_WORKMAN] = KM(
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , KC_SCLN, _______, _______, _______,
|
|
||||||
_______, KC_A , KC_S , KC_H , KC_T , KC_G , KC_Y , KC_N , KC_E , KC_O , KC_I , _______, _______,
|
|
||||||
_______, KC_Z , KC_X , KC_M , KC_C , KC_V , KC_K , KC_L , KC_COMM, KC_DOT , KC_SLSH, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______),
|
|
||||||
[_NORMAN] = KM(
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, KC_Q , KC_W , KC_D , KC_F , KC_K , KC_J , KC_U , KC_R , KC_L , KC_SCLN, _______, _______, _______,
|
|
||||||
_______, KC_A , KC_S , KC_E , KC_T , KC_G , KC_Y , KC_N , KC_I , KC_O , KC_H , _______, _______,
|
|
||||||
_______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_P , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______),
|
|
||||||
[_DVORAK] = KM(
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______,
|
|
||||||
_______, KC_QUOT, KC_COMM, KC_DOT , KC_P , KC_Y , KC_F , KC_G , KC_C , KC_R , KC_L , KC_SLSH, KC_EQL , _______,
|
|
||||||
_______, KC_A , KC_O , KC_E , KC_U , KC_I , KC_D , KC_H , KC_T , KC_N , KC_S , KC_MINS, _______,
|
|
||||||
_______, KC_SCLN, KC_Q , KC_J , KC_K , KC_X , KC_B , KC_M , KC_W , KC_V , KC_Z , _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______),
|
|
||||||
[_COLMAK] = KM(
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, KC_Q , KC_W , KC_F , KC_P , KC_G , KC_J , KC_L , KC_U , KC_Y , KC_SCLN, _______, _______, _______,
|
|
||||||
_______, KC_A , KC_R , KC_S , KC_T , KC_D , KC_H , KC_N , KC_E , KC_I , KC_O , _______, _______,
|
|
||||||
_______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_K , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______),
|
|
||||||
[_GAME] = KM(
|
|
||||||
KC_ESC , 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_BSLS, KC_GRV,
|
|
||||||
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_BSPC,
|
|
||||||
MO_NAV , 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_RSFT, MO_ADJ ,
|
|
||||||
KC_LCTL, KC_PTT , KC_PGDN, KC_SPC , KC_RALT, KC_RGUI, KC_RCTL, KC_PTT ),
|
|
||||||
[_NAV] = KM(
|
|
||||||
KC_GRV , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
|
||||||
XXXXXXX, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_VOLU, KC_INS , KC_PGUP, KC_UP , KC_PGDN, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL ,
|
|
||||||
XXXXXXX, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_MUTE, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , XXXXXXX, TG_ADJ ,
|
|
||||||
KC_LSFT, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_VOLD, KC_END , KC_PGDN, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, XXXXXXX,
|
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, _______, KC_RALT, KC_RGUI, KC_RCTL, _______),
|
|
||||||
// Adjust layer is on the split-shift key; or NAV+Enter (for non-split keyboards)
|
|
||||||
[_ADJUST] = KM(
|
|
||||||
MO_RST , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG_ADJ ,
|
|
||||||
TG_NKRO, LY_QWER, LY_WORK, LY_NRMN, LY_DVRK, LY_CLMK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG_GAME, XXXXXXX, XXXXXXX,
|
|
||||||
MO_RST , AG_NORM, AG_SWAP, BL_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, KC_CAPS),
|
|
||||||
// To Reset hit FN + ` + Esc
|
|
||||||
[_RESET] = KM(
|
|
||||||
RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
|
||||||
RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX),
|
|
||||||
};
|
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
|
||||||
#ifdef KEYBOARD_gh60
|
|
||||||
if (IS_LAYER_ON(_GAME)) {
|
|
||||||
gh60_wasd_leds_on();
|
|
||||||
} else {
|
|
||||||
gh60_wasd_leds_off();
|
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
if (!eeconfig_is_enabled()) {
|
static uint8_t last_effect;
|
||||||
eeconfig_init();
|
switch (keycode) {
|
||||||
|
case DFAULTS:
|
||||||
|
if (IS_PRESSED(record->event)) set_backlight_defaults();
|
||||||
|
return false;
|
||||||
|
case BL_TOGG:
|
||||||
|
if (IS_PRESSED(record->event)) {
|
||||||
|
if (g_config.effect) {
|
||||||
|
last_effect = g_config.effect;
|
||||||
|
g_config.effect = 0;
|
||||||
|
} else {
|
||||||
|
g_config.effect = last_effect;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case EFFECT...EFFECT_END:
|
||||||
|
if (IS_PRESSED(record->event)) {
|
||||||
|
uint8_t effect = keycode - EFFECT;
|
||||||
|
g_config.effect = effect;
|
||||||
|
backlight_config_save();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t default_layer_state_set_kb(uint32_t state) {
|
return true;
|
||||||
// persist changes to default layers
|
}
|
||||||
eeconfig_update_default_layer(state);
|
#endif
|
||||||
return state;
|
|
||||||
}
|
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
Pins used by Ergodox EZ
|
||||||
|
|
||||||
|
Column Pins: F0 F1 F4 F5 F6 F7
|
||||||
|
Row Pins : B0 B1 B2 B3 D2 D3 C6
|
||||||
|
LEDs : D6 B5 B6 B7
|
||||||
|
:
|
@ -1,7 +1,9 @@
|
|||||||
TAP_DANCE_ENABLE = yes
|
TAP_DANCE_ENABLE = yes
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
RGBLIGHT_ENABLE = yes
|
ifeq ($(strip $(KEYBOARD)), ergodox_ez)
|
||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
|
endif
|
||||||
CONSOLE_ENABLE = no
|
CONSOLE_ENABLE = no
|
||||||
BOOTMAGIC_ENABLE = yes
|
BOOTMAGIC_ENABLE = yes
|
||||||
|
|
||||||
|
@ -0,0 +1,22 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_CONFIG_H
|
||||||
|
#define SPACE_COUNT 3
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
|
||||||
|
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
||||||
|
K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \
|
||||||
|
) \
|
||||||
|
LAYOUT_ortho_4x12( \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1D, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
|
||||||
|
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
|
||||||
|
K40, K41, K0D, K42, K44, K45, K45, K46, K48, K49, K4B, K4C \
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
#endif //CONFIG_USER_H
|
@ -0,0 +1 @@
|
|||||||
|
// This space intentionally left blank
|
@ -0,0 +1,72 @@
|
|||||||
|
#include "audio.h"
|
||||||
|
#include "process_clicky.h"
|
||||||
|
|
||||||
|
#ifdef AUDIO_CLICKY
|
||||||
|
|
||||||
|
#ifdef AUDIO_CLICKY_ON
|
||||||
|
bool clicky_enable = true;
|
||||||
|
#else // AUDIO_CLICKY_ON
|
||||||
|
bool clicky_enable = false;
|
||||||
|
#endif // AUDIO_CLICKY_ON
|
||||||
|
#ifndef AUDIO_CLICKY_FREQ_DEFAULT
|
||||||
|
#define AUDIO_CLICKY_FREQ_DEFAULT 440.0f
|
||||||
|
#endif // !AUDIO_CLICKY_FREQ_DEFAULT
|
||||||
|
#ifndef AUDIO_CLICKY_FREQ_MIN
|
||||||
|
#define AUDIO_CLICKY_FREQ_MIN 65.0f
|
||||||
|
#endif // !AUDIO_CLICKY_FREQ_MIN
|
||||||
|
#ifndef AUDIO_CLICKY_FREQ_MAX
|
||||||
|
#define AUDIO_CLICKY_FREQ_MAX 1500.0f
|
||||||
|
#endif // !AUDIO_CLICKY_FREQ_MAX
|
||||||
|
#ifndef AUDIO_CLICKY_FREQ_FACTOR
|
||||||
|
#define AUDIO_CLICKY_FREQ_FACTOR 1.18921f
|
||||||
|
#endif // !AUDIO_CLICKY_FREQ_FACTOR
|
||||||
|
#ifndef AUDIO_CLICKY_FREQ_RANDOMNESS
|
||||||
|
#define AUDIO_CLICKY_FREQ_RANDOMNESS 0.05f
|
||||||
|
#endif // !AUDIO_CLICKY_FREQ_RANDOMNESS
|
||||||
|
|
||||||
|
float clicky_freq = AUDIO_CLICKY_FREQ_DEFAULT;
|
||||||
|
float clicky_song[][2] = {{AUDIO_CLICKY_FREQ_DEFAULT, 3}, {AUDIO_CLICKY_FREQ_DEFAULT, 1}}; // 3 and 1 --> durations
|
||||||
|
|
||||||
|
#ifndef NO_MUSIC_MODE
|
||||||
|
extern bool music_activated;
|
||||||
|
extern bool midi_activated;
|
||||||
|
#endif // !NO_MUSIC_MODE
|
||||||
|
|
||||||
|
void clicky_play(void) {
|
||||||
|
#ifndef NO_MUSIC_MODE
|
||||||
|
if (music_activated || midi_activated) return;
|
||||||
|
#endif // !NO_MUSIC_MODE
|
||||||
|
clicky_song[0][0] = 2.0f * clicky_freq * (1.0f + AUDIO_CLICKY_FREQ_RANDOMNESS * ( ((float)rand()) / ((float)(RAND_MAX)) ) );
|
||||||
|
clicky_song[1][0] = clicky_freq * (1.0f + AUDIO_CLICKY_FREQ_RANDOMNESS * ( ((float)rand()) / ((float)(RAND_MAX)) ) );
|
||||||
|
PLAY_SONG(clicky_song);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_clicky(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if (keycode == CLICKY_TOGGLE && record->event.pressed) { clicky_enable = !clicky_enable; }
|
||||||
|
|
||||||
|
if (keycode == CLICKY_RESET && record->event.pressed) { clicky_freq = AUDIO_CLICKY_FREQ_DEFAULT; }
|
||||||
|
|
||||||
|
if (keycode == CLICKY_UP && record->event.pressed) {
|
||||||
|
float new_freq = clicky_freq * AUDIO_CLICKY_FREQ_FACTOR;
|
||||||
|
if (new_freq < AUDIO_CLICKY_FREQ_MAX) {
|
||||||
|
clicky_freq = new_freq;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (keycode == CLICKY_TOGGLE && record->event.pressed) {
|
||||||
|
float new_freq = clicky_freq / AUDIO_CLICKY_FREQ_FACTOR;
|
||||||
|
if (new_freq > AUDIO_CLICKY_FREQ_MIN) {
|
||||||
|
clicky_freq = new_freq;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ( clicky_enable ) {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
clicky_play();;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif //AUDIO_CLICKY
|
@ -0,0 +1,7 @@
|
|||||||
|
#ifndef PROCESS_CLICKY_H
|
||||||
|
#define PROCESS_CLICKY_H
|
||||||
|
|
||||||
|
void clicky_play(void);
|
||||||
|
bool process_clicky(uint16_t keycode, keyrecord_t *record);
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,9 @@
|
|||||||
|
#ifndef USERSPACE_CONFIG_H
|
||||||
|
#define USERSPACE_CONFIG_H
|
||||||
|
|
||||||
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
#define IGNORE_MOD_TAP_INTERRUPT
|
||||||
|
|
||||||
|
#define RESET_LAYER 15
|
||||||
|
|
||||||
|
#endif // !USERSPACE_CONFIG_H
|
@ -0,0 +1,7 @@
|
|||||||
|
Copyright 2018 Joe Wasson <info@talljoe.com> @talljoe
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@ -0,0 +1,3 @@
|
|||||||
|
SRC += talljoe.c
|
||||||
|
|
||||||
|
EXTRAFLAGS+=-flto
|
@ -0,0 +1,124 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#include "talljoe.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
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_BSLS, KC_ESC,
|
||||||
|
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_BSPC,
|
||||||
|
US_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G , KC_H, KC_J, KC_K, KC_L, KC_SCLN, US_QUOT, US_ENT ,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B , KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO_ADJ ,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC2, KC_SPC1, KC_SPC3, KC_RALT, KC_APP , KC_RCTL, KC_PTT ),
|
||||||
|
[_WORKMAN] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , KC_SCLN, _______, _______, _______,
|
||||||
|
_______, KC_A , KC_S , KC_H , KC_T , KC_G , KC_Y , KC_N , KC_E , KC_O , KC_I , _______, _______,
|
||||||
|
_______, KC_Z , KC_X , KC_M , KC_C , KC_V , KC_K , KC_L , KC_COMM, KC_DOT , KC_SLSH, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||||
|
[_NORMAN] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, KC_Q , KC_W , KC_D , KC_F , KC_K , KC_J , KC_U , KC_R , KC_L , KC_SCLN, _______, _______, _______,
|
||||||
|
_______, KC_A , KC_S , KC_E , KC_T , KC_G , KC_Y , KC_N , KC_I , KC_O , KC_H , _______, _______,
|
||||||
|
_______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_P , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||||
|
[_DVORAK] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______,
|
||||||
|
_______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y , KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL , _______,
|
||||||
|
_______, KC_A, KC_O, KC_E, KC_U, KC_I , KC_D, KC_H, KC_T, KC_N, KC_S, US_MINS, _______,
|
||||||
|
_______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X , KC_B, KC_M, KC_W, KC_V, KC_Z, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||||
|
[_COLMAK] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, KC_Q, KC_W, KC_F, KC_P, KC_G , KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, _______, _______,
|
||||||
|
_______, KC_A, KC_R, KC_S, KC_T, KC_D , KC_H, KC_N, KC_E, KC_I, KC_O , _______, _______,
|
||||||
|
_______, KC_Z, KC_X, KC_C, KC_V, KC_B , KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||||
|
|
||||||
|
#ifdef ENABLE_GAME_LAYER
|
||||||
|
[_GAME] = LAYOUT(
|
||||||
|
KC_ESC , 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_BSLS, KC_GRV,
|
||||||
|
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_BSPC,
|
||||||
|
MO_NAV , 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_RSFT, MO_ADJ ,
|
||||||
|
KC_LCTL, KC_PTT , KC_PGDN, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_APP , KC_RCTL, KC_PTT ),
|
||||||
|
#endif
|
||||||
|
[_NAV] = LAYOUT(
|
||||||
|
KC_GRV , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
KC_TAB , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_VOLU, KC_INS , KC_PGUP, KC_UP , KC_PGDN, KC_BTN1, KC_BTN2, KC_BTN3, KC_DEL ,
|
||||||
|
US_CAPS, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_MUTE, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , KC_RCTL, TG_ADJ ,
|
||||||
|
KC_LSFT, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_VOLD, KC_END , KC_PGDN, KC_WBAK, KC_WFWD, KC_WREF, KC_RSFT, XXXXXXX,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, NV_SPC2, NV_SPC1, NV_SPC3, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT ),
|
||||||
|
[_NUM] = LAYOUT(
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, XXXXXXX, KC_DEL ,
|
||||||
|
US_CAPS, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_PPLS, KC_PENT, XXXXXXX,
|
||||||
|
KC_LSFT, KC_EQL, KC_PLUS, KC_BSLS, KC_PIPE, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_PAST, KC_PSLS, XXXXXXX,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, NM_SPC2, NM_SPC1, NM_SPC3, KC_PDOT, KC_PCMM, KC_RCTL, KC_PTT ),
|
||||||
|
// Adjust layer is on the split-shift key; or NAV+Enter (for non-split keyboards)
|
||||||
|
[_ADJUST] = LAYOUT(
|
||||||
|
MO_RST , FX(1) , FX(2) , FX(3) , FX(4) , FX(5) , FX(6) , FX(7) , FX(8) , FX(9) , FX(10) , BR_DEC , BR_INC , XXXXXXX, MO_RST ,
|
||||||
|
XXXXXXX, H1_INC , S1_INC , H2_INC , S2_INC , EF_INC , RGB_HUI, RGB_SAI, RGB_MOD, RGB_M_P, DFAULTS, RGB_VAD, RGB_VAI, KC_DEL ,
|
||||||
|
XXXXXXX, H1_DEC , S1_DEC , H2_DEC , S2_DEC , EF_DEC , RGB_HUD, RGB_SAD, RGB_RMOD,RGB_M_K, RGB_M_B, RGB_M_G, TG_ADJ ,
|
||||||
|
TG_NKRO, LY_QWER, LY_WORK, LY_NRMN, LY_DVRK, LY_CLMK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MAKE, KC_CAPS, XXXXXXX,
|
||||||
|
MO_RST , AG_NORM, AG_SWAP, XXXXXXX, BL_TOGG, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, TG_GAME),
|
||||||
|
// To Reset hit FN + ` + Esc
|
||||||
|
[_RESET] = LAYOUT(
|
||||||
|
RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET ,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
RESET , XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX),
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
#ifdef KEYBOARD_gh60
|
||||||
|
if (IS_LAYER_ON(_GAME)) {
|
||||||
|
gh60_wasd_leds_on();
|
||||||
|
} else {
|
||||||
|
gh60_wasd_leds_off();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
if (!eeconfig_is_enabled()) {
|
||||||
|
eeconfig_init();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t default_layer_state_set_kb(uint32_t state) {
|
||||||
|
// persist changes to default layers
|
||||||
|
eeconfig_update_default_layer(state);
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// If console is enabled, it will print the matrix position and status of each key pressed
|
||||||
|
#ifdef CONSOLE_ENABLE
|
||||||
|
xprintf("KL: row: %u, column: %u, pressed: %u\n", record->event.key.row, record->event.key.col, record->event.pressed);
|
||||||
|
#endif //CONSOLE_ENABLE
|
||||||
|
|
||||||
|
switch (keycode) {
|
||||||
|
case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
|
||||||
|
if (!record->event.pressed) {
|
||||||
|
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP
|
||||||
|
|
||||||
|
#if defined(BOOTLOADER_HALFKAY)
|
||||||
|
":teensy"
|
||||||
|
#elif defined(BOOTLOADER_CATERINA)
|
||||||
|
":avrdude"
|
||||||
|
#else
|
||||||
|
":dfu"
|
||||||
|
#endif
|
||||||
|
SS_TAP(X_ENTER));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return process_record_keymap(keycode, record);
|
||||||
|
}
|
@ -0,0 +1,108 @@
|
|||||||
|
#ifndef USERSPACE
|
||||||
|
#define USERSPACE
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
enum userspace_custom_keycodes {
|
||||||
|
KC_MAKE = SAFE_RANGE, // can always be here
|
||||||
|
DFAULTS,
|
||||||
|
TOGGLE_BACKLIGHT,
|
||||||
|
EFFECT,
|
||||||
|
EFFECT_END = EFFECT + 10
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifndef RESET_LAYER
|
||||||
|
#define RESET_LAYER 15
|
||||||
|
#endif
|
||||||
|
|
||||||
|
enum layers {
|
||||||
|
_BASE = 0,
|
||||||
|
_WORKMAN,
|
||||||
|
_NORMAN,
|
||||||
|
_DVORAK,
|
||||||
|
_COLMAK,
|
||||||
|
_GAME,
|
||||||
|
_NAV,
|
||||||
|
_NUM,
|
||||||
|
_ADJUST,
|
||||||
|
_RESET = RESET_LAYER,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
#define MO_NAV MO(_NAV)
|
||||||
|
#define MO_ADJ MO(_ADJUST)
|
||||||
|
#define MO_RST MO(_RESET)
|
||||||
|
#define TG_ADJ TG(_ADJUST)
|
||||||
|
#ifdef ENABLE_GAME_LAYER
|
||||||
|
#define TG_GAME TG(_GAME)
|
||||||
|
#else
|
||||||
|
#define TG_GAME KC_NO
|
||||||
|
#endif
|
||||||
|
#define LY_QWER DF(_BASE)
|
||||||
|
#define LY_WORK DF(_WORKMAN)
|
||||||
|
#define LY_NRMN DF(_NORMAN)
|
||||||
|
#define LY_DVRK DF(_DVORAK)
|
||||||
|
#define LY_CLMK DF(_COLMAK)
|
||||||
|
#define TG_NKRO MAGIC_TOGGLE_NKRO
|
||||||
|
#define KC_PTT KC_F24
|
||||||
|
#define MS_MID KC_MS_BTN3
|
||||||
|
#define FX(x) (EFFECT + x)
|
||||||
|
|
||||||
|
#define US_CAPS CTL_T(KC_ESC)
|
||||||
|
#define US_QUOT RCTL_T(KC_QUOT)
|
||||||
|
#define US_MINS RCTL_T(KC_QUOT)
|
||||||
|
#define US_ENT LT(_NUM, KC_ENT)
|
||||||
|
|
||||||
|
#ifndef SPACE_COUNT
|
||||||
|
#define SPACE_COUNT 1
|
||||||
|
#endif
|
||||||
|
#if (SPACE_COUNT == 1)
|
||||||
|
#define KC_SPC1 LT(_NAV, KC_SPC)
|
||||||
|
#define KC_SPC2 XXXXXXX
|
||||||
|
#define KC_SPC3 XXXXXXX
|
||||||
|
|
||||||
|
#define NV_SPC1 _______
|
||||||
|
#define NV_SPC2 _______
|
||||||
|
#define NV_SPC3 _______
|
||||||
|
|
||||||
|
#define NM_SPC1 _______
|
||||||
|
#define NM_SPC2 _______
|
||||||
|
#define NM_SPC3 _______
|
||||||
|
#elif (SPACE_COUNT == 3)
|
||||||
|
#define KC_SPC1 KC_BSPC
|
||||||
|
#define KC_SPC2 LT(_NUM,KC_ENT)
|
||||||
|
#define KC_SPC3 LT(_NAV,KC_SPC)
|
||||||
|
|
||||||
|
#define NV_SPC1 KC_SPC
|
||||||
|
#define NV_SPC2 C_S_T(KC_ENT)
|
||||||
|
#define NV_SPC3 KC_SPC
|
||||||
|
|
||||||
|
#define NM_SPC2 XXXXXXX
|
||||||
|
#define NM_SPC1 KC_SPC
|
||||||
|
#define NM_SPC3 KC_0
|
||||||
|
#else
|
||||||
|
#error "Unsupported space count:" SPACE_COUNT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ZEAL_RGB
|
||||||
|
#define BR_INC KC_NO
|
||||||
|
#define BR_DEC KC_NO
|
||||||
|
#define EF_INC KC_NO
|
||||||
|
#define EF_DEC KC_NO
|
||||||
|
#define ES_INC KC_NO
|
||||||
|
#define ES_DEC KC_NO
|
||||||
|
#define H1_INC KC_NO
|
||||||
|
#define H1_DEC KC_NO
|
||||||
|
#define S1_INC KC_NO
|
||||||
|
#define S1_DEC KC_NO
|
||||||
|
#define H2_INC KC_NO
|
||||||
|
#define H2_DEC KC_NO
|
||||||
|
#define S2_INC KC_NO
|
||||||
|
#define S2_DEC KC_NO
|
||||||
|
#define FN_MO13 KC_NO
|
||||||
|
#define FN_MO2 KC_NO
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in new issue