diff options
Diffstat (limited to 'keyboards/handwired')
133 files changed, 3516 insertions, 1459 deletions
diff --git a/keyboards/handwired/2x5keypad/keymaps/default/keymap.c b/keyboards/handwired/2x5keypad/keymaps/default/keymap.c index 91a0e28f6..23614a9b7 100644 --- a/keyboards/handwired/2x5keypad/keymaps/default/keymap.c +++ b/keyboards/handwired/2x5keypad/keymaps/default/keymap.c @@ -143,7 +143,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { turn_off_leds(); - switch (biton32(state)) + switch (get_highest_layer(state)) { case NORMAL_LAYER: break; diff --git a/keyboards/handwired/aek64/config.h b/keyboards/handwired/aek64/config.h index 45ce6665b..7d235358c 100644 --- a/keyboards/handwired/aek64/config.h +++ b/keyboards/handwired/aek64/config.h @@ -27,27 +27,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define PRODUCT AEK64 #define DESCRIPTION QMK keyboard firmware for AEK64 handwired +/* Define the backlight */ +/*#define BACKLIGHT_ON_STATE 1*/ + /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 14 // Originally made for a Teensy 2++ -#define MATRIX_COL_PINS { F0, E6, E7, B0, B1, B2, B3, B4, B5, B6, B7, D0, D1, D2 } +#define MATRIX_COL_PINS { F0, E6, E7, B0, B1, B2, B3, B4, B5, B6, D3, D0, D1, D2 } #define MATRIX_ROW_PINS { E0, E1, C0, C1, C2 } #define UNUSED_PINS -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 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 - /* Enable the space-cadet options */ #define RSPC_KEYS KC_RSFT, KC_TRNS, KC_PGUP #define RCPC_KEYS KC_RCTL, KC_TRNS, KC_PGDOWN @@ -59,20 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define COMBO_COUNT 1 -/* - * 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 +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 diff --git a/keyboards/handwired/aek64/keymaps/4sstylz/keycodes.h b/keyboards/handwired/aek64/keymaps/4sstylz/keycodes.h new file mode 100644 index 000000000..9898fe0df --- /dev/null +++ b/keyboards/handwired/aek64/keymaps/4sstylz/keycodes.h @@ -0,0 +1,85 @@ +/* + * DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + * Version 2, December 2004 + * + * Copyright (C) 2019 4sStylZ <4sstylz@protonmail.ch> + * + * Everyone is permitted to copy and distribute verbatim or modified + * copies of this license document, and changing it is allowed as long + * as the name is changed. + * + * DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + * TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + * + * 0. You just DO WHAT THE FUCK YOU WANT TO. + */ +#include QMK_KEYBOARD_H + +/** + * Macro for selecting all the text in the document. + * Usual shortcut : Ctrl+A. + * + * @param keyrecord_t *record + * + * @return void + */ +void select_all(keyrecord_t *record) { + if (record->event.pressed) { + register_code(KC_LCTL); + tap_code(KC_A); + unregister_code(KC_LCTL); + } +} + +/** + * Macro for selecting the current row. + * + * @param keyrecord_t *record + * + * @return void + */ +void select_row(keyrecord_t *record) { + if (record->event.pressed) { + tap_code(KC_HOME); + register_code(KC_LSFT); + tap_code(KC_END); + unregister_code(KC_LSFT); + } +} + +/** + * Macro for selecting the current word. + * Usage : You need to have the cursor into the word or directly at the right. + * + * + * Usual shortcut : Ctrl+A. + * + * @param keyrecord_t *record + * + * @return void + */ +void select_word(keyrecord_t *record) { + if (record->event.pressed) { + register_code(KC_LCTL); + tap_code(KC_LEFT); + register_code(KC_LSFT); + tap_code(KC_RIGHT); + unregister_code(KC_LSFT); + unregister_code(KC_LCTL); + } +} + +/** + * Macro for inserting two 0 with keypad. + * Be carefull to have the keypad lock enabled + * + * @param keyrecord_t *record + * + * @return void + */ +void insert_00(keyrecord_t *record) { + if (record->event.pressed) { + tap_code(KC_P0); + tap_code(KC_P0); + } +} diff --git a/keyboards/handwired/aek64/keymaps/4sstylz/keymap.c b/keyboards/handwired/aek64/keymaps/4sstylz/keymap.c index 65f8354aa..cb62fb001 100644 --- a/keyboards/handwired/aek64/keymaps/4sstylz/keymap.c +++ b/keyboards/handwired/aek64/keymaps/4sstylz/keymap.c @@ -1,4 +1,5 @@ #include QMK_KEYBOARD_H +#include <keycodes.h> // Implement Super-alt↯tab // See https://docs.qmk.fm/#/feature_macros?id=super-alt↯tab @@ -7,7 +8,10 @@ uint16_t alt_tab_timer = 0; // Defining all the custom keycodes. enum custom_keycodes { - ALT_TAB = SAFE_RANGE + ALT_TAB = SAFE_RANGE, + SLC_ROW, + SLC_ALL, + SLC_WRD }; const uint16_t PROGMEM lock_combo[] = {KC_J, KC_K, KC_L, KC_SCLN, COMBO_END}; @@ -18,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: qwerty * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬─────────────┐ * │ ` Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ - * ├─────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┬───────┤ + * ├──────┴──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┬───────┤ * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │ * ├─────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┴┐ Enter│ * │ Layer 2 │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │ @@ -40,14 +44,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, MO(1) , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT , KC_LSPO , KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSPC , - KC_LCPO , KC_LALT, ALT_TAB, KC_SPC, KC_LGUI, KC_RALT, KC_RCPC + KC_LCPO , KC_LGUI, KC_LALT, KC_SPC, KC_APP , KC_RALT, KC_RCPC ), /* 1: second layer for media keys and many advanced features ç * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬─────────────┐ * │Alt F4│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┬───────┤ - * │ │ │ │PrtScn│ Brt+ │ Brt- │Ctrl A│ Home │ Up │ End │ ‽ │ ↑ │ ⸮ │ │ │ + * ├──────┴──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┬───────┤ + * │ │ │PrtScn│ Brt+ │ Brt- │Ctrl A│ Home │ Up │ End │ ‽ │ ↑ │ ⸮ │ │ │ * ├─────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┴┐ │ * │ │ Cut │ Copy │Paste │ Del │ Del │ Left │ Down │Right │ ← │ ↓ │ → │ │ │ * ├──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┴──────┤ @@ -57,11 +61,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └──────┴──────┴──────┴──────────────────────────────────────────────────────────────┴──────┴──────┴──────┘ */ [1] = LAYOUT( \ - LALT(KC_F4), 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_PSCR , KC_BRIU , KC_BRID, LCTL(KC_A), KC_HOME, KC_UP , KC_END , UC(0x203D) , UC(0x8593), UC(0x2E2E), - _______ , _______ , LSFT(KC_DEL), LCTL(KC_INS), LSFT(KC_INS), KC_DEL , KC_DEL , KC_LEFT, KC_DOWN, KC_RIGHT, UC(0x8592) , UC(0x8595), UC(0x8594), _______, - _______ , _______ , KC_MUTE , KC_VOLD , KC_VOLU , _______, _______ , _______, _______, _______ , _______ , RESET , _______ , - _______ , _______ , _______ , _______, _______ , _______ , _______ + LALT(KC_F4), 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 , + _______ , _______ , SLC_ALL , SLC_ROW , SLC_WRD , _______, KC_BSPC, KC_HOME, KC_UP , KC_END , KC_BRIU, KC_BRID , KC_PSCR, + _______ , _______ , LSFT(KC_DEL), LCTL(KC_INS), LSFT(KC_INS), KC_DEL , KC_ENT , KC_LEFT, KC_DOWN, KC_RIGHT, BL_TOGG, BL_STEP , BL_BRTG, _______, + _______ , _______ , KC_MUTE , KC_VOLD , KC_VOLU , ALT_TAB, _______, _______, _______, _______ , _______, RESET , _______ , + _______ , _______ , _______ , _______, _______ , _______, _______ ) }; @@ -88,6 +92,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { unregister_code(KC_TAB); } break; + case SLC_ALL: + select_all(record); + break; + case SLC_ROW: + select_row(record); + break; + case SLC_WRD: + select_word(record); + break; } return true; } diff --git a/keyboards/handwired/aek64/rules.mk b/keyboards/handwired/aek64/rules.mk index c02af3dd6..52c306130 100644 --- a/keyboards/handwired/aek64/rules.mk +++ b/keyboards/handwired/aek64/rules.mk @@ -25,3 +25,4 @@ UNICODE_ENABLE = yes # Enable support for arrow keys icon on the second layer. COMBO_ENABLE = yes # Enable combo for special function when using multiple keys at once. TAP_DANCE_ENABLE = no # Enable use multiple tap NKRO_ENABLE = yes +BACKLIGHT_ENABLE = yes diff --git a/keyboards/handwired/aranck/aranck.h b/keyboards/handwired/aranck/aranck.h index de7639fd0..df887c2c5 100644 --- a/keyboards/handwired/aranck/aranck.h +++ b/keyboards/handwired/aranck/aranck.h @@ -25,7 +25,7 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define LAYOUT_aranck_mit(\ +#define LAYOUT_planck_mit(\ 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, \ diff --git a/keyboards/handwired/aranck/config.h b/keyboards/handwired/aranck/config.h index 5212409c8..0de56cc3b 100644 --- a/keyboards/handwired/aranck/config.h +++ b/keyboards/handwired/aranck/config.h @@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define PRODUCT_ID 0x0000 #define DEVICE_VER 0x0001 #define MANUFACTURER Ardakilic -#define PRODUCT ARANCK +#define PRODUCT Aranck #define DESCRIPTION A handwired 40% ortholinear keyboard /* key matrix size */ diff --git a/keyboards/handwired/aranck/info.json b/keyboards/handwired/aranck/info.json index 450d89634..5e138508d 100644 --- a/keyboards/handwired/aranck/info.json +++ b/keyboards/handwired/aranck/info.json @@ -6,7 +6,7 @@ "width": 12, "height": 4, "layouts": { - "LAYOUT_aranck_mit": { + "LAYOUT_planck_mit": { "key_count": 47, "layout": [ { "x": 0, "y": 0 }, diff --git a/keyboards/handwired/aranck/keymaps/default/keymap.c b/keyboards/handwired/aranck/keymaps/default/keymap.c index 2765c7afb..206d23b6a 100644 --- a/keyboards/handwired/aranck/keymaps/default/keymap.c +++ b/keyboards/handwired/aranck/keymaps/default/keymap.c @@ -42,10 +42,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | PWR | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = LAYOUT_aranck_mit( +[_QWERTY] = LAYOUT_planck_mit( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, LT(_NUMPAD, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - LSFT_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT /*KC_ENT*/, + LSFT_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, LT(_SODA, KC_POWER), KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), LT(_SPACE, KC_SPC), MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), @@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = LAYOUT_aranck_mit( +[_LOWER] = LAYOUT_planck_mit( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, @@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = LAYOUT_aranck_mit( +[_RAISE] = LAYOUT_planck_mit( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, @@ -89,18 +89,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Soda Layer * Keys that I mostly use when while chilling or taking a break :) * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | + * | | | | | | | | | Up | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | Mute | + * | | | | | | | | Left | Down |Right | | Mute | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | Next | Vol- | Vol+ | Play | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | |Brght▼|Brght▲| * `-----------------------------------------------------------------------------------' */ -[_SODA] = LAYOUT_aranck_mit( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, +[_SODA] = LAYOUT_planck_mit( + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU ), @@ -116,7 +116,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | |Brght▼|Brght▲| * `-----------------------------------------------------------------------------------' */ -[_SPACE] = LAYOUT_aranck_mit( +[_SPACE] = LAYOUT_planck_mit( _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LOCKSCREEN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, @@ -129,15 +129,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | Enter| 4 | 5 | 6 | + | * | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | 1 | 2 | 3 | + | / | + * | | | | | | | Enter| 1 | 2 | 3 | + | / | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | 0 | 0 | . | , | = | * `-----------------------------------------------------------------------------------' */ -[_NUMPAD] = LAYOUT_aranck_mit( +[_NUMPAD] = LAYOUT_planck_mit( _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_BSPC, _______, _______, _______, _______, _______, _______, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PAST, - _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PSLS, + _______, _______, _______, _______, _______, _______, KC_PENT, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PSLS, _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, KC_PDOT, KC_PCMM, KC_PEQL ), @@ -153,7 +153,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = LAYOUT_aranck_mit( +[_ADJUST] = LAYOUT_planck_mit( _______, RESET, EEP_RST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, _______, _______, _______, _______, _______, _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, @@ -166,13 +166,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } - -//bool process_record_user(uint16_t keycode, keyrecord_t *record) { -// return true; -//} - -void matrix_init_user(void) {} - -void matrix_scan_user(void) {} - -void led_set_user(uint8_t usb_led) {} diff --git a/keyboards/handwired/aranck/keymaps/turkishish/config.h b/keyboards/handwired/aranck/keymaps/turkishish/config.h index 3e40ef4f6..0810a3b23 100644 --- a/keyboards/handwired/aranck/keymaps/turkishish/config.h +++ b/keyboards/handwired/aranck/keymaps/turkishish/config.h @@ -19,4 +19,6 @@ // place overrides here #define RETRO_TAPPING -#define PERMISSIVE_HOLD
\ No newline at end of file +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_FORCE_HOLD
\ No newline at end of file diff --git a/keyboards/handwired/aranck/keymaps/turkishish/keymap.c b/keyboards/handwired/aranck/keymaps/turkishish/keymap.c index 195b8aaad..4e7ef57b7 100644 --- a/keyboards/handwired/aranck/keymaps/turkishish/keymap.c +++ b/keyboards/handwired/aranck/keymaps/turkishish/keymap.c @@ -43,6 +43,7 @@ enum aranck_layers { #define VERTICAL_PIPE RALT(KC_EQL) #define BACKTICK RALT(KC_BSLS) #define TILDE RALT(KC_RBRC) +#define NUMBER_SIGN RALT(KC_3) #define LOCKSCREEN LCTL(LSFT(KC_POWER)) // Screen Lock shortcut for OSX /* @@ -93,10 +94,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Sda|<>| Ctrl | Alt | OS |Lowr|,| Space* |Rise|"| Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = LAYOUT_aranck_mit( +[_QWERTY] = LAYOUT_planck_mit( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, LT(_NUMPAD, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - LSFT_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT /*KC_ENT*/, + LSFT_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, LT(_SODA, KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LT(_LOWER, KC_BSLS), LT(_SPACE, KC_SPC), LT(_RAISE, KC_NONUS_BSLASH), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), @@ -106,15 +107,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | ? | _ | Ğ | Ü | - | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | "$" | "{" | "}" | , | ">" | + * | | F7 | F8 | F9 | F10 | F11 | F12 | "$" | "{" | "}" | < | ">" | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | "[" | "]" | ' | " | + * | | | | | | | | "[" | "]" | ' | " | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = LAYOUT_aranck_mit( +[_LOWER] = LAYOUT_planck_mit( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_EQL, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DOLLAR_SIGN, CURLY_OPEN, CURLY_CLOSE, KC_BSLS, LSFT(KC_GRV), + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DOLLAR_SIGN, CURLY_OPEN, CURLY_CLOSE, KC_GRV, LSFT(KC_GRV), _______, _______, _______, _______, _______, _______, _______, SQUARE_OPEN, SQUARE_CLOSE, LSFT(KC_2), KC_NONUS_BSLASH ), @@ -125,15 +126,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | * | - | "\" | "|" | , | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | , | " | "~" | "`" | <>| | + * | | F7 | F8 | F9 | F10 | F11 | F12 | # | " | "~" | "`" | <>| | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = LAYOUT_aranck_mit( +[_RAISE] = LAYOUT_planck_mit( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, BACKSLASH, VERTICAL_PIPE, KC_BSLS, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, TILDE, BACKTICK, KC_GRV, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMBER_SIGN, KC_NUBS, TILDE, BACKTICK, KC_GRV, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), @@ -148,7 +149,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | |Brght▼|Brght▲| * `-----------------------------------------------------------------------------------' */ -[_SODA] = LAYOUT_aranck_mit( +[_SODA] = LAYOUT_planck_mit( _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, @@ -166,7 +167,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | |Brght▼|Brght▲| * `-----------------------------------------------------------------------------------' */ -[_SPACE] = LAYOUT_aranck_mit( +[_SPACE] = LAYOUT_planck_mit( _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LOCKSCREEN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, @@ -181,15 +182,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | Enter| 4 | 5 | 6 | + | * | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | 1 | 2 | 3 | + | / | + * | | | | | | | Enter| 1 | 2 | 3 | + | / | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | 0 | 0 | . | , | = | * `-----------------------------------------------------------------------------------' */ -[_NUMPAD] = LAYOUT_aranck_mit( +[_NUMPAD] = LAYOUT_planck_mit( _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_BSPC, _______, _______, _______, _______, _______, _______, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PAST, - _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PSLS, + _______, _______, _______, _______, _______, _______, KC_PENT, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PSLS, _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, KC_SLSH, KC_PDOT, KC_PEQL ), @@ -204,7 +205,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = LAYOUT_aranck_mit( +[_ADJUST] = LAYOUT_planck_mit( _______, RESET, EEP_RST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, _______, _______, _______, _______, _______, _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, @@ -217,9 +218,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } - -void matrix_init_user(void) {} - -void matrix_scan_user(void) {} - -void led_set_user(uint8_t usb_led) {} diff --git a/keyboards/handwired/aranck/keymaps/turkishish/readme.md b/keyboards/handwired/aranck/keymaps/turkishish/readme.md index 8998081c1..3ff12ca0e 100644 --- a/keyboards/handwired/aranck/keymaps/turkishish/readme.md +++ b/keyboards/handwired/aranck/keymaps/turkishish/readme.md @@ -1 +1,7 @@ # The Turkishish keymap for Aranck + +This layout is optimized for my use cases with Turkish OS layout. + +You can flash the "turkishish" layout like: + + make handwired/aranck:turkishish:flash diff --git a/keyboards/handwired/aranck/readme.md b/keyboards/handwired/aranck/readme.md index 67089b499..437d0b44d 100644 --- a/keyboards/handwired/aranck/readme.md +++ b/keyboards/handwired/aranck/readme.md @@ -8,15 +8,11 @@ A handwired 40% ortholinear keyboard. The story: https://imgur.com/a/4QI7ifJ -Keyboard Maintainer: [Arda Kilicdagi](https://github.com/ardakilic) -Hardware Supported: Pro Micro +* Keyboard Maintainer: [Arda Kilicdagi](https://github.com/ardakilic) +* Hardware Supported: Pro Micro Make example for this keyboard (after setting up your build environment): - make handwired/aranck:default:flash + make handwired/aranck:default -You can flash the "turkishish" layout (which I'm currently using) like: - - make handwired/aranck:turkishish:flash - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
\ No newline at end of file +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/aranck/rules.mk b/keyboards/handwired/aranck/rules.mk index b95b98a4c..a6809de9d 100644 --- a/keyboards/handwired/aranck/rules.mk +++ b/keyboards/handwired/aranck/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # 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) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # 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 @@ -25,9 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = yes # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
\ No newline at end of file +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LAYOUTS = planck_mit
\ No newline at end of file diff --git a/keyboards/handwired/bluepill/keymaps/default/keymap.c b/keyboards/handwired/bluepill/keymaps/default/keymap.c index 8a3493039..870a530f9 100644 --- a/keyboards/handwired/bluepill/keymaps/default/keymap.c +++ b/keyboards/handwired/bluepill/keymaps/default/keymap.c @@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define _FNTWO 2 // Highly Modified by Xydane -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NORMAL] = LAYOUT_seventy_ansi( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCREEN,KC_HOME, KC_END, \ KC_GRAVE, 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_DELETE, \ @@ -50,8 +50,8 @@ KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, }; /* Layer based ilumination, just binary */ -uint32_t layer_state_set_user(uint32_t state) { - switch (biton32(state)) { +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { case _FNONE: palSetPad(GPIOA, 0); //OFF Color A palClearPad(GPIOA, 1); //ON Color B @@ -66,4 +66,4 @@ uint32_t layer_state_set_user(uint32_t state) { break; } return state; -}
\ No newline at end of file +} diff --git a/keyboards/handwired/bluepill/keymaps/iso/keymap.c b/keyboards/handwired/bluepill/keymaps/iso/keymap.c index a6aedde7a..072f430fb 100644 --- a/keyboards/handwired/bluepill/keymaps/iso/keymap.c +++ b/keyboards/handwired/bluepill/keymaps/iso/keymap.c @@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define _FNTWO 2 // Highly Modified by Xydane -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NORMAL] = LAYOUT_seventy_iso( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCREEN,KC_HOME, KC_END, \ KC_GRAVE, 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_DELETE, \ @@ -66,4 +66,4 @@ uint32_t layer_state_set_user(uint32_t state) { break; } return state; -}
\ No newline at end of file +} diff --git a/keyboards/handwired/cans12er/README.md b/keyboards/handwired/cans12er/README.md new file mode 100644 index 000000000..5ecb2d2c2 --- /dev/null +++ b/keyboards/handwired/cans12er/README.md @@ -0,0 +1,18 @@ +# Cans12er +![Cans12er](https://i.imgur.com/ZsO6QSI.jpg) + +A 12-key, orthogonal keypad designed by Can! + +* Keyboard Maintainer: [Can](https://github.com/canbaytok) +* Hardware Supported: Pro Micro Atmega32u4 +* Hardware Availability: DIY with the [open-source design files](https://github.com/canbaytok/Cans12er) + +Schematic can be found here: [EasyEDA](https://easyeda.com/senordoenermann/mediapad) + +Build Instructions can be found here: [canbaytok/Cans12er](https://github.com/canbaytok/Cans12er) + +Make example for this keyboard (after setting up your build environment): + + make handwired/cans12er:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/cans12er/cans12er.c b/keyboards/handwired/cans12er/cans12er.c new file mode 100644 index 000000000..e74b6a302 --- /dev/null +++ b/keyboards/handwired/cans12er/cans12er.c @@ -0,0 +1 @@ +#include "cans12er.h" diff --git a/keyboards/handwired/cans12er/cans12er.h b/keyboards/handwired/cans12er/cans12er.h new file mode 100644 index 000000000..87a39799e --- /dev/null +++ b/keyboards/handwired/cans12er/cans12er.h @@ -0,0 +1,13 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_3x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 } \ +} diff --git a/keyboards/handwired/cans12er/config.h b/keyboards/handwired/cans12er/config.h new file mode 100644 index 000000000..d7bc4c5c5 --- /dev/null +++ b/keyboards/handwired/cans12er/config.h @@ -0,0 +1,38 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Can +#define PRODUCT cans12er +#define DESCRIPTION a simple 3x4 keypad. every part can be manufactured at home + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F7, B1, B3 } +#define MATRIX_COL_PINS { D0, D4, C6, D7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 0 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 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 diff --git a/keyboards/handwired/cans12er/keymaps/default/keymap.c b/keyboards/handwired/cans12er/keymaps/default/keymap.c new file mode 100644 index 000000000..864abede3 --- /dev/null +++ b/keyboards/handwired/cans12er/keymaps/default/keymap.c @@ -0,0 +1,20 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include QMK_KEYBOARD_H + +// 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. + +#define _KEYPAD 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_KEYPAD] = LAYOUT_ortho_3x4( + KC_A, KC_B, KC_C, KC_D, + KC_E, KC_F, KC_G, KC_H, + KC_I, KC_J, KC_K, KC_L +), +}; diff --git a/keyboards/handwired/cans12er/rules.mk b/keyboards/handwired/cans12er/rules.mk new file mode 100644 index 000000000..c6675b615 --- /dev/null +++ b/keyboards/handwired/cans12er/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # 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 +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs
\ No newline at end of file diff --git a/keyboards/handwired/ck4x4/keymaps/default/keymap.c b/keyboards/handwired/ck4x4/keymaps/default/keymap.c index d3717754d..bc8b602a6 100644 --- a/keyboards/handwired/ck4x4/keymaps/default/keymap.c +++ b/keyboards/handwired/ck4x4/keymaps/default/keymap.c @@ -17,13 +17,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include QMK_KEYBOARD_H -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT(KC_7, KC_8, KC_9, KC_MINUS, \ KC_4, KC_5, KC_6, KC_PLUS, \ KC_1, KC_2, KC_3, KC_ENTER, \ RESET, KC_NO, KC_NO, KC_NO \ ), // test with KC_CAPS, KC_A, RESET }; - -const uint16_t fn_actions[] = { -}; diff --git a/keyboards/handwired/ck4x4/rules.mk b/keyboards/handwired/ck4x4/rules.mk index 7ed9022e6..cd4bc260f 100644 --- a/keyboards/handwired/ck4x4/rules.mk +++ b/keyboards/handwired/ck4x4/rules.mk @@ -1,37 +1,5 @@ -# project specific files -# SRC = matrix.c \ -# led.c - -## chip/board settings -# the next two should match the directories in -# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F0xx -# linker script to use -# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ -# or <this_dir>/ld/ -MCU_LDSCRIPT = STM32F072xB -# startup code to use -# is should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f0xx -# it should exist either in <chibios>/os/hal/boards/ -# or <this_dir>/boards -BOARD = ST_STM32F072B_DISCOVERY -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m0 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 6 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards/<FOO>/bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf -# This also requires a patch to chibios: -# <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch -#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 +# MCU name +MCU = STM32F072 # Build Options # comment out to disable the options. diff --git a/keyboards/handwired/co60/rev6/config.h b/keyboards/handwired/co60/rev6/config.h index b1ab99fd9..a2c73853c 100644 --- a/keyboards/handwired/co60/rev6/config.h +++ b/keyboards/handwired/co60/rev6/config.h @@ -55,6 +55,5 @@ /* Backlight configuration * Backlight LEDs on B8 */ -#define BACKLIGHT_LEVELS 24 +#define BACKLIGHT_PIN B8 #define BACKLIGHT_BREATHING -#define BREATHING_PERIOD 6 diff --git a/keyboards/handwired/co60/rev6/led.c b/keyboards/handwired/co60/rev6/led.c deleted file mode 100644 index fe28ce2e8..000000000 --- a/keyboards/handwired/co60/rev6/led.c +++ /dev/null @@ -1,240 +0,0 @@ -/* -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 "hal.h" -#include "led_custom.h" -#include "rev6.h" -#include "printf.h" - -static void breathing_callback(PWMDriver *pwmp); - -static PWMConfig pwmCFG = { - 0xFFFF, /* PWM clock frequency */ - 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ - NULL, /* No Callback */ - { - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 3 */ - {PWM_OUTPUT_DISABLED, NULL} - }, - 0, /* HW dependent part.*/ - 0 -}; - -static PWMConfig pwmCFG_breathing = { - 0xFFFF, /* 10kHz PWM clock frequency */ - 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ - breathing_callback, /* Breathing Callback */ - { - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 3 */ - {PWM_OUTPUT_DISABLED, NULL} - }, - 0, /* HW dependent part.*/ - 0 -}; - -// See http://jared.geek.nz/2013/feb/linear-led-pwm -static uint16_t cie_lightness(uint16_t v) { - if (v <= 5243) // if below 8% of max - return v / 9; // same as dividing by 900% - else { - uint32_t y = (((uint32_t)v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare - // to get a useful result with integer division, we shift left in the expression above - // and revert what we've done again after squaring. - y = y * y * y >> 8; - if (y > 0xFFFFUL) // prevent overflow - return 0xFFFFU; - else - return (uint16_t)y; - } -} - -void backlight_init_ports(void) { - palSetPadMode(GPIOB, 8, PAL_MODE_ALTERNATE(2)); - pwmStart(&PWMD4, &pwmCFG); - if (kb_backlight_config.enable) { - if (kb_backlight_config.breathing) { - breathing_enable(); - } else { - backlight_set(kb_backlight_config.level); - } - } else { - backlight_set(0); - } -} - -void backlight_set(uint8_t level) { - uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t)level / BACKLIGHT_LEVELS)); - if (level == 0) { - // Turn backlight off - // Disable channel 3 on PWM4 - pwmDisableChannel(&PWMD4, 2); - } else { - // Turn backlight on - if (!is_breathing()) { - // Enable channel 3 on PWM4 - pwmEnableChannel(&PWMD4, 2, PWM_FRACTION_TO_WIDTH(&PWMD4, 0xFFFF, duty)); - } - } -} - -uint8_t backlight_tick = 0; - -void backlight_task(void) { -} - -#define BREATHING_NO_HALT 0 -#define BREATHING_HALT_OFF 1 -#define BREATHING_HALT_ON 2 -#define BREATHING_STEPS 128 - -static uint8_t breathing_period = BREATHING_PERIOD; -static uint8_t breathing_halt = BREATHING_NO_HALT; -static uint16_t breathing_counter = 0; - -bool is_breathing(void) { - return PWMD4.config == &pwmCFG_breathing; -} - -#define breathing_min() do {breathing_counter = 0;} while (0) -#define breathing_max() do {breathing_counter = breathing_period * 256 / 2;} while (0) - - -void breathing_interrupt_enable(void){ - pwmStop(&PWMD4); - pwmStart(&PWMD4, &pwmCFG_breathing); - chSysLockFromISR(); - pwmEnablePeriodicNotification(&PWMD4); - pwmEnableChannelI( - &PWMD4, - 2, - PWM_FRACTION_TO_WIDTH( - &PWMD4, - 0xFFFF, - 0xFFFF - ) - ); - chSysUnlockFromISR(); -} - -void breathing_interrupt_disable(void){ - pwmStop(&PWMD4); - pwmStart(&PWMD4, &pwmCFG); -} - -void breathing_enable(void) -{ - breathing_counter = 0; - breathing_halt = BREATHING_NO_HALT; - breathing_interrupt_enable(); -} - -void breathing_pulse(void) -{ - if (kb_backlight_config.level == 0) - breathing_min(); - else - breathing_max(); - breathing_halt = BREATHING_HALT_ON; - breathing_interrupt_enable(); -} - -void breathing_disable(void) -{ - breathing_interrupt_disable(); - // Restore backlight level - backlight_set(kb_backlight_config.level); -} - -void breathing_self_disable(void) -{ - if (kb_backlight_config.level == 0) - breathing_halt = BREATHING_HALT_OFF; - else - breathing_halt = BREATHING_HALT_ON; -} - -void breathing_toggle(void) { - if (is_breathing()){ - breathing_disable(); - } else { - breathing_enable(); - } -} - -void breathing_period_set(uint8_t value) -{ - if (!value) - value = 1; - breathing_period = value; -} - -void breathing_period_default(void) { - breathing_period_set(BREATHING_PERIOD); -} - -void breathing_period_inc(void) -{ - breathing_period_set(breathing_period+1); -} - -void breathing_period_dec(void) -{ - breathing_period_set(breathing_period-1); -} - -/* To generate breathing curve in python: - * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] - */ -static const uint8_t breathing_table[BREATHING_STEPS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -// Use this before the cie_lightness function. -static inline uint16_t scale_backlight(uint16_t v) { - return v / BACKLIGHT_LEVELS * kb_backlight_config.level; -} - -static void breathing_callback(PWMDriver *pwmp) -{ - (void)pwmp; - uint16_t interval = (uint16_t) breathing_period * 256 / BREATHING_STEPS; - // resetting after one period to prevent ugly reset at overflow. - breathing_counter = (breathing_counter + 1) % (breathing_period * 256); - uint8_t index = breathing_counter / interval % BREATHING_STEPS; - - if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || - ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) - { - breathing_interrupt_disable(); - } - - uint32_t duty = cie_lightness(scale_backlight(breathing_table[index] * 256)); - - chSysLockFromISR(); - pwmEnableChannelI( - &PWMD4, - 2, - PWM_FRACTION_TO_WIDTH( - &PWMD4, - 0xFFFF, - duty - ) - ); - chSysUnlockFromISR(); -} diff --git a/keyboards/handwired/co60/rev6/rev6.c b/keyboards/handwired/co60/rev6/rev6.c index f597513b1..e2645871a 100644 --- a/keyboards/handwired/co60/rev6/rev6.c +++ b/keyboards/handwired/co60/rev6/rev6.c @@ -15,25 +15,3 @@ */ #include "rev6.h" -#include "backlight.h" -#include "led.h" -#include "printf.h" - -backlight_levels_config_t kb_backlight_config = { - .enable = true, - .breathing = true, - .level = BACKLIGHT_LEVELS -}; - -uint8_t *o_fb; - -uint16_t counterst = 0; - -void matrix_init_kb(void) { - matrix_init_user(); - backlight_init_ports(); -} - -void matrix_scan_kb(void) { - matrix_scan_user(); -} diff --git a/keyboards/handwired/co60/rev6/rev6.h b/keyboards/handwired/co60/rev6/rev6.h index 7d11f19d3..1f0fe51e2 100644 --- a/keyboards/handwired/co60/rev6/rev6.h +++ b/keyboards/handwired/co60/rev6/rev6.h @@ -126,21 +126,3 @@ { KC_NO, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, KC_NO }, \ } -// Backlighting -typedef union { - uint8_t raw; - struct { - bool enable :1; - bool breathing : 1; - uint8_t level :6; - }; -} backlight_levels_config_t; - -extern backlight_levels_config_t kb_backlight_config; -extern bool kb_backlight_breathing; - -void backlight_init_ports(void); -void backlight_set(uint8_t level); -bool is_breathing(void); -void breathing_enable(void); -void breathing_disable(void); diff --git a/keyboards/handwired/co60/rev6/rules.mk b/keyboards/handwired/co60/rev6/rules.mk index fc7cabb10..b20c2efed 100644 --- a/keyboards/handwired/co60/rev6/rules.mk +++ b/keyboards/handwired/co60/rev6/rules.mk @@ -1,9 +1,6 @@ # MCU name MCU = STM32F303 -# Code for backlight breathing: -SRC += led.c - # Build Options # comment out to disable the options. # diff --git a/keyboards/handwired/co60/rev7/config.h b/keyboards/handwired/co60/rev7/config.h index 1ccc12ad4..e13d28f50 100644 --- a/keyboards/handwired/co60/rev7/config.h +++ b/keyboards/handwired/co60/rev7/config.h @@ -57,9 +57,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Backlight configuration * Backlight LEDs on B8 */ -#define BACKLIGHT_LEVELS 24 +#define BACKLIGHT_PIN B8 #define BACKLIGHT_BREATHING -#define BREATHING_PERIOD 6 + +/* RGB underglow configuration */ +#define WS2812_SPI SPID1 +#define WS2812_SPI_MOSI_PAL_MODE 5 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/handwired/co60/rev7/halconf.h b/keyboards/handwired/co60/rev7/halconf.h index 5e5d70219..7363a21a2 100644 --- a/keyboards/handwired/co60/rev7/halconf.h +++ b/keyboards/handwired/co60/rev7/halconf.h @@ -153,7 +153,7 @@ * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI TRUE #endif /** diff --git a/keyboards/handwired/co60/rev7/led.c b/keyboards/handwired/co60/rev7/led.c deleted file mode 100644 index 13f8d9860..000000000 --- a/keyboards/handwired/co60/rev7/led.c +++ /dev/null @@ -1,242 +0,0 @@ -/* -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 "hal.h" -#include "led_custom.h" -#include "rev7.h" -#include "printf.h" - -static void breathing_callback(PWMDriver *pwmp); - -static PWMConfig pwmCFG = { - 0xFFFF, /* PWM clock frequency */ - 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ - NULL, /* No Callback */ - { - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 3 */ - {PWM_OUTPUT_DISABLED, NULL} - }, - 0, /* HW dependent part.*/ - 0 -}; - -static PWMConfig pwmCFG_breathing = { - 0xFFFF, /* 10kHz PWM clock frequency */ - 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ - breathing_callback, /* Breathing Callback */ - { - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 3 */ - {PWM_OUTPUT_DISABLED, NULL} - }, - 0, /* HW dependent part.*/ - 0 -}; - -// See http://jared.geek.nz/2013/feb/linear-led-pwm -static uint16_t cie_lightness(uint16_t v) { - if (v <= 5243) // if below 8% of max - return v / 9; // same as dividing by 900% - else { - uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare - // to get a useful result with integer division, we shift left in the expression above - // and revert what we've done again after squaring. - y = y * y * y >> 8; - if (y > 0xFFFFUL) // prevent overflow - return 0xFFFFU; - else - return (uint16_t) y; - } -} - - -void backlight_init_ports(void) { - palSetPadMode(GPIOB, 8, PAL_MODE_ALTERNATE(2)); - pwmStart(&PWMD4, &pwmCFG); - if(kb_backlight_config.enable){ - if(kb_backlight_config.breathing){ - breathing_enable(); - } else{ - backlight_set(kb_backlight_config.level); - } - } else { - backlight_set(0); - } -} - -void backlight_set(uint8_t level) { - uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / BACKLIGHT_LEVELS)); - if (level == 0) { - // Turn backlight off - // Disable channel 3 on PWM4 - pwmDisableChannel(&PWMD4, 2); - } else { - // Turn backlight on - if(!is_breathing()){ - // Enable channel 3 on PWM4 - pwmEnableChannel(&PWMD4, 2, PWM_FRACTION_TO_WIDTH(&PWMD4,0xFFFF,duty)); - } - } -} - - -uint8_t backlight_tick = 0; - -void backlight_task(void) { -} - -#define BREATHING_NO_HALT 0 -#define BREATHING_HALT_OFF 1 -#define BREATHING_HALT_ON 2 -#define BREATHING_STEPS 128 - -static uint8_t breathing_period = BREATHING_PERIOD; -static uint8_t breathing_halt = BREATHING_NO_HALT; -static uint16_t breathing_counter = 0; - -bool is_breathing(void) { - return PWMD4.config == &pwmCFG_breathing; -} - -#define breathing_min() do {breathing_counter = 0;} while (0) -#define breathing_max() do {breathing_counter = breathing_period * 256 / 2;} while (0) - - -void breathing_interrupt_enable(void){ - pwmStop(&PWMD4); - pwmStart(&PWMD4, &pwmCFG_breathing); - chSysLockFromISR(); - pwmEnablePeriodicNotification(&PWMD4); - pwmEnableChannelI( - &PWMD4, - 2, - PWM_FRACTION_TO_WIDTH( - &PWMD4, - 0xFFFF, - 0xFFFF - ) - ); - chSysUnlockFromISR(); -} - -void breathing_interrupt_disable(void){ - pwmStop(&PWMD4); - pwmStart(&PWMD4, &pwmCFG); -} - -void breathing_enable(void) -{ - breathing_counter = 0; - breathing_halt = BREATHING_NO_HALT; - breathing_interrupt_enable(); -} - -void breathing_pulse(void) -{ - if (kb_backlight_config.level == 0) - breathing_min(); - else - breathing_max(); - breathing_halt = BREATHING_HALT_ON; - breathing_interrupt_enable(); -} - -void breathing_disable(void) -{ - breathing_interrupt_disable(); - // Restore backlight level - backlight_set(kb_backlight_config.level); -} - -void breathing_self_disable(void) -{ - if (kb_backlight_config.level == 0) - breathing_halt = BREATHING_HALT_OFF; - else - breathing_halt = BREATHING_HALT_ON; -} - -void breathing_toggle(void) { - if (is_breathing()){ - breathing_disable(); - } else { - breathing_enable(); - } -} - -void breathing_period_set(uint8_t value) -{ - if (!value) - value = 1; - breathing_period = value; -} - -void breathing_period_default(void) { - breathing_period_set(BREATHING_PERIOD); -} - -void breathing_period_inc(void) -{ - breathing_period_set(breathing_period+1); -} - -void breathing_period_dec(void) -{ - breathing_period_set(breathing_period-1); -} - -/* To generate breathing curve in python: - * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] - */ -static const uint8_t breathing_table[BREATHING_STEPS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -// Use this before the cie_lightness function. -static inline uint16_t scale_backlight(uint16_t v) { - return v / BACKLIGHT_LEVELS * kb_backlight_config.level; -} - -static void breathing_callback(PWMDriver *pwmp) -{ - (void)pwmp; - uint16_t interval = (uint16_t) breathing_period * 256 / BREATHING_STEPS; - // resetting after one period to prevent ugly reset at overflow. - breathing_counter = (breathing_counter + 1) % (breathing_period * 256); - uint8_t index = breathing_counter / interval % BREATHING_STEPS; - - if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || - ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) - { - breathing_interrupt_disable(); - } - - uint32_t duty = cie_lightness(scale_backlight(breathing_table[index] * 256)); - - chSysLockFromISR(); - pwmEnableChannelI( - &PWMD4, - 2, - PWM_FRACTION_TO_WIDTH( - &PWMD4, - 0xFFFF, - duty - ) - ); - chSysUnlockFromISR(); -} diff --git a/keyboards/handwired/co60/rev7/mcuconf.h b/keyboards/handwired/co60/rev7/mcuconf.h index 69bf9185d..7ad013744 100644 --- a/keyboards/handwired/co60/rev7/mcuconf.h +++ b/keyboards/handwired/co60/rev7/mcuconf.h @@ -210,7 +210,7 @@ /* * SPI driver system settings. */ -#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI1 TRUE #define STM32_SPI_USE_SPI2 FALSE #define STM32_SPI_USE_SPI3 FALSE #define STM32_SPI_SPI1_DMA_PRIORITY 1 diff --git a/keyboards/handwired/co60/rev7/rev7.c b/keyboards/handwired/co60/rev7/rev7.c index 3d0964d89..40fd7e664 100644 --- a/keyboards/handwired/co60/rev7/rev7.c +++ b/keyboards/handwired/co60/rev7/rev7.c @@ -15,25 +15,3 @@ */ #include "rev7.h" -#include "backlight.h" -#include "led.h" -#include "printf.h" - -backlight_levels_config_t kb_backlight_config = { - .enable = true, - .breathing = true, - .level = BACKLIGHT_LEVELS -}; - -uint8_t *o_fb; - -uint16_t counterst = 0; - -void matrix_init_kb(void) { - matrix_init_user(); - backlight_init_ports(); -} - -void matrix_scan_kb(void) { - matrix_scan_user(); -} diff --git a/keyboards/handwired/co60/rev7/rev7.h b/keyboards/handwired/co60/rev7/rev7.h index 4ab2b8d72..fb9c7cb31 100644 --- a/keyboards/handwired/co60/rev7/rev7.h +++ b/keyboards/handwired/co60/rev7/rev7.h @@ -126,21 +126,3 @@ { KC_NO, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, KC_NO }, \ } -// Backlighting -typedef union { - uint8_t raw; - struct { - bool enable :1; - bool breathing : 1; - uint8_t level :6; - }; -} backlight_levels_config_t; - -extern backlight_levels_config_t kb_backlight_config; -extern bool kb_backlight_breathing; - -void backlight_init_ports(void); -void backlight_set(uint8_t level); -bool is_breathing(void); -void breathing_enable(void); -void breathing_disable(void); diff --git a/keyboards/handwired/co60/rev7/rules.mk b/keyboards/handwired/co60/rev7/rules.mk index 9daeaf047..50e4bb891 100644 --- a/keyboards/handwired/co60/rev7/rules.mk +++ b/keyboards/handwired/co60/rev7/rules.mk @@ -1,8 +1,8 @@ # MCU name MCU = STM32F303 -# Code for backlight breathing: -SRC += led.c +# Use SPI for RGB underglow: +WS2812_DRIVER = spi # Build Options # comment out to disable the options. @@ -15,7 +15,7 @@ CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work AUDIO_ENABLE = no -RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/handwired/colorlice/colorlice.c b/keyboards/handwired/colorlice/colorlice.c new file mode 100644 index 000000000..1fd5fddd1 --- /dev/null +++ b/keyboards/handwired/colorlice/colorlice.c @@ -0,0 +1,67 @@ +/* Copyright 2019 marhalloweenvt + * + * 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 "colorlice.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, + { 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, NO_LED }, + { 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, NO_LED, 44, NO_LED }, + { 58, 57, 56, 55, 54, 53, NO_LED, 52, 51, 50, 49, 48, 47, 46, 45, NO_LED}, + { 59, NO_LED, 60, 61, 62, NO_LED, NO_LED,63, NO_LED, NO_LED, 64, 65,66,67, 68, NO_LED } +}, { + { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 195, 0 }, { 210, 0 }, { 224, 0 }, + { 224, 16 }, { 210, 16 }, { 195, 16 }, { 180, 16 }, { 165, 16 }, { 150, 16 }, { 135, 16 }, { 120, 16 }, { 90, 16 }, { 75, 16 }, { 60, 16 }, { 45, 16 }, { 30, 16 }, { 15, 16 }, { 0, 16 }, + { 0, 32 }, { 15, 32 }, { 30, 32 }, { 45, 32 }, { 60, 32 }, { 75, 32 }, { 90, 32 }, { 135, 32 }, { 150, 32 }, { 165, 32 }, { 180, 32 }, { 195, 32 }, { 210, 32 }, { 224, 32 }, + { 225, 48 }, { 224, 48 }, { 210, 48 }, { 195, 48 }, { 180, 48 }, { 165, 48 }, { 150, 48 }, { 135, 48 }, { 90, 48 }, { 75, 48 }, { 60, 48 }, { 45, 48 }, { 30, 48 }, { 15, 48 }, + { 15, 64 }, { 45, 64 }, { 75, 64 }, { 90, 64 }, { 150, 64 }, { 180, 64 }, { 210, 64 }, { 215, 64 }, { 220, 64 }, { 225, 64 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +} }; +#endif + +#ifdef RGB_MATRIX_ENABLE +void suspend_power_down_kb(void) +{ + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) +{ + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} +#endif + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + // writePin sets the pin high for 1 and low for 0. + // In this example the pins are inverted, setting + // it low/0 turns it on, and high/1 turns the LED off. + // This behavior depends on whether the LED is between the pin + // and VCC or the pin and GND. + writePin(B2, !led_state.num_lock); + writePin(C6, !led_state.caps_lock); + writePin(B7, !led_state.scroll_lock); + } + return res; +} diff --git a/keyboards/handwired/colorlice/colorlice.h b/keyboards/handwired/colorlice/colorlice.h new file mode 100644 index 000000000..c1e88abe8 --- /dev/null +++ b/keyboards/handwired/colorlice/colorlice.h @@ -0,0 +1,42 @@ +/* Copyright 2019 marhalloweenvt + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, K2e, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k42, k43, k44, k47, k4a, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, K2e, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, KC_NO }, \ + { k40, KC_NO, k42, k43, k44, KC_NO, KC_NO, k47, KC_NO, KC_NO, k4a, KC_NO,KC_NO, KC_NO, k4e, KC_NO }, \ +} + diff --git a/keyboards/handwired/colorlice/config.h b/keyboards/handwired/colorlice/config.h new file mode 100644 index 000000000..178254211 --- /dev/null +++ b/keyboards/handwired/colorlice/config.h @@ -0,0 +1,58 @@ +/* +Copyright 2019 Marhalloweenvt + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0302 +#define DEVICE_VER 0x0001 +#define MANUFACTURER marhalloweenvt +#define PRODUCT Colorlice +#define DESCRIPTION Replacement PCB for TGR Alice + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, B6, B5, B4, D7, D6, D4, E6, B0, B3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 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 + +/* RGB LEDs */ +#define RGB_DI_PIN B1 +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_LED_PROCESS_LIMIT 4 +#define RGB_MATRIX_LED_FLUSH_LIMIT 26 +#define DRIVER_LED_TOTAL 70 diff --git a/keyboards/handwired/colorlice/info.json b/keyboards/handwired/colorlice/info.json new file mode 100644 index 000000000..0b2887625 --- /dev/null +++ b/keyboards/handwired/colorlice/info.json @@ -0,0 +1,79 @@ +{ + "keyboard_name": "ColorLice", + "url": "", + "maintainer": "marhalloweenvt", + "width": 17.75, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K63", "x":0, "y":0}, + {"label":"K00", "x":1.25, "y":0}, + {"label":"K01", "x":2.25, "y":0}, + {"label":"K02", "x":3.25, "y":0}, + {"label":"K03", "x":4.25, "y":0}, + {"label":"K04", "x":5.25, "y":0}, + {"label":"K05", "x":6.25, "y":0}, + {"label":"K06", "x":7.25, "y":0}, + {"label":"K07", "x":10.25, "y":0}, + {"label":"K08", "x":11.25, "y":0}, + {"label":"K09", "x":12.25, "y":0}, + {"label":"K10", "x":13.25, "y":0}, + {"label":"K11", "x":14.25, "y":0}, + {"label":"K12", "x":15.25, "y":0}, + {"label":"K13", "x":16.25, "y":0}, + {"label":"K14", "x":17.25, "y":0}, + {"label":"K64", "x":0, "y":1}, + {"label":"K15", "x":1.25, "y":1, "w":1.5}, + {"label":"K16", "x":2.75, "y":1}, + {"label":"K17", "x":3.75, "y":1}, + {"label":"K18", "x":4.75, "y":1}, + {"label":"K19", "x":5.75, "y":1}, + {"label":"K20", "x":6.75, "y":1}, + {"label":"K21", "x":9.75, "y":1}, + {"label":"K22", "x":10.75, "y":1}, + {"label":"K23", "x":11.75, "y":1}, + {"label":"K24", "x":12.75, "y":1}, + {"label":"K25", "x":13.75, "y":1}, + {"label":"K26", "x":14.75, "y":1}, + {"label":"K27", "x":15.75, "y":1}, + {"label":"K28", "x":16.75, "y":1, "w":1.5}, + {"label":"K65", "x":0, "y":2}, + {"label":"K29", "x":1.25, "y":2, "w":1.75}, + {"label":"K30", "x":3, "y":2}, + {"label":"K31", "x":4, "y":2}, + {"label":"K32", "x":5, "y":2}, + {"label":"K33", "x":6, "y":2}, + {"label":"K34", "x":7, "y":2}, + {"label":"K35", "x":10, "y":2}, + {"label":"K36", "x":11, "y":2}, + {"label":"K37", "x":12, "y":2}, + {"label":"K38", "x":13, "y":2}, + {"label":"K39", "x":14, "y":2}, + {"label":"K40", "x":15, "y":2}, + {"label":"K41", "x":16, "y":2, "w":2.25}, + {"label":"K42", "x":1.25, "y":3, "w":2.25}, + {"label":"K43", "x":3.5, "y":3}, + {"label":"K44", "x":4.5, "y":3}, + {"label":"K45", "x":5.5, "y":3}, + {"label":"K46", "x":6.5, "y":3}, + {"label":"K47", "x":7.5, "y":3}, + {"label":"K48", "x":9.5, "y":3}, + {"label":"K49", "x":10.5, "y":3}, + {"label":"K50", "x":11.5, "y":3}, + {"label":"K51", "x":12.5, "y":3}, + {"label":"K52", "x":13.5, "y":3}, + {"label":"K53", "x":14.5, "y":3}, + {"label":"K54", "x":15.5, "y":3, "w":1.75}, + {"label":"K55", "x":17.25, "y":3}, + {"label":"K56", "x":1.25, "y":4, "w":1.5}, + {"label":"K57", "x":4.25, "y":4, "w":1.5}, + {"label":"K58", "x":5.75, "y":4, "w":2}, + {"label":"K59", "x":7.75, "y":4, "w":1.25}, + {"label":"K60", "x":9.5, "y":4, "w":2.75}, + {"label":"K61", "x":12.25, "y":4, "w":1.5}, + {"label":"K62", "x":16.75, "y":4, "w":1.5} + ] + } + } + } diff --git a/keyboards/handwired/colorlice/keymaps/default/keymap.c b/keyboards/handwired/colorlice/keymaps/default/keymap.c new file mode 100644 index 000000000..84257a120 --- /dev/null +++ b/keyboards/handwired/colorlice/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2019 marhalloweenvt + * + * 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( + RGB_TOG, 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_GRV, KC_BSLS, + RGB_MOD, 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_PGDN, 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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LGUI, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL), + + [1] = LAYOUT( + _______, _______, 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_DEL, + _______, _______, _______, KC_UP, _______, _______, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD , _______, _______, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, + _______, _______, _______, _______, _______, _______, _______ ), +}; diff --git a/keyboards/handwired/colorlice/readme.md b/keyboards/handwired/colorlice/readme.md new file mode 100644 index 000000000..de4c3fce3 --- /dev/null +++ b/keyboards/handwired/colorlice/readme.md @@ -0,0 +1,13 @@ +# COLORLICE + +A keyboard inspired by TGR Alice + +* Keyboard Maintainer: [marhalloweenvt](https://github.com/marhalloweenvt) +* Hardware Supported: Colorlice PCB +* Hardware Availability: Colorlice PCB + +Make example for this keyboard (after setting up your build environment): + + make handwired/colorlice:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/colorlice/rules.mk b/keyboards/handwired/colorlice/rules.mk new file mode 100644 index 000000000..02da465d3 --- /dev/null +++ b/keyboards/handwired/colorlice/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # 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 +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +LTO_ENABLE = no # Use link time optimization +RGB_MATRIX_ENABLE = WS2812 # Enable keyboard RGB backlight functionality with ws2812 driver +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow diff --git a/keyboards/handwired/steamvan/rev1/led_custom.h b/keyboards/handwired/dactyl_manuform/5x6/keymaps/squirrel/config.h index 56e723db8..e8899a368 100644 --- a/keyboards/handwired/steamvan/rev1/led_custom.h +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/squirrel/config.h @@ -1,5 +1,5 @@ /* -Copyright 2019 John M Daly <jmdaly@gmail.com> +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 @@ -15,8 +15,29 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ + #pragma once -void backlight_task(void); -void breathing_interrupt_disable(void); -void breathing_interrupt_enable(void); + +#define USE_SERIAL + +#define MASTER_LEFT +// #define MASTER_RIGHT +//#define EE_HANDS + +// Mouse +#undef MOUSEKEY_INTERVAL +#define MOUSEKEY_INTERVAL 15 +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 60 +#undef MOUSEKEY_WHEEL_MAX_SPEED +#define MOUSEKEY_WHEEL_MAX_SPEED 3 + +// RGB backlight +#undef RGB_DI_PIN +#define RGB_DI_PIN D3 +#undef RGBLED_NUM +#define RGBLED_NUM 30 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_LIMIT_VAL 95 +#define RGBLIGHT_SPLIT diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/squirrel/keymap.c b/keyboards/handwired/dactyl_manuform/5x6/keymaps/squirrel/keymap.c new file mode 100644 index 000000000..41d8ee94f --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/squirrel/keymap.c @@ -0,0 +1,106 @@ +/* A standard layout for the Dactyl Manuform 5x6 Keyboard */ + +#include QMK_KEYBOARD_H + +enum layer_names { + _MAC, + _WINDOWS, + _MOUSE, + _ARROWS, + _SYMBOLS, + _NUMBERS, + _MEDIA, +}; + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_MAC] = LAYOUT_5x6( + KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,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_MINS, + KC_BSPC, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, + KC_LSFT, CTL_T(KC_Z) , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_BSLASH, + KC_LALT,KC_LCTRL, KC_DEL, KC_PMNS, + KC_SPC, MO(_ARROWS), MO(_MOUSE), KC_ENT, + KC_LCMD, MO(_SYMBOLS), KC_EQL, KC_RALT, + KC_LALT, MO(_NUMBERS), MO(_MEDIA), KC_EJCT + ), + + [_WINDOWS] = LAYOUT_5x6( + + _______,_______, _______ ,_______,_______ ,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, _______, _______ , _______ , _______ ,_______,_______, + _______,_______,_______,_______,_______ ,_______, _______, _______ , _______ , _______ ,_______,_______, + _______,_______,_______,_______,_______,_______, _______, _______ , _______ , _______ ,_______ ,_______, + KC_LCMD,KC_LALT, _______, _______, + _______,_______, _______,_______, + KC_LCTRL,_______, _______,_______, + _______,_______, _______,_______ + + ), + + [_MOUSE] = LAYOUT_5x6( + + KC_F11,KC_F1, KC_F2 ,KC_F3,KC_F4 ,KC_F5, KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_F12, + _______,_______,_______,KC_WH_U,_______,_______, _______, _______ , KC_MS_U , _______ ,_______,_______, + _______,_______,KC_WH_L,KC_WH_D,KC_WH_R ,_______, KC_BTN1, KC_MS_L , KC_MS_D , KC_MS_R ,_______,_______, + _______,_______,KC_ACL0,KC_ACL1,KC_ACL2,_______, _______, KC_BTN2 , _______ , _______ ,_______ ,_______, + _______,_______, _______, RESET, + KC_BTN1,KC_BTN2, _______,_______, + _______,KC_BTN2, _______,_______, + _______,_______, _______,_______ + + ), + [_ARROWS] = LAYOUT_5x6( + + RESET,_______, _______ ,_______,_______ ,TG(_WINDOWS), _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, _______, KC_HOME , KC_UP , KC_END ,_______,_______, + _______,_______,_______,_______,_______ ,_______, KC_HOME, KC_LEFT , KC_DOWN , KC_RIGHT ,KC_END,_______, + _______,_______,_______,_______,_______,_______, _______, KC_PGDOWN , _______ , KC_PGUP ,_______ ,_______, + RESET,_______, _______, _______, + _______,_______, _______,_______, + _______,_______, _______,_______, + _______,_______, _______,_______ + + ), + [_SYMBOLS] = LAYOUT_5x6( + + _______,_______, _______ ,_______,_______ ,_______, KC_CIRC,KC_CIRC,KC_LABK,KC_RABK,_______,_______, + _______,_______,_______,_______,_______,_______, KC_LABK, KC_AT , KC_LCBR , KC_RCBR ,KC_HASH,KC_RABK, + _______,_______,_______,_______,_______ ,_______, KC_PERC, KC_EQL , KC_LPRN , KC_RPRN ,KC_DLR,KC_AMPR, + _______,_______,_______,_______,_______,_______, KC_TILD, KC_GRAVE , KC_LBRC , KC_RBRC ,KC_PIPE ,KC_EXLM, + _______,_______, KC_PPLS, KC_PMNS, + _______,_______, _______,_______, + _______,_______, _______,_______, + _______,_______, _______,_______ + + ), + [_NUMBERS] = LAYOUT_5x6( + + RESET,_______, _______ ,_______,_______ ,_______, KC_PSLS,KC_PAST,KC_PPLS,KC_PMNS,_______,_______, + _______,_______,_______,KC_PSLS,KC_PAST,_______, _______, KC_7 , KC_8 , KC_9 ,_______,_______, + _______,_______,_______,KC_PMNS,KC_PPLS ,_______, _______, KC_4 , KC_5 , KC_6 ,_______,_______, + _______,_______,_______,_______,_______,_______, _______, KC_1 , KC_2 , KC_3 ,_______ ,_______, + _______,_______, KC_0, KC_DOT, + _______,_______, _______,_______, + _______,_______, _______,_______, + _______,_______, _______,_______ + + ), + [_MEDIA] = LAYOUT_5x6( + + KC_MSTP,KC_MPRV, KC_MPLY ,KC_MNXT,_______ ,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,KC_VOLU,_______, RGB_SPI, _______ , _______ , _______ ,_______,_______, + _______,_______,_______,_______,KC_VOLD ,_______, RGB_TOG, RGB_MODE_FORWARD , RGB_HUI , RGB_SAI ,RGB_VAI,_______, + _______,_______,_______,_______,KC_MUTE,_______, RGB_SPD, RGB_MODE_REVERSE , RGB_HUD , RGB_SAD ,RGB_VAD ,_______, + _______,_______, _______, _______, + _______,_______, _______,_______, + _______,_______, _______,_______, + _______,_______, _______,_______ + + ), +}; + + diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/squirrel/rules.mk b/keyboards/handwired/dactyl_manuform/5x6/keymaps/squirrel/rules.mk new file mode 100644 index 000000000..1e3cebb14 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/squirrel/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/handwired/co60/rev7/led_custom.h b/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/config.h index 56e723db8..29ab59ad6 100644 --- a/keyboards/handwired/co60/rev7/led_custom.h +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/config.h @@ -1,5 +1,5 @@ /* -Copyright 2019 John M Daly <jmdaly@gmail.com> +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 @@ -15,8 +15,13 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ + #pragma once -void backlight_task(void); -void breathing_interrupt_disable(void); -void breathing_interrupt_enable(void); + +#define USE_SERIAL + +#define MASTER_LEFT +// #define MASTER_RIGHT +//#define EE_HANDS +// Rows are doubled-up diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/keymap.c b/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/keymap.c new file mode 100644 index 000000000..f8dfb2718 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/keymap.c @@ -0,0 +1,58 @@ +/* A Swedish XMonad layout for the Dactyl Manuform 5x6 Keyboard */ + +#include QMK_KEYBOARD_H +#include "keymap_swedish.h" + +enum dactyl_layers { + _QWERTY, + _LOWER, + _RAISE, +}; + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) +#define TERM LGUI(LSFT(KC_ENT)) +#define ALTTAB LGUI(KC_TAB) +#define KILL LGUI(LSFT(KC_C)) +#define OPEN LGUI(KC_P) +#define KC_QSM LSFT(SE_PLUS) +#define KC_AA SE_AA +#define KC_AE SE_AE +#define KC_OE SE_OSLH + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_5x6( + KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , SE_APOS, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_AA , + KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_OE , KC_AE , + KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SE_SLSH, SE_MINS, + KC_EXLM, KC_QSM , SE_PLUS, SE_EQL , + RAISE , KC_SPC , KC_ENT , LOWER , + ALTTAB , KC_LGUI, KC_BSPC, KC_DEL , + OPEN , TERM , KILL , KC_LALT + ), + + [_LOWER] = LAYOUT_5x6( + SE_TILD, KC_EXLM, SE_AT , KC_HASH, SE_DLR , KC_PERC, SE_CIRC, SE_AMPR, SE_ASTR, SE_SLSH, SE_LPRN, SE_RPRN, + SE_ACUT, _______, _______, _______, _______, _______, _______, _______, _______, _______, SE_LCBR, SE_RCBR, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, SE_LBRC, SE_RBRC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, SE_LESS, SE_GRTR, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + + ), + + [_RAISE] = LAYOUT_5x6( + KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , + _______, _______, _______, _______, _______, _______, RESET , _______, _______, _______, KC_MUTE, SE_PIPE, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END , KC_VOLU, SE_BSLS, + _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLD, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), +}; diff --git a/keyboards/handwired/dactyl_promicro/dactyl_promicro.h b/keyboards/handwired/dactyl_promicro/dactyl_promicro.h index 5dfc42f2a..61dad7f53 100644 --- a/keyboards/handwired/dactyl_promicro/dactyl_promicro.h +++ b/keyboards/handwired/dactyl_promicro/dactyl_promicro.h @@ -2,38 +2,37 @@ #include "quantum.h" - #ifdef USE_I2C #include <stddef.h> #ifdef __AVR__ - #include <avr/io.h> - #include <avr/interrupt.h> + #include <avr/io.h> + #include <avr/interrupt.h> #endif #endif #define LAYOUT_6x6(\ - 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, \ - L55, L51, L52, R53, R54, R50, \ - L53, R52, \ - L54, R51 \ - )\ - { \ - { 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 }, \ - { KC_NO, L51, L52, L53, L54, L55 }, \ + 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, \ + L55, L51, L52, R53, R54, R50, \ + L53, R52, \ + L54, R51 \ + )\ + {\ + { 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 }, \ + { KC_NO, L51, L52, L53, L54, L55 }, \ \ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { R30, R31, R32, R33, R34, R35 }, \ - { R40, R41, R42, R43, R44, R45 }, \ - { R50, R51, R52, R53, R54, KC_NO }, \ + { 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 }, \ + { R50, R51, R52, R53, R54, KC_NO } \ } diff --git a/keyboards/handwired/dactyl_promicro/info.json b/keyboards/handwired/dactyl_promicro/info.json new file mode 100644 index 000000000..7d70e9a60 --- /dev/null +++ b/keyboards/handwired/dactyl_promicro/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "Dactyl ProMicro", + "url": "", + "maintainer": "qmk", + "width": 17, + "height": 8, + "layouts": { + "LAYOUT_6x6": { + "layout": [ + {"label":"L00", "x":0, "y":0}, + {"label":"L01", "x":1, "y":0}, + {"label":"L02", "x":2, "y":0}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0}, + {"label":"L05", "x":5, "y":0}, + {"label":"R00", "x":11, "y":0}, + {"label":"R01", "x":12, "y":0}, + {"label":"R02", "x":13, "y":0}, + {"label":"R03", "x":14, "y":0}, + {"label":"R04", "x":15, "y":0}, + {"label":"R05", "x":16, "y":0}, + {"label":"L10", "x":0, "y":1}, + {"label":"L11", "x":1, "y":1}, + {"label":"L12", "x":2, "y":1}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1}, + {"label":"L15", "x":5, "y":1}, + {"label":"R10", "x":11, "y":1}, + {"label":"R11", "x":12, "y":1}, + {"label":"R12", "x":13, "y":1}, + {"label":"R13", "x":14, "y":1}, + {"label":"R14", "x":15, "y":1}, + {"label":"R15", "x":16, "y":1}, + {"label":"L20", "x":0, "y":2}, + {"label":"L21", "x":1, "y":2}, + {"label":"L22", "x":2, "y":2}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2}, + {"label":"L25", "x":5, "y":2}, + {"label":"R20", "x":11, "y":2}, + {"label":"R21", "x":12, "y":2}, + {"label":"R22", "x":13, "y":2}, + {"label":"R23", "x":14, "y":2}, + {"label":"R24", "x":15, "y":2}, + {"label":"R25", "x":16, "y":2}, + {"label":"L30", "x":0, "y":3}, + {"label":"L31", "x":1, "y":3}, + {"label":"L32", "x":2, "y":3}, + {"label":"L33", "x":3, "y":3}, + {"label":"L34", "x":4, "y":3}, + {"label":"L35", "x":5, "y":3}, + {"label":"R30", "x":11, "y":3}, + {"label":"R31", "x":12, "y":3}, + {"label":"R32", "x":13, "y":3}, + {"label":"R33", "x":14, "y":3}, + {"label":"R34", "x":15, "y":3}, + {"label":"R35", "x":16, "y":3}, + {"label":"L40", "x":0, "y":4}, + {"label":"L41", "x":1, "y":4}, + {"label":"L42", "x":2, "y":4}, + {"label":"L43", "x":3, "y":4}, + {"label":"L44", "x":4, "y":4}, + {"label":"L45", "x":5, "y":6, "h":2}, + {"label":"R40", "x":11, "y":6, "h":2 }, + {"label":"R41", "x":12, "y":4}, + {"label":"R42", "x":13, "y":4}, + {"label":"R43", "x":14, "y":4}, + {"label":"R44", "x":15, "y":4}, + {"label":"R45", "x":16, "y":4}, + {"label":"L55", "x":6, "y":6, "h":2 }, + {"label":"L51", "x":6, "y":5}, + {"label":"L52", "x":7, "y":5}, + {"label":"R53", "x":9, "y":5}, + {"label":"R54", "x":10, "y":5}, + {"label":"R50", "x":10, "y":6, "h":2 }, + {"label":"L53", "x":7, "y":6}, + {"label":"R52", "x":9, "y":6}, + {"label":"L54", "x":7, "y":7}, + {"label":"R51", "x":9, "y":7} + ] + } + } +} diff --git a/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c b/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c index 394803aef..298cddfd0 100644 --- a/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c @@ -1,6 +1,3 @@ - -/* A QWERTY 3 Layer layout for the Dactyl Manuform 6x6 Keyboard */ - #include QMK_KEYBOARD_H @@ -11,36 +8,44 @@ #define RAISE MO(_RAISE) #define LOWER MO(_LOWER) -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - - [_QWERTY] = LAYOUT_6x6( - KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSPC, - KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_MINS, - KC_LSFT , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, - KC_LCTL , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM , KC_DOT ,KC_SLSH,KC_BSLASH, - KC_PLUS , KC_LEFT,KC_UP ,KC_DOWN, KC_RGHT, RAISE , LOWER , KC_HOME, KC_PGUP, KC_PGDN,KC_END ,KC_EQL, - _______,KC_LALT,KC_PSCR, KC_LGUI, KC_SPC, KC_ENT,KC_GRAVE, KC_AT ,KC_PSCR ,_______ - - ), +#define ONE_GRV LT(1,KC_GRAVE) +#define CTL_Z LCTL_T(KC_Z) +#define ALT_SHFT LALT(KC_LSFT) +#define ALT_MENU LALT_T(KC_MENU) +#define LG_QUOT LGUI_T(KC_QUOT) +#define CTL_ESC LCTL_T(KC_ESC) +#define CTL_SLS LCTL_T(KC_SLSH) +#define LT2_COL LT(_RAISE, KC_SCLN) - - [_LOWER] = LAYOUT_6x6( - KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_DEL, - _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC, KC_P7 , KC_P8 , KC_P9 ,_______,KC_PLUS, - _______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ,KC_LPRN, KC_RPRN, KC_P4 , KC_P5 , KC_P6 ,KC_MINS,KC_PIPE, - _______,_______,_______,_______,_______,KC_PSCR, KC_P0 , KC_P1 , KC_P2 , KC_P3 ,KC_EQL ,KC_UNDS, - _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, - _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ -), - - [_RAISE] = LAYOUT_6x6( - KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 , - _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS ,KC_SLCK,KC_MUTE, - _______,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU, - _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_VOLD, - _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, - _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ - ), - - }; +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_6x6( + KC_EQL , KC_1 ,KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSPC, + KC_DEL , KC_Q ,KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_MINS, + KC_BSPC, KC_A ,KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,LT2_COL,LG_QUOT, + KC_LSFT, CTL_Z ,KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM, KC_DOT,CTL_SLS,KC_RSFT, + ONE_GRV,KC_QUOT,ALT_SHFT,KC_LEFT,KC_RGHT,KC_SPC , KC_ENT , KC_UP ,KC_DOWN,KC_LBRC,KC_RBRC,TT(_LOWER), + KC_BSPC,ALT_MENU,KC_LGUI, KC_RALT,CTL_ESC,KC_TAB , + KC_HOME, KC_PGUP, + KC_END , KC_PGDN + ), + [_LOWER] = LAYOUT_6x6( + _______,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , + _______,KC_EXLM,KC_AT ,KC_LBRC,KC_RBRC,KC_PIPE, KC_UP ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PAST,KC_F12 , + _______,KC_HASH,KC_DLR ,KC_LPRN,KC_RPRN,KC_GRV , KC_DOWN,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS,_______, + _______,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD, KC_AMPR,KC_P1 ,KC_P2 ,KC_P3 ,KC_PSLS,_______, + RESET ,_______,_______,_______,_______,_______, _______,_______,KC_PDOT,KC_P0 ,KC_PEQL,_______, + _______,_______,_______, _______,_______,_______, + _______, _______, + _______, _______ + ), + [_RAISE] = LAYOUT_6x6( + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,KC_MS_U,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,KC_MS_L,KC_MS_D,KC_MS_R,_______, _______,_______,_______,_______,_______,KC_MPLY, + _______,_______,_______,_______,_______,_______, _______,_______,KC_MPRV,KC_MNXT,_______,_______, + RESET ,_______,_______,KC_BTN1,KC_BTN2,_______, KC_WBAK,KC_VOLU,KC_VOLD,KC_MUTE,_______,_______, + _______,_______,_______, _______,_______,_______, + _______, _______, + _______, _______ + ) +}; diff --git a/keyboards/handwired/floorboard/config.h b/keyboards/handwired/floorboard/config.h new file mode 100644 index 000000000..6f2e9d0c0 --- /dev/null +++ b/keyboards/handwired/floorboard/config.h @@ -0,0 +1,252 @@ +/* +Copyright 2019 Kevin Lockwood + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kevin Lockwood +#define PRODUCT Floorboard +#define DESCRIPTION A handwired 4x12 ortholinear board + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * 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 { A2, A1, A0, B8 } +#define MATRIX_COL_PINS { B7, B6, B5, B4, B3, B2, B1, B9, B0, B15, B14, B13 } +#define UNUSED_PINS { B10, B11, B12, A14, A13, A4, A5, A6, A7, A8, A15, A10, A9 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 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 + +/* 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 */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* 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_HELP H +//#define MAGIC_KEY_HELP_ALT 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 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#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 B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#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 + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif +/* + * 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 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/floorboard/floorboard.c b/keyboards/handwired/floorboard/floorboard.c new file mode 100644 index 000000000..6317f66ac --- /dev/null +++ b/keyboards/handwired/floorboard/floorboard.c @@ -0,0 +1,17 @@ +/* Copyright 2019 Kevin Lockwood + * + * 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 "floorboard.h" diff --git a/keyboards/handwired/floorboard/floorboard.h b/keyboards/handwired/floorboard/floorboard.h new file mode 100644 index 000000000..de7f49c01 --- /dev/null +++ b/keyboards/handwired/floorboard/floorboard.h @@ -0,0 +1,41 @@ +/* Copyright 2019 Kevin Lockwood + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_ortho_4x12( \ + 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, k36, 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, k35, k36, k37, k38, k39, k3a, k3b } \ +} + diff --git a/keyboards/handwired/floorboard/info.json b/keyboards/handwired/floorboard/info.json new file mode 100644 index 000000000..6445b7611 --- /dev/null +++ b/keyboards/handwired/floorboard/info.json @@ -0,0 +1,64 @@ +{ + "keyboard_name": "Floorboard", + "url": "https://imgur.com/gJLgwQI", + "maintainer": "Kevin Lockwood", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x12": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + {"x":5, "y":1}, + {"x":6, "y":1}, + {"x":7, "y":1}, + {"x":8, "y":1}, + {"x":9, "y":1}, + {"x":10, "y":1}, + {"x":11, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4, "y":2}, + {"x":5, "y":2}, + {"x":6, "y":2}, + {"x":7, "y":2}, + {"x":8, "y":2}, + {"x":9, "y":2}, + {"x":10, "y":2}, + {"x":11, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3}, + {"x":6, "y":3}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3} + ] + } + } +} diff --git a/keyboards/handwired/floorboard/keymaps/default/keymap.c b/keyboards/handwired/floorboard/keymaps/default/keymap.c new file mode 100644 index 000000000..161dbea03 --- /dev/null +++ b/keyboards/handwired/floorboard/keymaps/default/keymap.c @@ -0,0 +1,23 @@ +/* Copyright 2019 Kevin Lockwood + * + * 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_ortho_4x12(KC_TAB, KC_SCLN, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT, KC_LSFT, KC_QUOT, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, LT(2,KC_CAPS), MO(3), KC_LGUI, KC_LALT, KC_SPC, MO(1), MO(2), KC_BSPC, KC_RALT, KC_VOLD, KC_VOLU, LT(2,KC_MPLY)), + [1] = LAYOUT_ortho_4x12(KC_PERC, KC_LBRC, KC_LCBR, KC_RCBR, KC_LPRN, KC_PEQL, KC_ASTR, KC_RPRN, KC_PLUS, KC_EXLM, KC_RBRC, KC_GRV, KC_LCTL, KC_7, KC_5, KC_3, KC_1, KC_9, KC_0, KC_2, KC_4, KC_6, KC_8, KC_MINS, KC_LSFT, KC_LBRC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLSH, KC_NO, KC_TRNS, KC_NO, KC_LGUI, KC_LALT, KC_SPC, KC_TRNS, KC_NO, KC_DEL, KC_RALT, KC_PSCR, KC_APP, KC_NO), + [2] = LAYOUT_ortho_4x12(KC_WAKE, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_SLEP, KC_LCTL, KC_NO, KC_CUT, KC_COPY, KC_PSTE, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT, KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_LGUI, KC_LALT, KC_BTN1, KC_BTN2, KC_TRNS, KC_NO, KC_RALT, KC_NO, KC_APP, KC_NO), + [3] = LAYOUT_ortho_4x12(KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LCTL, KC_F7, KC_F5, KC_F3, KC_F1, KC_F9, KC_F10, KC_F2, KC_F4, KC_F6, KC_F8, KC_NO, KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_NO, KC_DEL, KC_RALT, KC_BRID, KC_BRIU, KC_NO) +}; diff --git a/keyboards/handwired/floorboard/keymaps/default/readme.md b/keyboards/handwired/floorboard/keymaps/default/readme.md new file mode 100644 index 000000000..eed7dfd5a --- /dev/null +++ b/keyboards/handwired/floorboard/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for the Floorboard diff --git a/keyboards/handwired/floorboard/readme.md b/keyboards/handwired/floorboard/readme.md new file mode 100644 index 000000000..37c708565 --- /dev/null +++ b/keyboards/handwired/floorboard/readme.md @@ -0,0 +1,15 @@ +# Floorboard + +![Floorboard Image](https://i.imgur.com/gJLgwQI.jpg) + +I was too broke to buy the planck pcb, and I wanted the soldering practice. So here it is, in all it's glory. A handwired planck with a proton C, and the dvorak layout. Because why not. I named it the Floorboard as a callback to the planck, and because it's a couple of plays on words rolled into one. + +* Keyboard Maintainer: [Kevin Lockwood](https://github.com/kevin-b-lockwood) +* Hardware Supported: Proton C +* Hardware Availability: [Clueboard](https://clueboard.co/parts/qmk-proton-c) + +Make example for this keyboard (after setting up your build environment): + + make handwired/floorboard:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/floorboard/rules.mk b/keyboards/handwired/floorboard/rules.mk new file mode 100644 index 000000000..16f3332aa --- /dev/null +++ b/keyboards/handwired/floorboard/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +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 +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +LAYOUTS = ortho_4x12 diff --git a/keyboards/handwired/heisenberg/config.h b/keyboards/handwired/heisenberg/config.h new file mode 100644 index 000000000..9fe57cbeb --- /dev/null +++ b/keyboards/handwired/heisenberg/config.h @@ -0,0 +1,262 @@ +/* +Copyright 2019 Arda Kilicdagi + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Ardakilic +#define PRODUCT Heisenberg +#define DESCRIPTION A handwired 40% ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * 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 \ + { D3, D2, D1, D0 } +#define MATRIX_COL_PINS \ + { C6, D7, E6, B4, B6, B2, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D4 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 6 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 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 + + +/** + * Heisenberg-specific definitions + */ +#define B5_AUDIO +/** + * Heisenberg-specific definitions END + */ + + +#define TAPPING_TERM 200 +/* 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 */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* 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_HELP H +//#define MAGIC_KEY_HELP_ALT 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 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#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 B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#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 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/aranck/keymaps/default/config.h b/keyboards/handwired/heisenberg/heisenberg.c index cf888b0ad..54c8bdae9 100644 --- a/keyboards/handwired/aranck/keymaps/default/config.h +++ b/keyboards/handwired/heisenberg/heisenberg.c @@ -13,10 +13,4 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -#pragma once - -// place overrides here - -// #define RETRO_TAPPING -// #define PERMISSIVE_HOLD
\ No newline at end of file +#include "heisenberg.h"
\ No newline at end of file diff --git a/keyboards/handwired/heisenberg/heisenberg.h b/keyboards/handwired/heisenberg/heisenberg.h new file mode 100644 index 000000000..df887c2c5 --- /dev/null +++ b/keyboards/handwired/heisenberg/heisenberg.h @@ -0,0 +1,39 @@ +/* Copyright 2019 Arda Kilicdagi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_planck_mit(\ + 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, k36, k37, k38, k39, k3a \ +) \ +{ \ + { 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, k36, k37, k38, k39, k3a } \ +} diff --git a/keyboards/handwired/heisenberg/info.json b/keyboards/handwired/heisenberg/info.json new file mode 100644 index 000000000..88e0f7ce4 --- /dev/null +++ b/keyboards/handwired/heisenberg/info.json @@ -0,0 +1,62 @@ +{ + "keyboard_name": "Heisenberg", + "keyboard_folder": "handwired/heisenberg", + "url": "https://github.com/Ardakilic", + "maintainer": "Arda Kilicdagi", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_planck_mit": { + "key_count": 47, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3, "w": 2 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + } + } +} diff --git a/keyboards/handwired/heisenberg/keymaps/default/keymap.c b/keyboards/handwired/heisenberg/keymaps/default/keymap.c new file mode 100644 index 000000000..03c2a21b3 --- /dev/null +++ b/keyboards/handwired/heisenberg/keymaps/default/keymap.c @@ -0,0 +1,168 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 + + +enum heisenberg_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, + _SPACE, + _SODA, + _NUMPAD +}; + + +#define LOCKSCREEN LCTL(LSFT(KC_POWER)) // Screen Lock shortcut for OSX + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |NPdESC| A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |SftEtr| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | PWR | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_mit( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(_NUMPAD, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + LSFT_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT /*KC_ENT*/, + LT(_SODA, KC_POWER), KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), LT(_SPACE, KC_SPC), MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_mit( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_mit( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Soda Layer + * Keys that I mostly use when while chilling or taking a break :) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | Up | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Left | Down |Right | | Mute | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |Brght▼|Brght▲| + * `-----------------------------------------------------------------------------------' + */ +[_SODA] = LAYOUT_planck_mit( + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU +), + +/* Space Layer (Space Bar Layer Tap) + * ,-----------------------------------------------------------------------------------. + * | |CMD+1 |CMD+2 |CMD+3 |CMD+4 |CMD+5 |CMD+6 |CMD+7 |CMD+8 |CMD+9 |CMD+0 |LCKOSX| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | Up | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Left | Down | Right| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |Brght▼|Brght▲| + * `-----------------------------------------------------------------------------------' + */ +[_SPACE] = LAYOUT_planck_mit( + _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LOCKSCREEN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU +), + +/* Numpad Layer + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | 7 | 8 | 9 | - | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | Enter| 4 | 5 | 6 | + | * | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | Enter| 1 | 2 | 3 | + | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | 0 | 0 | . | , | = | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_planck_mit( + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_BSPC, + _______, _______, _______, _______, _______, _______, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PAST, + _______, _______, _______, _______, _______, _______, KC_PENT, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PSLS, + _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, KC_PDOT, KC_PCMM, KC_PEQL +), + + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset|EEPRst| RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |MUSmod|Aud on|Audoff| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_mit( + _______, RESET, EEP_RST, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, _______, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +// Enable the adjust layer when both lower and +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +}
\ No newline at end of file diff --git a/keyboards/handwired/heisenberg/keymaps/default/readme.md b/keyboards/handwired/heisenberg/keymaps/default/readme.md new file mode 100644 index 000000000..7ab5d474e --- /dev/null +++ b/keyboards/handwired/heisenberg/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Heisenberg diff --git a/keyboards/handwired/heisenberg/keymaps/turkishish/config.h b/keyboards/handwired/heisenberg/keymaps/turkishish/config.h new file mode 100644 index 000000000..0810a3b23 --- /dev/null +++ b/keyboards/handwired/heisenberg/keymaps/turkishish/config.h @@ -0,0 +1,24 @@ +/* Copyright 2019 Arda Kilicdagi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +// place overrides here + +#define RETRO_TAPPING +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_FORCE_HOLD
\ No newline at end of file diff --git a/keyboards/handwired/heisenberg/keymaps/turkishish/keymap.c b/keyboards/handwired/heisenberg/keymaps/turkishish/keymap.c new file mode 100644 index 000000000..2581e01bf --- /dev/null +++ b/keyboards/handwired/heisenberg/keymaps/turkishish/keymap.c @@ -0,0 +1,232 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 + + +enum heisenberg_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, + _SPACE, + _SODA, + _NUMPAD +}; + +//KC_NONUS_BSLASH (\|) is equivalent to ["é] key in Turkish keyboards. +//KC_GRV (~ `) is equivalent to [<>|] key in Turkish keyboards. +// KC_SCLN is Turkish s [şŞ] key +// KC_QUOT is Turkish i [iİ] key +// KC_COMM is Turkish o [öÖ] key +// KC_DOT is Turkish c [çÇ] key + +// Custom shortcuts specific to Turkish layout +#define CURLY_OPEN RALT(KC_7) +#define CURLY_CLOSE RALT(KC_0) +#define SQUARE_OPEN RALT(KC_8) +#define SQUARE_CLOSE RALT(KC_9) +#define DOLLAR_SIGN RALT(KC_4) +#define BACKSLASH RALT(KC_MINS) +#define VERTICAL_PIPE RALT(KC_EQL) +#define BACKTICK RALT(KC_BSLS) +#define TILDE RALT(KC_RBRC) +#define NUMBER_SIGN RALT(KC_3) +#define LOCKSCREEN LCTL(LSFT(KC_POWER)) // Screen Lock shortcut for OSX + +/* +// Unicode Turkish characters, in case it's needed +enum { + TR_C, // ç + TR_C_L, // Ç + TR_I, // ı + TR_I_L, // İ + TR_G, // ğ + TR_G_L, // Ğ + TR_S, // ş + TR_S_L, // Ş + TR_U, // ü + TR_U_L, // Ü + TR_O, // ö + TR_O_L, // Ö +}; + +// clang-format off +const uint32_t PROGMEM unicode_map[] = { + [TR_C] = 0x00c7, + [TR_C_L] = 0x00e7, + [TR_I] = 0x0130, + [TR_I_L] = 0x0131, + [TR_G] = 0x011e, + [TR_G_L] = 0x011f, + [TR_S] = 0x015e, + [TR_S_L] = 0x015f, + [TR_U] = 0x00dc, + [TR_U_L] = 0x00fc, + [TR_O] = 0x00d6, + [TR_O_L] = 0x00f6, +}; +// clang-format on +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |NPdEsc| A | S | D | F | G | H | J | K | L | Ş | İ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |SftCps| Z | X | C | V | B | N | M | Ö | Ç | . |SftEtr| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Sda|<>| Ctrl | Alt | OS |Lowr|,| Space* |Rise|"| Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_mit( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(_NUMPAD, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + LSFT_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT /*KC_ENT*/, + LT(_SODA, KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LT(_LOWER, KC_BSLS), LT(_SPACE, KC_SPC), LT(_RAISE, KC_NONUS_BSLASH), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | > | ! | ' | ^ | + | % | & | / | ( | ) | = | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | ? | _ | Ğ | Ü | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | "$" | "{" | "}" | < | ">" | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | "[" | "]" | ' | " | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_mit( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_EQL, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DOLLAR_SIGN, CURLY_OPEN, CURLY_CLOSE, KC_GRV, LSFT(KC_GRV), + _______, _______, _______, _______, _______, _______, _______, SQUARE_OPEN, SQUARE_CLOSE, LSFT(KC_2), KC_NONUS_BSLASH +), + + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | <>| | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | * | - | "\" | "|" | , | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | # | " | "~" | "`" | <>| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_mit( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, BACKSLASH, VERTICAL_PIPE, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMBER_SIGN, KC_NUBS, TILDE, BACKTICK, KC_GRV, + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Soda Layer + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | Up | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Left | Down |Right | | Mute | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |Brght▼|Brght▲| + * `-----------------------------------------------------------------------------------' + */ +[_SODA] = LAYOUT_planck_mit( + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU +), + +/* Space Layer (Space Bar Layer Tap) + * ,-----------------------------------------------------------------------------------. + * | |CMD+1 |CMD+2 |CMD+3 |CMD+4 |CMD+5 |CMD+6 |CMD+7 |CMD+8 |CMD+9 |CMD+0 |LCKOSX| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | Up | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Left | Down |Right | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |Brght▼|Brght▲| + * `-----------------------------------------------------------------------------------' + */ +[_SPACE] = LAYOUT_planck_mit( + _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LOCKSCREEN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU +), + + +/* Numpad Layer + * KC_PDOT is comma on the Turkish layout ¯\_(ツ)_/¯ + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | 7 | 8 | 9 | - | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | Enter| 4 | 5 | 6 | + | * | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | Enter| 1 | 2 | 3 | + | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | 0 | 0 | . | , | = | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_planck_mit( + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_BSPC, + _______, _______, _______, _______, _______, _______, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PAST, + _______, _______, _______, _______, _______, _______, KC_PENT, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PSLS, + _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, KC_SLSH, KC_PDOT, KC_PEQL +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset|EEPRom| RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |MUSmod|Aud on|Audoff| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_mit( + _______, RESET, EEP_RST, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, _______, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +// Enable the adjust layer when both lower and +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +// I like greenish cyan for my single colored animations +//extern rgblight_config_t rgblight_config; +void keyboard_post_init_user(void) { + //rgblight_config.hue = 100; + //rgblight_config.sat = 255; + //rgblight_config.val = 255; + rgblight_enable_noeeprom(); // enables Rgb, without saving settings + rgblight_sethsv_noeeprom(100, 255, 255); // sets the color to greenish without saving + //rgblight_sethsv_noeeprom_turquoise(); + +}
\ No newline at end of file diff --git a/keyboards/handwired/heisenberg/keymaps/turkishish/readme.md b/keyboards/handwired/heisenberg/keymaps/turkishish/readme.md new file mode 100644 index 000000000..d994401bb --- /dev/null +++ b/keyboards/handwired/heisenberg/keymaps/turkishish/readme.md @@ -0,0 +1,5 @@ +# The Turkishish keymap for Heisenberg + +You can flash the "turkishish" layout (which I'm currently using) like: + + make handwired/heisenberg:turkishish
\ No newline at end of file diff --git a/keyboards/handwired/heisenberg/readme.md b/keyboards/handwired/heisenberg/readme.md new file mode 100644 index 000000000..bb3bca090 --- /dev/null +++ b/keyboards/handwired/heisenberg/readme.md @@ -0,0 +1,14 @@ +# Heisenberg + +![heisenberg](https://i.imgur.com/BthPF7A.png) + +A handwired 40% ortholinear keyboard with underglow LEDs and a passive buzzer. + +* Keyboard Maintainer: [Arda Kilicdagi](https://github.com/ardakilic) +* Hardware Supported: Pro Micro + +Make example for this keyboard (after setting up your build environment): + + make handwired/heisenberg:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/heisenberg/rules.mk b/keyboards/handwired/heisenberg/rules.mk new file mode 100644 index 000000000..2fd710029 --- /dev/null +++ b/keyboards/handwired/heisenberg/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # 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 +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = yes # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LAYOUTS = planck_mit diff --git a/keyboards/handwired/hexon38/config.h b/keyboards/handwired/hexon38/config.h index e9e1eb4d2..1176d3fa5 100644 --- a/keyboards/handwired/hexon38/config.h +++ b/keyboards/handwired/hexon38/config.h @@ -49,6 +49,3 @@ /* Locking resynchronize hack */ //#define LOCKING_RESYNC_ENABLE - -/* prevent stuck modifiers */ -//#define PREVENT_STUCK_MODIFIERS diff --git a/keyboards/handwired/hnah40/readme.md b/keyboards/handwired/hnah40/readme.md index 20e2d7127..a15800dae 100644 --- a/keyboards/handwired/hnah40/readme.md +++ b/keyboards/handwired/hnah40/readme.md @@ -10,7 +10,11 @@ Hardware Availability: https://github.com/vuhopkep/PCB/tree/master/Hnah40-Atmega Make example for this keyboard (after setting up your build environment): - make handwired/hnah40:default:program + make handwired/hnah40:default + +Flashing example for this keyboard: + + make handwired/hnah40:default:flash ## Bootloader use usbasploader from hsgw. diff --git a/keyboards/handwired/hnah40/rules.mk b/keyboards/handwired/hnah40/rules.mk index bbdf5176c..a705bff6a 100644 --- a/keyboards/handwired/hnah40/rules.mk +++ b/keyboards/handwired/hnah40/rules.mk @@ -11,15 +11,9 @@ MCU = atmega328p # ATmega328P USBasp BOOTLOADER = USBasp -# Flash program via avrdude, but default command is not suitable. -# You can use hnah40:default:program -PROGRAM_CMD = avrdude -c usbasp -p m328p -U flash:w:$(BUILD_DIR)/$(TARGET).hex - - # disable debug code OPT_DEFS = -DDEBUG_LEVEL=0 - # Build Options # change yes to no to disable # diff --git a/keyboards/handwired/jot50/keymaps/default/keymap.c b/keyboards/handwired/jot50/keymaps/default/keymap.c index 7342dcd22..7b674af52 100644 --- a/keyboards/handwired/jot50/keymaps/default/keymap.c +++ b/keyboards/handwired/jot50/keymaps/default/keymap.c @@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/handwired/jotanck/jotanck.c b/keyboards/handwired/jotanck/jotanck.c index 812781c3b..caf0ad014 100644 --- a/keyboards/handwired/jotanck/jotanck.c +++ b/keyboards/handwired/jotanck/jotanck.c @@ -1,10 +1,12 @@ #include "jotanck.h" void matrix_init_kb(void) { - matrix_init_user(); + matrix_init_user(); } -void keyboard_pre_init_user() { - setPinOutput(JOTANCK_LED1); - setPinOutput(JOTANCK_LED2); +void keyboard_pre_init_kb() { + setPinOutput(JOTANCK_LED1); + setPinOutput(JOTANCK_LED2); + + keyboard_pre_init_user(); } diff --git a/keyboards/handwired/jotanck/keymaps/default/keymap.c b/keyboards/handwired/jotanck/keymaps/default/keymap.c index 2467559a6..3de30d396 100644 --- a/keyboards/handwired/jotanck/keymaps/default/keymap.c +++ b/keyboards/handwired/jotanck/keymaps/default/keymap.c @@ -78,9 +78,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { #ifdef JOTANCK_LEDS - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _LOWER: writePinHigh(JOTANCK_LED1); writePinLow(JOTANCK_LED2); diff --git a/keyboards/handwired/k_numpad17/config.h b/keyboards/handwired/k_numpad17/config.h new file mode 100644 index 000000000..e14101ede --- /dev/null +++ b/keyboards/handwired/k_numpad17/config.h @@ -0,0 +1,53 @@ +/* +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/>. +*/ + +#pragma once + +#include "config_common.h" +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Handwired +#define PRODUCT K-Numpad17 +#define DESCRIPTION QMK keyboard firmware for handwired numpad with 17 keys + +#define TAPPING_TERM 400 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { D1, D4, C6, D7, E6 } +#define MATRIX_COL_PINS { B2, B1, F6 , F4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 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 + + diff --git a/keyboards/handwired/k_numpad17/k_numpad17.c b/keyboards/handwired/k_numpad17/k_numpad17.c new file mode 100644 index 000000000..290a86aac --- /dev/null +++ b/keyboards/handwired/k_numpad17/k_numpad17.c @@ -0,0 +1 @@ +#include "k_numpad17.h"
\ No newline at end of file diff --git a/keyboards/handwired/k_numpad17/k_numpad17.h b/keyboards/handwired/k_numpad17/k_numpad17.h new file mode 100644 index 000000000..1fc99794d --- /dev/null +++ b/keyboards/handwired/k_numpad17/k_numpad17.h @@ -0,0 +1,35 @@ +#pragma once +#include "quantum.h" + +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT_numpad_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, \ + k20, k21, k22, k13, \ + k30, k31, k32, \ + k40, k41, k33 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, KC_NO}, \ + {k30, k31, k32, k33}, \ + {k40, KC_NO, k41, KC_NO} \ +} + +/* matrix layout + * ,-------------------. + * | 00 | 01 | 02 | 03 | + * |----|----|----|----| + * | 10 | 11 | 12 | | + * |----|----|----| 13 | + * | 20 | 21 | 22 | | + * |----|----|----|----| + * | 30 | 31 | 32 | | + * |----|----|----| 33 | + * | 40 | 41 | | + * `-------------------' + */ + + diff --git a/keyboards/handwired/k_numpad17/keymaps/default/keymap.c b/keyboards/handwired/k_numpad17/keymaps/default/keymap.c new file mode 100644 index 000000000..2f383eea9 --- /dev/null +++ b/keyboards/handwired/k_numpad17/keymaps/default/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ,-------------------. + * | NL | / | * | - | + * |----|----|----|----| + * | 7 | 8 | 9 | | + * |----|----|----| + | + * | 4 | 5 | 6 | | + * |----|----|----|----| + * | 1 | 2 | 3 | | + * |----|----|----| En | + * | 0 | . | | + * `-------------------' + */ + + [0] = LAYOUT_numpad_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ), +}; diff --git a/keyboards/handwired/k_numpad17/keymaps/karlssn/keymap.c b/keyboards/handwired/k_numpad17/keymaps/karlssn/keymap.c new file mode 100644 index 000000000..c2f314116 --- /dev/null +++ b/keyboards/handwired/k_numpad17/keymaps/karlssn/keymap.c @@ -0,0 +1,61 @@ +#include QMK_KEYBOARD_H + +//Tap Dance Declarations +enum { + TD_DOT_COMMAS = 0 +}; + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + //Tap once for Esc, twice for Caps Lock + [TD_DOT_COMMAS] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, KC_COMMA) +// Other declarations would go here, separated by commas, if you have them +}; + +//In Layer declaration, add tap dance item in place of a key code + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ,-------------------. + * |bcsp| / | * | - | + * |----|----|----|----| + * | 7 | 8 | 9 | | + * |----|----|----| + | + * | 4 | 5 | 6 | | + * |----|----|----|----| + * | 1 | 2 | 3 | | + * |----|----|----| En | + * | FN/0 | . | | + * `-------------------' + */ + + [0] = LAYOUT_numpad_5x4( + KC_BSPC, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + LT(1, KC_P0), TD(TD_DOT_COMMAS), KC_PENT + ), + /* + * ,-------------------. + * | F10| F11| F12| - | + * |----|----|----|----| + * | F7 | F8 | F9 | | + * |----|----|----| vol| + * | F4 | F5 | F6 | + | + * |----|----|----|----| + * | F1 | F2 | F3 | vol| + * |----|----|----| - | + * | FN | . | | + * `-------------------' + */ + [1] = LAYOUT_numpad_5x4( + KC_F10, KC_F11, KC_F12, KC_NO, + KC_F7, KC_F8, KC_F9, + KC_F4, KC_F5, KC_F6, KC_VOLU, + KC_F1, KC_F2, KC_F3, + KC_NO, KC_PDOT, KC_VOLD + ) +}; diff --git a/keyboards/handwired/k_numpad17/keymaps/karlssn/rules.mk b/keyboards/handwired/k_numpad17/keymaps/karlssn/rules.mk new file mode 100644 index 000000000..e5ddcae8d --- /dev/null +++ b/keyboards/handwired/k_numpad17/keymaps/karlssn/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/handwired/k_numpad17/readme.md b/keyboards/handwired/k_numpad17/readme.md new file mode 100644 index 000000000..76bbaf439 --- /dev/null +++ b/keyboards/handwired/k_numpad17/readme.md @@ -0,0 +1,25 @@ +# K-Numpad17 +<img src="https://i.imgur.com/MasSa71.jpg" alt="k-numpad" width="400"/> + +### Arduino Pro Micro Pinout +| rows | 0 | 1 | 2 | 3 | 4 | +| ----------- | --- | --- | --- | --- | --- | +| arduino pin | 2 | 4 | 5 | 6 | 7 | +| qmk pin | D1 | D4 | C6 | D7 | E6 | + +| columns | 0 | 1 | 2 | 3 | +| ----------- | --- | --- | --- | --- | +| arduino pin | 16 | 15 | A1 | A3 | +| qmk pin | B5 | B4 | B3 | C3 | + + +Make example for this keyboard (after setting up your build environment): + + make handwired/k_numpad17:default + +Bootmagic is enabled. Press the key at (0,0) while plugging the keyboard in to jump to bootloader. This is numlock in the default keymap. + +* Keyboard Maintainer: [Karlssn](https://github.com/Karlssn) +* Hardware Availability: [Casefile](https://www.thingiverse.com/thing:4062409) + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
\ No newline at end of file diff --git a/keyboards/handwired/k_numpad17/rules.mk b/keyboards/handwired/k_numpad17/rules.mk new file mode 100644 index 000000000..e1f2d2a14 --- /dev/null +++ b/keyboards/handwired/k_numpad17/rules.mk @@ -0,0 +1,31 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # Key at 0,0 makes the keyboard go into bootloader +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +TAP_DANCE_ENABLE = no + +LAYOUTS = numpad_5x4 diff --git a/keyboards/handwired/magicforce61/keymaps/default/keymap.c b/keyboards/handwired/magicforce61/keymaps/default/keymap.c index 12252c978..5f4440a17 100644 --- a/keyboards/handwired/magicforce61/keymaps/default/keymap.c +++ b/keyboards/handwired/magicforce61/keymaps/default/keymap.c @@ -7,7 +7,6 @@ #define KC_X0 LT(_FN2, KC_GRV) #define KC_X1 MO(_FN1) #define NAV_ESC LT(_FN1, KC_ESC) -#define KC_GUI MAGIC_UNNO_GUI const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( diff --git a/keyboards/handwired/minorca/config.h b/keyboards/handwired/minorca/config.h index fea201b9c..acaf26e95 100644 --- a/keyboards/handwired/minorca/config.h +++ b/keyboards/handwired/minorca/config.h @@ -15,8 +15,7 @@ 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 +#pragma once #include "config_common.h" @@ -24,9 +23,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6660 #define DEVICE_VER 0x0001 -#define MANUFACTURER ME -#define PRODUCT MinOrca -#define DESCRIPTION Tiny Whale +#define MANUFACTURER panc.co +#define PRODUCT Minorca +#define DESCRIPTION QMK Firmware for panc.co Minorca /* key matrix size */ #define MATRIX_ROWS 4 @@ -72,4 +71,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#endif + +/* bootmagic salt key */ +#define BOOTMAGIC_KEY_SALT KC_ESC + +/* skip bootmagic and eeconfig */ +#define BOOTMAGIC_KEY_SKIP KC_SPACE diff --git a/keyboards/handwired/minorca/info.json b/keyboards/handwired/minorca/info.json index dafee6345..d1ae1171f 100644 --- a/keyboards/handwired/minorca/info.json +++ b/keyboards/handwired/minorca/info.json @@ -1,55 +1,55 @@ { - "keyboard_name": "Minorca Handwired", - "url": "", - "maintainer": "qmk", - "width": 12, - "height": 4, - "layouts": { - "LAYOUT": { - "layout": [ - {"label":"KA00", "x":0, "y":0}, - {"label":"KA01", "x":1, "y":0}, - {"label":"KA02", "x":2, "y":0}, - {"label":"KA03", "x":3, "y":0}, - {"label":"KA04", "x":4, "y":0}, - {"label":"KA05", "x":5, "y":0}, - {"label":"KA06", "x":6, "y":0}, - {"label":"KA07", "x":7, "y":0}, - {"label":"KA08", "x":8, "y":0}, - {"label":"KA09", "x":9, "y":0}, - {"label":"KA10", "x":10, "y":0}, - {"label":"KA11", "x":11, "y":0}, - {"label":"KB00", "x":0, "y":1, "w":1.25}, - {"label":"KB01", "x":1.25, "y":1}, - {"label":"KB02", "x":2.25, "y":1}, - {"label":"KB03", "x":3.25, "y":1}, - {"label":"KB04", "x":4.25, "y":1}, - {"label":"KB05", "x":5.25, "y":1}, - {"label":"KB06", "x":6.25, "y":1}, - {"label":"KB07", "x":7.25, "y":1}, - {"label":"KB08", "x":8.25, "y":1}, - {"label":"KB09", "x":9.25, "y":1}, - {"label":"KB11", "x":10.25, "y":1, "w":1.75}, - {"label":"KC00", "x":0, "y":2, "w":1.75}, - {"label":"KC02", "x":1.75, "y":2}, - {"label":"KC03", "x":2.75, "y":2}, - {"label":"KC04", "x":3.75, "y":2}, - {"label":"KC05", "x":4.75, "y":2}, - {"label":"KC06", "x":5.75, "y":2}, - {"label":"KC07", "x":6.75, "y":2}, - {"label":"KC08", "x":7.75, "y":2}, - {"label":"KC09", "x":8.75, "y":2}, - {"label":"KC10", "x":9.75, "y":2}, - {"label":"KC11", "x":10.75, "y":2, "w":1.25}, - {"label":"KD00", "x":0, "y":3, "w":1.25}, - {"label":"KD02", "x":1.25, "y":3, "w":1.25}, - {"label":"KD03", "x":2.5, "y":3, "w":1.25}, - {"label":"KD04", "x":3.75, "y":3, "w":2.25}, - {"label":"KD07", "x":6, "y":3, "w":2.25}, - {"label":"KD09", "x":8.25, "y":3, "w":1.25}, - {"label":"KD10", "x":9.5, "y":3}, - {"label":"KD11", "x":10.5, "y":3, "w":1.5} - ] + "keyboard_name": "Minorca Handwired", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K07", "x":7, "y":0}, + {"label":"K08", "x":8, "y":0}, + {"label":"K09", "x":9, "y":0}, + {"label":"K0A", "x":10, "y":0}, + {"label":"K0B", "x":11, "y":0}, + {"label":"K10", "x":0, "y":1, "w":1.25}, + {"label":"K11", "x":1.25, "y":1}, + {"label":"K12", "x":2.25, "y":1}, + {"label":"K13", "x":3.25, "y":1}, + {"label":"K14", "x":4.25, "y":1}, + {"label":"K15", "x":5.25, "y":1}, + {"label":"K16", "x":6.25, "y":1}, + {"label":"K17", "x":7.25, "y":1}, + {"label":"K18", "x":8.25, "y":1}, + {"label":"K19", "x":9.25, "y":1}, + {"label":"K1B", "x":10.25, "y":1, "w":1.75}, + {"label":"K20", "x":0, "y":2, "w":1.75}, + {"label":"K22", "x":1.75, "y":2}, + {"label":"K23", "x":2.75, "y":2}, + {"label":"K24", "x":3.75, "y":2}, + {"label":"K25", "x":4.75, "y":2}, + {"label":"K26", "x":5.75, "y":2}, + {"label":"K27", "x":6.75, "y":2}, + {"label":"K28", "x":7.75, "y":2}, + {"label":"K29", "x":8.75, "y":2}, + {"label":"K2A", "x":9.75, "y":2}, + {"label":"K2B", "x":10.75, "y":2, "w":1.25}, + {"label":"K30", "x":0, "y":3, "w":1.25}, + {"label":"K32", "x":1.25, "y":3, "w":1.25}, + {"label":"K33", "x":2.5, "y":3, "w":1.25}, + {"label":"K34", "x":3.75, "y":3, "w":2.25}, + {"label":"K37", "x":6, "y":3, "w":2.25}, + {"label":"K39", "x":8.25, "y":3, "w":1.25}, + {"label":"K3A", "x":9.5, "y":3}, + {"label":"K3B", "x":10.5, "y":3, "w":1.5} + ] + } } - } } diff --git a/keyboards/handwired/minorca/keymaps/default/config.h b/keyboards/handwired/minorca/keymaps/default/config.h deleted file mode 100644 index c19ad7372..000000000 --- a/keyboards/handwired/minorca/keymaps/default/config.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -// place overrides here - - -/* bootmagic salt key */ -#define BOOTMAGIC_KEY_SALT KC_ESC - -/* skip bootmagic and eeconfig */ -#define BOOTMAGIC_KEY_SKIP KC_SPACE diff --git a/keyboards/handwired/minorca/keymaps/default/rules.mk b/keyboards/handwired/minorca/keymaps/default/rules.mk deleted file mode 100644 index 584798d1a..000000000 --- a/keyboards/handwired/minorca/keymaps/default/rules.mk +++ /dev/null @@ -1,21 +0,0 @@ - - -# 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 = 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 -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 = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/minorca/keymaps/rgb/config.h b/keyboards/handwired/minorca/keymaps/rgb/config.h index 43b3c5911..d3715d054 100644 --- a/keyboards/handwired/minorca/keymaps/rgb/config.h +++ b/keyboards/handwired/minorca/keymaps/rgb/config.h @@ -1,13 +1,4 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -/* bootmagic salt key */ -#define BOOTMAGIC_KEY_SALT KC_ESC - -/* skip bootmagic and eeconfig */ -#define BOOTMAGIC_KEY_SKIP KC_SPACE +#pragma once /* ws2812 RGB LED */ #define RGB_DI_PIN D5 @@ -16,5 +7,3 @@ #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 - -#endif diff --git a/keyboards/handwired/minorca/keymaps/rgb/readme.md b/keyboards/handwired/minorca/keymaps/rgb/readme.md index ec3b4f00f..4e9917789 100644 --- a/keyboards/handwired/minorca/keymaps/rgb/readme.md +++ b/keyboards/handwired/minorca/keymaps/rgb/readme.md @@ -1,4 +1,4 @@ -#RGB backlight for MinOrca +# RGB backlight for MinOrca ![wiring](https://i.imgur.com/jyYyiSS.jpg) @@ -8,16 +8,18 @@ http://www.40percent.club/2016/08/tiny-whale.html The keymap is a work in progress. The RGB functions are accessed by holding down the TAB key. -* Tab + Z Toggle on/off -* Tab + X Mode -* Tab + C Hue+ -* Tab + V Hue- -* Tab + B Saturation+ -* Tab + N Saturation- -* Tab + M Brightness+ -* Tab + , Brightness- - -Example wiring: +Shortcut | Function +:------- | :----- +Tab + Z | Toggle on/off +Tab + X | Mode +Tab + C | Hue+ +Tab + V | Hue- +Tab + B | Saturation+ +Tab + N | Saturation- +Tab + M | Brightness+ +Tab + , | Brightness- + +## Example wiring: WS2812 data pin is connected to D5 diff --git a/keyboards/handwired/minorca/keymaps/rgb/rules.mk b/keyboards/handwired/minorca/keymaps/rgb/rules.mk index 6e430d59e..faa034d88 100644 --- a/keyboards/handwired/minorca/keymaps/rgb/rules.mk +++ b/keyboards/handwired/minorca/keymaps/rgb/rules.mk @@ -1,21 +1 @@ - - -# 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 = 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 -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 = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight diff --git a/keyboards/handwired/minorca/minorca.c b/keyboards/handwired/minorca/minorca.c index 24e72c2a5..dbae0b0f9 100644 --- a/keyboards/handwired/minorca/minorca.c +++ b/keyboards/handwired/minorca/minorca.c @@ -1,6 +1 @@ #include "minorca.h" - -void matrix_init_kb(void) { - - matrix_init_user(); -}
\ No newline at end of file diff --git a/keyboards/handwired/minorca/minorca.h b/keyboards/handwired/minorca/minorca.h index 2df4ebdc4..ca524caf5 100644 --- a/keyboards/handwired/minorca/minorca.h +++ b/keyboards/handwired/minorca/minorca.h @@ -1,18 +1,15 @@ -#ifndef MINORCA_H -#define MINORCA_H +#pragma once #include "quantum.h" #define LAYOUT( \ - KA00, KA01, KA02, KA03, KA04, KA05, KA06, KA07, KA08, KA09, KA10, KA11, \ - KB00, KB01, KB02, KB03, KB04, KB05, KB06, KB07, KB08, KB09, KB11, \ - KC00, KC02, KC03, KC04, KC05, KC06, KC07, KC08, KC09, KC10, KC11, \ - KD00, KD02, KD03, KD04, KD07, KD09, KD10, KD11 \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1B, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K32, K33, K34, K37, K39, K3A, K3B \ ) { \ - { KA00, KA01, KA02, KA03, KA04, KA05, KA06, KA07, KA08, KA09, KA10, KA11 }, \ - { KB00, KB01, KB02, KB03, KB04, KB05, KB06, KB07, KB08, KB09, KC_NO, KB11 }, \ - { KC00, KC_NO, KC02, KC03, KC04, KC05, KC06, KC07, KC08, KC09, KC10, KC11 }, \ - { KD00, KC_NO, KD02, KD03, KD04, KC_NO, KC_NO, KD07, KC_NO, KD09, KD10, KD11 } \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, K1B }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, KC_NO, K32, K33, K34, KC_NO, KC_NO, K37, KC_NO, K39, K3A, K3B } \ } - -#endif diff --git a/keyboards/handwired/minorca/readme.md b/keyboards/handwired/minorca/readme.md index c91045960..46d310c61 100644 --- a/keyboards/handwired/minorca/readme.md +++ b/keyboards/handwired/minorca/readme.md @@ -1,10 +1,10 @@ -# minorca +# Minorca A handwired 40% keyboard by panc.co. -Keyboard Maintainer: [The QMK Community](https://github.com/qmk) -Hardware Supported: panc.co minorca -Hardware Availability: [panc.co](https://www.panc.co/blog/minorcasebright-information-page) +* Keyboard Maintainer: [The QMK Community](https://github.com/qmk) +* Hardware Supported: panc.co Minorca, Teensy 2.0 +* Hardware Availability: [panc.co](https://www.panc.co/blog/minorcasebright-information-page) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/handwired/minorca/rules.mk b/keyboards/handwired/minorca/rules.mk index 5c29c0c93..195749ceb 100644 --- a/keyboards/handwired/minorca/rules.mk +++ b/keyboards/handwired/minorca/rules.mk @@ -12,21 +12,22 @@ MCU = atmega32u4 BOOTLOADER = halfkay # 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 +# 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) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug 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 +# 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 -MIDI_ENABLE = no # MIDI controls +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/onekey/bluepill/rules.mk b/keyboards/handwired/onekey/bluepill/rules.mk index aeda2782b..69436650b 100644 --- a/keyboards/handwired/onekey/bluepill/rules.mk +++ b/keyboards/handwired/onekey/bluepill/rules.mk @@ -1,41 +1,10 @@ -# GENERIC STM32F103C8T6 board - stm32duino bootloader -BOARD = GENERIC_STM32_F103 +# MCU name +MCU = STM32F103 +# GENERIC STM32F103C8T6 board - stm32duino bootloader OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader +BOARD = GENERIC_STM32_F103 DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS ?= -v 1eaf -p 0003 - -# OPT_DEFS = -# MCU_LDSCRIPT = STM32F103x8 -# BOARD = GENERIC_STM32_F103 - -## chip/board settings -# the next two should match the directories in -# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F1xx -# linker script to use -# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ -# or <this_dir>/ld/ -# startup code to use -# is should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f1xx -# it should exist either in <chibios>/os/hal/boards/ -# or <this_dir>/boards -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m3 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards/<FOO>/bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf -# This also requires a patch to chibios: -# <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch -#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 +DFU_SUFFIX_ARGS = -v 1eaf -p 0003 diff --git a/keyboards/handwired/onekey/stm32f0_disco/rules.mk b/keyboards/handwired/onekey/stm32f0_disco/rules.mk index 69639f940..fe5e3f824 100644 --- a/keyboards/handwired/onekey/stm32f0_disco/rules.mk +++ b/keyboards/handwired/onekey/stm32f0_disco/rules.mk @@ -1,34 +1,2 @@ -## chip/board settings -# the next two should match the directories in -# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F0xx -# linker script to use -# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ -# or <this_dir>/ld/ -MCU_LDSCRIPT = STM32F072xB -# startup code to use -# is should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f0xx -# it should exist either in <chibios>/os/hal/boards/ -# or <this_dir>/boards -BOARD = ST_STM32F072B_DISCOVERY -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m0 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 6 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards/<FOO>/bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf -# This also requires a patch to chibios: -# <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch -#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p df11 -v 0483 +# MCU name +MCU = STM32F072 diff --git a/keyboards/handwired/p65rgb/config.h b/keyboards/handwired/p65rgb/config.h new file mode 100644 index 000000000..c3900c7ec --- /dev/null +++ b/keyboards/handwired/p65rgb/config.h @@ -0,0 +1,64 @@ +/* +Copyright 2019 marhalloweenvt + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x75B4 +#define DEVICE_VER 0x0001 +#define MANUFACTURER marhalloweenvt +#define PRODUCT p65rgb +#define DESCRIPTION Replacement PCB for e6.5 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 17 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { C7, C6, B6, B5, D5 } +#define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B0, B1, B2, B3, B7, D0, D1, D2, D3, D7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN B4 +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_LED_PROCESS_LIMIT 4 +#define RGB_MATRIX_LED_FLUSH_LIMIT 26 +#define DRIVER_LED_TOTAL 83 +#define RGBLIGHT_LIMIT_VAL 180 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 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 + +#define QMK_ESC_OUTPUT E6 // usually COL +#define QMK_ESC_INPUT C7 // usually ROW diff --git a/keyboards/handwired/p65rgb/info.json b/keyboards/handwired/p65rgb/info.json new file mode 100644 index 000000000..b3901525d --- /dev/null +++ b/keyboards/handwired/p65rgb/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "p65rgb", + "url": "", + "maintainer": "marhalloweenvt", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "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":"~", "x":13, "y":0}, + {"label":"|", "x":14, "y":0}, + {"label":"Delete", "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":"Backspace", "x":13.5, "y":1, "w":1.5}, + {"label":"PgUp", "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}, + {"label":"Enter", "x":13.75, "y":2, "w":1.25}, + {"label":"PgDn", "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}, + {"label":"Up", "x":14, "y":3}, + {"label":"Fn", "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":"Fn", "x":10, "y":4, "w":1.25}, + {"label":"Menu", "x":11.25, "y":4, "w":1.25}, + {"label":"Left", "x":13, "y":4}, + {"label":"Down", "x":14, "y":4}, + {"label":"Right", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/handwired/p65rgb/keymaps/default/keymap.c b/keyboards/handwired/p65rgb/keymaps/default/keymap.c new file mode 100644 index 000000000..2a9f6cc71 --- /dev/null +++ b/keyboards/handwired/p65rgb/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2019 marhalloweenvt + * + * 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( /* Base */ + 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_GRV, KC_BSLS, KC_DEL, + 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_PGUP, + CTL_T(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_ENT, KC_PGDN, + 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, TO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_APP, KC_LEFT, KC_DOWN, KC_RIGHT), + [1] = LAYOUT( /* FN */ + KC_GESC, 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_TRNS, KC_INS, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_HOME, + CTL_T(KC_CAPS),RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, KC_END, + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, NK_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), + +}; diff --git a/keyboards/handwired/p65rgb/p65rgb.c b/keyboards/handwired/p65rgb/p65rgb.c new file mode 100644 index 000000000..5c045c2fc --- /dev/null +++ b/keyboards/handwired/p65rgb/p65rgb.c @@ -0,0 +1,49 @@ +/* Copyright 2019 marhalloweenvt + * + * 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 "p65rgb.h" + +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }, + { 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17 }, + { 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 }, + { 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51 }, + { 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82 } +}, { + { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, {105, 0 }, {120, 0 }, {135, 0 }, {150, 0 }, {165, 0 }, {180, 0 }, {195, 0 }, {205, 0 }, {210, 0 }, {224, 0 }, + { 224,16 }, {224, 16 }, {210, 16 }, {180, 16 }, {165, 16 }, {150, 16 }, {135, 16 }, {120, 16 }, {105, 16 }, { 90, 16 }, { 75, 16 }, { 60, 16 }, { 45, 16 }, { 30, 16 }, { 15, 16 }, { 0, 16 }, { 0, 16 }, + { 0, 32 }, { 0, 32 }, { 15, 32 }, { 30, 32 }, { 45, 32 }, { 60, 32 }, { 75, 32 }, { 90, 32 }, {105, 32 }, {120, 32 }, {135, 32 }, {150, 32 }, {165, 32 }, {190, 32 }, {205, 32 }, {210, 32 }, {224, 32 }, + { 224, 8 }, {224, 48 }, {210, 48 }, {195, 48 }, {180, 48 }, {150, 48 }, {135, 48 }, {120, 48 }, {105, 48 }, { 90, 48 }, { 75, 48 }, { 60, 48 }, { 45, 48 }, { 30, 48 }, { 15, 48 }, { 0, 48 }, { 0, 48 }, + { 0, 64 }, { 0, 64 }, { 0, 64 }, { 15, 64 }, { 15, 64 }, { 40, 64 }, { 90, 64 }, {105, 64 }, {150, 64 }, {180, 64 }, {180, 64 }, {195, 64 }, {210, 64 }, {220, 64 }, {224, 64 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 2, + 2, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 2, 2, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 2, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2 +} }; + +void suspend_power_down_kb(void) +{ + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) +{ + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} diff --git a/keyboards/handwired/p65rgb/p65rgb.h b/keyboards/handwired/p65rgb/p65rgb.h new file mode 100644 index 000000000..fd7e216d1 --- /dev/null +++ b/keyboards/handwired/p65rgb/p65rgb.h @@ -0,0 +1,42 @@ +/* Copyright 2019 marhalloweenvt + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, k1f, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, K2e, k2f, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3c, k3e, k3f, \ + k40, k41, k42, k45, k49, k4a, k4c, k4e, k4f \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO, k1e, k1f, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, K2e, k2f, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, KC_NO, k3c, KC_NO, k3e, k3f, KC_NO }, \ + { k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, KC_NO, k49, k4a, KC_NO, k4c, KC_NO, k4e, k4f, KC_NO }, \ +} + diff --git a/keyboards/handwired/p65rgb/readme.md b/keyboards/handwired/p65rgb/readme.md new file mode 100644 index 000000000..e0c787b86 --- /dev/null +++ b/keyboards/handwired/p65rgb/readme.md @@ -0,0 +1,15 @@ +# p65rgb + +![p65rgb](https://i.imgur.com/Z3RfOXe.jpg) + +A replacement PCB for my E6.5 Keyboard + +* Keyboard Maintainer: [marhalloweenvt](https://github.com/marhalloweenvt) +* Hardware Supported: p65rgb +* Hardware Availability: p65rgb + +Make example for this keyboard (after setting up your build environment): + + make handwired/p65rgb:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/p65rgb/rules.mk b/keyboards/handwired/p65rgb/rules.mk new file mode 100644 index 000000000..297aa1cd7 --- /dev/null +++ b/keyboards/handwired/p65rgb/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # 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 +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +RGB_MATRIX_ENABLE = WS2812 # Enable keyboard RGB backlight functionality with ws2812 driver +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/prime_exl/config.h b/keyboards/handwired/prime_exl/config.h index ef6e204ec..8e5692fa8 100644 --- a/keyboards/handwired/prime_exl/config.h +++ b/keyboards/handwired/prime_exl/config.h @@ -49,23 +49,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*10*9*2)) = (37+720) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 757 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 267 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR -#define DYNAMIC_KEYMAP_MACRO_COUNT 16
\ No newline at end of file diff --git a/keyboards/handwired/prime_exl/keymaps/default/keymap.c b/keyboards/handwired/prime_exl/keymaps/default/keymap.c index 1dac7825e..7cf919708 100644 --- a/keyboards/handwired/prime_exl/keymaps/default/keymap.c +++ b/keyboards/handwired/prime_exl/keymaps/default/keymap.c @@ -132,9 +132,9 @@ void led_set_user(uint8_t usb_led) { } //function for layer indicator LED -uint32_t layer_state_set_user(uint32_t state) +layer_state_t layer_state_set_user(layer_state_t state) { - if (biton32(state) == 2) { + if (get_highest_layer(state) == 2) { writePinHigh(C6); } else { writePinLow(C6); diff --git a/keyboards/handwired/prime_exl/keymaps/via/rules.mk b/keyboards/handwired/prime_exl/keymaps/via/rules.mk index e726a8a0e..1e5b99807 100644 --- a/keyboards/handwired/prime_exl/keymaps/via/rules.mk +++ b/keyboards/handwired/prime_exl/keymaps/via/rules.mk @@ -1,86 +1 @@ -# 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 - - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# atmega32a bootloadHID -BOOTLOADER = atmel-dfu - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# 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 = no # 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 -# 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 = yes # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) - -# This is the VIA magic -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -SRC += keyboards/wilba_tech/wt_main.c - +VIA_ENABLE = yes diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index f05273d25..f9560206b 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -19,15 +19,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -#define USB_VENDOR_ID_LENOVO 0x17ef -#define USB_DEVICE_ID_LENOVO_TPKBD 0x6009 -#define USB_DEVICE_ID_LENOVO_CUSBKBD 0x6047 -#define USB_DEVICE_ID_LENOVO_CBTKBD 0x6048 -#define USB_DEVICE_ID_LENOVO_TPPRODOCK 0x6067 - /* USB Device descriptor parameter */ -#define VENDOR_ID USB_VENDOR_ID_LENOVO -#define PRODUCT_ID USB_DEVICE_ID_LENOVO_CBTKBD +#define VENDOR_ID 0x17EF // Lenovo +//#define PRODUCT_ID 0x6009 // ThinkPad Keyboard with TrackPoint +//#define PRODUCT_ID 0x6047 // ThinkPad Compact USB Keyboard with TrackPoint +#define PRODUCT_ID 0x6048 // ThinkPad Compact Bluetooth Keyboard with TrackPoint +//#define PRODUCT_ID 0x6067 // ThinkPad Pro Docking Station #define DEVICE_VER 0x0001 #define MANUFACTURER Priyadi #define PRODUCT Promethium Keyboard diff --git a/keyboards/handwired/promethium/keymaps/default/keymap.c b/keyboards/handwired/promethium/keymaps/default/keymap.c index 207984407..14a293bb3 100644 --- a/keyboards/handwired/promethium/keymaps/default/keymap.c +++ b/keyboards/handwired/promethium/keymaps/default/keymap.c @@ -986,7 +986,7 @@ void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool * } #endif -uint32_t layer_state_set_kb(uint32_t state) +layer_state_t layer_state_set_user(layer_state_t state) { // turn on punc layer if both fun & num are on if ((state & ((1UL<<_NUM) | (1UL<<_FUN))) == ((1UL<<_NUM) | (1UL<<_FUN))) { diff --git a/keyboards/handwired/pteron/config.h b/keyboards/handwired/pteron/config.h index 56921b020..af9c1598e 100644 --- a/keyboards/handwired/pteron/config.h +++ b/keyboards/handwired/pteron/config.h @@ -24,6 +24,3 @@ /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 // 5 is default - -/* prevent stuck modifiers */ -#define PREVENT_STUCK_MODIFIERS diff --git a/keyboards/handwired/pteron/keymaps/default/keymap.c b/keyboards/handwired/pteron/keymaps/default/keymap.c index 3079cc7af..976fbb6e1 100644 --- a/keyboards/handwired/pteron/keymaps/default/keymap.c +++ b/keyboards/handwired/pteron/keymaps/default/keymap.c @@ -99,6 +99,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/handwired/steamvan/keymaps/jmdaly/keymap.c b/keyboards/handwired/steamvan/keymaps/jmdaly/keymap.c index 2bc543271..1c835bad1 100644 --- a/keyboards/handwired/steamvan/keymaps/jmdaly/keymap.c +++ b/keyboards/handwired/steamvan/keymaps/jmdaly/keymap.c @@ -44,10 +44,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_LGUI, _______, _______, _______, _______, _______, MO(_L4) ), [_L3] = LAYOUT_standard( /* LAYER 3 */ - KC_MINS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - KC_EQL, KC_PIPE, KC_TILD, KC_UNDS, KC_PLUS, LSFT(KC_LBRC), LSFT(KC_RBRC), KC_4, KC_5, KC_6, KC_VOLU, KC_INS, - _______, _______, _______, KC_DQUO, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______, - _______, _______, _______, _______, _______, _______, _______, _______ + KC_MINS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_EQL, KC_PIPE, KC_TILD, KC_UNDS, KC_PLUS, LSFT(KC_LBRC), LSFT(KC_RBRC), KC_4, KC_5, KC_6, KC_VOLU, KC_INS, + _______, RGB_TOG, RGB_MOD, RGB_RMOD, KC_DQUO, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______, + _______, _______, _______, _______, _______, _______, _______, _______ ), [_L4] = LAYOUT_standard( /* LAYER 4 */ RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_PGUP, _______, diff --git a/keyboards/handwired/steamvan/rev1/config.h b/keyboards/handwired/steamvan/rev1/config.h index f10f42966..f47dc90c1 100644 --- a/keyboards/handwired/steamvan/rev1/config.h +++ b/keyboards/handwired/steamvan/rev1/config.h @@ -57,9 +57,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Backlight configuration * Backlight LEDs on B8 */ -#define BACKLIGHT_LEVELS 24 +#define BACKLIGHT_PIN B8 #define BACKLIGHT_BREATHING -#define BREATHING_PERIOD 6 + +#define WS2812_SPI SPID1 +#define WS2812_SPI_MOSI_PAL_MODE 5 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/handwired/steamvan/rev1/halconf.h b/keyboards/handwired/steamvan/rev1/halconf.h index 5e5d70219..7363a21a2 100644 --- a/keyboards/handwired/steamvan/rev1/halconf.h +++ b/keyboards/handwired/steamvan/rev1/halconf.h @@ -153,7 +153,7 @@ * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI TRUE #endif /** diff --git a/keyboards/handwired/steamvan/rev1/led.c b/keyboards/handwired/steamvan/rev1/led.c deleted file mode 100644 index 1b78fa2f8..000000000 --- a/keyboards/handwired/steamvan/rev1/led.c +++ /dev/null @@ -1,242 +0,0 @@ -/* -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 "hal.h" -#include "led_custom.h" -#include "rev1.h" -#include "printf.h" - -static void breathing_callback(PWMDriver *pwmp); - -static PWMConfig pwmCFG = { - 0xFFFF, /* PWM clock frequency */ - 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ - NULL, /* No Callback */ - { - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 3 */ - {PWM_OUTPUT_DISABLED, NULL} - }, - 0, /* HW dependent part.*/ - 0 -}; - -static PWMConfig pwmCFG_breathing = { - 0xFFFF, /* 10kHz PWM clock frequency */ - 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ - breathing_callback, /* Breathing Callback */ - { - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 3 */ - {PWM_OUTPUT_DISABLED, NULL} - }, - 0, /* HW dependent part.*/ - 0 -}; - -// See http://jared.geek.nz/2013/feb/linear-led-pwm -static uint16_t cie_lightness(uint16_t v) { - if (v <= 5243) // if below 8% of max - return v / 9; // same as dividing by 900% - else { - uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare - // to get a useful result with integer division, we shift left in the expression above - // and revert what we've done again after squaring. - y = y * y * y >> 8; - if (y > 0xFFFFUL) // prevent overflow - return 0xFFFFU; - else - return (uint16_t) y; - } -} - - -void backlight_init_ports(void) { - palSetPadMode(GPIOB, 8, PAL_MODE_ALTERNATE(2)); - pwmStart(&PWMD4, &pwmCFG); - if(kb_backlight_config.enable){ - if(kb_backlight_config.breathing){ - breathing_enable(); - } else{ - backlight_set(kb_backlight_config.level); - } - } else { - backlight_set(0); - } -} - -void backlight_set(uint8_t level) { - uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / BACKLIGHT_LEVELS)); - if (level == 0) { - // Turn backlight off - // Disable channel 3 on PWM4 - pwmDisableChannel(&PWMD4, 2); - } else { - // Turn backlight on - if(!is_breathing()){ - // Enable channel 3 on PWM4 - pwmEnableChannel(&PWMD4, 2, PWM_FRACTION_TO_WIDTH(&PWMD4,0xFFFF,duty)); - } - } -} - - -uint8_t backlight_tick = 0; - -void backlight_task(void) { -} - -#define BREATHING_NO_HALT 0 -#define BREATHING_HALT_OFF 1 -#define BREATHING_HALT_ON 2 -#define BREATHING_STEPS 128 - -static uint8_t breathing_period = BREATHING_PERIOD; -static uint8_t breathing_halt = BREATHING_NO_HALT; -static uint16_t breathing_counter = 0; - -bool is_breathing(void) { - return PWMD4.config == &pwmCFG_breathing; -} - -#define breathing_min() do {breathing_counter = 0;} while (0) -#define breathing_max() do {breathing_counter = breathing_period * 256 / 2;} while (0) - - -void breathing_interrupt_enable(void){ - pwmStop(&PWMD4); - pwmStart(&PWMD4, &pwmCFG_breathing); - chSysLockFromISR(); - pwmEnablePeriodicNotification(&PWMD4); - pwmEnableChannelI( - &PWMD4, - 2, - PWM_FRACTION_TO_WIDTH( - &PWMD4, - 0xFFFF, - 0xFFFF - ) - ); - chSysUnlockFromISR(); -} - -void breathing_interrupt_disable(void){ - pwmStop(&PWMD4); - pwmStart(&PWMD4, &pwmCFG); -} - -void breathing_enable(void) -{ - breathing_counter = 0; - breathing_halt = BREATHING_NO_HALT; - breathing_interrupt_enable(); -} - -void breathing_pulse(void) -{ - if (kb_backlight_config.level == 0) - breathing_min(); - else - breathing_max(); - breathing_halt = BREATHING_HALT_ON; - breathing_interrupt_enable(); -} - -void breathing_disable(void) -{ - breathing_interrupt_disable(); - // Restore backlight level - backlight_set(kb_backlight_config.level); -} - -void breathing_self_disable(void) -{ - if (kb_backlight_config.level == 0) - breathing_halt = BREATHING_HALT_OFF; - else - breathing_halt = BREATHING_HALT_ON; -} - -void breathing_toggle(void) { - if (is_breathing()){ - breathing_disable(); - } else { - breathing_enable(); - } -} - -void breathing_period_set(uint8_t value) -{ - if (!value) - value = 1; - breathing_period = value; -} - -void breathing_period_default(void) { - breathing_period_set(BREATHING_PERIOD); -} - -void breathing_period_inc(void) -{ - breathing_period_set(breathing_period+1); -} - -void breathing_period_dec(void) -{ - breathing_period_set(breathing_period-1); -} - -/* To generate breathing curve in python: - * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] - */ -static const uint8_t breathing_table[BREATHING_STEPS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -// Use this before the cie_lightness function. -static inline uint16_t scale_backlight(uint16_t v) { - return v / BACKLIGHT_LEVELS * kb_backlight_config.level; -} - -static void breathing_callback(PWMDriver *pwmp) -{ - (void)pwmp; - uint16_t interval = (uint16_t) breathing_period * 256 / BREATHING_STEPS; - // resetting after one period to prevent ugly reset at overflow. - breathing_counter = (breathing_counter + 1) % (breathing_period * 256); - uint8_t index = breathing_counter / interval % BREATHING_STEPS; - - if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || - ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) - { - breathing_interrupt_disable(); - } - - uint32_t duty = cie_lightness(scale_backlight(breathing_table[index] * 256)); - - chSysLockFromISR(); - pwmEnableChannelI( - &PWMD4, - 2, - PWM_FRACTION_TO_WIDTH( - &PWMD4, - 0xFFFF, - duty - ) - ); - chSysUnlockFromISR(); -} diff --git a/keyboards/handwired/steamvan/rev1/mcuconf.h b/keyboards/handwired/steamvan/rev1/mcuconf.h index 69bf9185d..7ad013744 100644 --- a/keyboards/handwired/steamvan/rev1/mcuconf.h +++ b/keyboards/handwired/steamvan/rev1/mcuconf.h @@ -210,7 +210,7 @@ /* * SPI driver system settings. */ -#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI1 TRUE #define STM32_SPI_USE_SPI2 FALSE #define STM32_SPI_USE_SPI3 FALSE #define STM32_SPI_SPI1_DMA_PRIORITY 1 diff --git a/keyboards/handwired/steamvan/rev1/rev1.c b/keyboards/handwired/steamvan/rev1/rev1.c index 318864949..53f9a400f 100644 --- a/keyboards/handwired/steamvan/rev1/rev1.c +++ b/keyboards/handwired/steamvan/rev1/rev1.c @@ -15,22 +15,3 @@ */ #include "rev1.h" -#include "led.h" -#include "printf.h" - -backlight_config_t kb_backlight_config = { - .enable = true, - .breathing = true, - .level = BACKLIGHT_LEVELS -}; - - - -void matrix_init_kb(void) { - matrix_init_user(); - backlight_init_ports(); -} - -void matrix_scan_kb(void) { - matrix_scan_user(); -} diff --git a/keyboards/handwired/steamvan/rev1/rev1.h b/keyboards/handwired/steamvan/rev1/rev1.h index 83f7ecb9c..1cb72277f 100644 --- a/keyboards/handwired/steamvan/rev1/rev1.h +++ b/keyboards/handwired/steamvan/rev1/rev1.h @@ -16,7 +16,6 @@ #pragma once #include "quantum.h" -#include "backlight.h" // This a shortcut to help you visually see your layout. // There are a number of variations depending on the layout of your bottom row. @@ -79,12 +78,3 @@ { K30, K31, K32, K33, K34, KC_NO, K36, KC_NO, K38, K39, K3A, K3B } \ } -// Backlighting -extern backlight_config_t kb_backlight_config; -extern bool kb_backlight_breathing; - -void backlight_init_ports(void); -void backlight_set(uint8_t level); -bool is_breathing(void); -void breathing_enable(void); -void breathing_disable(void); diff --git a/keyboards/handwired/steamvan/rev1/rules.mk b/keyboards/handwired/steamvan/rev1/rules.mk index 471cb4c1e..797d7b35d 100644 --- a/keyboards/handwired/steamvan/rev1/rules.mk +++ b/keyboards/handwired/steamvan/rev1/rules.mk @@ -1,8 +1,8 @@ # MCU name MCU = STM32F303 -# Code for backlight breathing: -SRC += led.c +# Use SPI for RGB underglow: +WS2812_DRIVER = spi # Build Options # comment out to disable the options. @@ -15,7 +15,7 @@ CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work AUDIO_ENABLE = no -RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/handwired/videowriter/README.md b/keyboards/handwired/videowriter/README.md new file mode 100644 index 000000000..ef8471aa9 --- /dev/null +++ b/keyboards/handwired/videowriter/README.md @@ -0,0 +1,61 @@ +# QMK-based firmware for Magnavox Videowriter keyboard +Matrix layout is based on info from this [article](https://deskthority.net/workshop-f7/magnavox-videowriter-keyboard-cleanup-and-conversion-t19687.html). + +![Videowriter](https://i.imgur.com/zNTHmZa.jpg) + +Magnavox Videowriter keyboard conversion project: direct connection of Pro Micro to the matrix. + +* Keyboard Maintainer: [DmNosachev](https://github.com/DmNosachev) +* Hardware Supported: Alps-based [Magnavox Videowriter keyboard](https://deskthority.net/wiki/Magnavox_VideoWriter), Pro Micro 16MHz 5V MCU board (you can use any MCU which is supported by QMK and has 18 or more IO). + +Make example for this keyboard (after setting up your build environment): + + make handwired/videowriter:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +# Modding + +## Matrix + +Videowriter has 8x10 matrix: + +| col/row | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | +|---------|----------|-----------|-----------|-----------|----------|-----------|-----------|---------| +| 0 | | | | | | | 51 LShift | 39 Caps | +| 1 | 08 Copy | 07 Find | 06 Split | 05 Center | 04 Page | 03 Spell | 02 Print | 01 Menu | +| 2 | 16 5 | 15 4 | 14 3 | 13 2 | 12 1 | 11 Delete | 10 GoTo | 09 Move | +| 3 | 24 BkSpc | 23 Equals | 22 Minus | 21 0 | 20 9 | 19 8 | 18 7 | 17 6 | +| 4 | 32 U | 31 Y | 30 T | 29 R | 28 E | 27 W | 26 Q | 25 Tab | +| 5 | 41 S | 40 A | 38 Return | 37 ] | 36 [ | 35 P | 34 O | 33 I | +| 6 | 49 ; | 48 L | 47 K | 46 J | 45 H | 44 G | 43 F | 42 D | +| 7 | 58 M | 57 N | 56 B | 55 V | 54 C | 53 X | 52 Z | 50 " | +| 8 | 67 Left | 66 Up | 65 Insert | 64 Space | 63 Style | 61 / | 60 . | 59 , | +| 9 | | | 62 RShift | 72 Undo | 71 Help | 70 Do | 69 Right | 68 Down | + +## Separating Shift keys +Initially left and right Shift keys are connected in parrallel. You need to cut the traces from right Shift (switch 62) and wire it to column 2 (switch 65, right pin) and row 9 (switch 71, bottom pin). + +![Right shift](https://i.imgur.com/ttdTVtC.jpg) + +## Stock components removal +SN74LS145N IC (BCD-to-decimal decoder, drives matrix rows), NEC D8049HC IC (MCU, drives matrix columns) and resistor array need to be desoldered from the PCB. You need to shorten the 4 diodes (D2–D5) in the bottom right corner of the PCB (solder a wire between their pins). +I've also removed two electrolytic capacitors and some ceramic capacitors just to free an additional space. + +Optional: add diodes between each switch and corresponding row for NKRO. If you choose not to add them, create `config.h` file in your personal keymap folder and add `#define MATRIX_HAS_GHOST` to it. + +## Pro Micro +Suggested mount position for the Pro Micro: + +![PCB bottom side](https://i.imgur.com/bb7zZD0.jpg) + +1. Solder two 8-pin headers to the Pro Micro (pin D1-B5 on the left side and pins F4-B6 on the right side). +2. Solder the Pro Micro to the Videowriter's PCB. +3. Solder 6 wire bridges (pink color on the photo). +4. By this point rows 0-4 and all columns will be already in place. +5. Connect rows 5-9 (see right side of the PCB) to the corresponding pins of the Pro Micro using additional wires. +6. Optional: connect a push button between Reset and Ground pins. + +![PCB top side](https://i.imgur.com/PVEXIxj.jpg) + +Compile and flash the firmware. Use matrix [debug mode](https://docs.qmk.fm/#/feature_command) if something is wrong. diff --git a/keyboards/handwired/videowriter/config.h b/keyboards/handwired/videowriter/config.h new file mode 100644 index 000000000..d392564eb --- /dev/null +++ b/keyboards/handwired/videowriter/config.h @@ -0,0 +1,140 @@ +/* +Copyright 2019 DmNosachev + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Magnavox +#define PRODUCT Videowriter +#define DESCRIPTION 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 { D7, C6, D1, D0, D4, D2, D3, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Uncomment this if you didn't install diodes */ +//#define MATRIX_HAS_GHOST + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 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 + + +/* + * 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 */ +/* defined by default; to change, uncomment and set to the combination you want */ +//#define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* 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_HELP H +//#define MAGIC_KEY_HELP_ALT 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 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#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 B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#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 + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/videowriter/info.json b/keyboards/handwired/videowriter/info.json new file mode 100644 index 000000000..194b558be --- /dev/null +++ b/keyboards/handwired/videowriter/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "videowriter", + "url": "https://deskthority.net/viewtopic.php?f=7&t=20210", + "maintainer": "DmNosachev", + "width": 16, + "height": 7.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"menu", "x":1, "y":1, "h":0.75}, {"label":"print", "x":2, "y":1, "h":0.75}, {"label":"spell", "x":3, "y":1, "h":0.75}, {"label":"page", "x":4.5, "y":1, "h":0.75}, {"label":"center", "x":5.5, "y":1, "h":0.75}, {"label":"split", "x":6.5, "y":1, "h":0.75}, {"label":"find", "x":7.5, "y":1, "h":0.75}, {"label":"copy", "x":9, "y":1, "h":0.75}, {"label":"move", "x":10, "y":1, "h":0.75}, {"label":"go to", "x":11, "y":1, "h":0.75}, + {"label":"left", "x":13, "y":0.5}, {"label":"down", "x":14, "y":1}, {"label":"up", "x":14, "y":0}, {"label":"right", "x":15, "y":0.5}, + {"label":"del", "x":0, "y":2.5}, {"label":"1", "x":1, "y":2.5}, {"label":"2", "x":2, "y":2.5}, {"label":"3", "x":3, "y":2.5}, {"label":"4", "x":4, "y":2.5}, {"label":"5", "x":5, "y":2.5}, {"label":"6", "x":6, "y":2.5}, {"label":"7", "x":7, "y":2.5}, {"label":"8", "x":8, "y":2.5}, {"label":"9", "x":9, "y":2.5}, {"label":"0", "x":10, "y":2.5}, {"label":"-", "x":11, "y":2.5}, {"label":"=", "x":12, "y":2.5}, {"label":"backspace", "x":13, "y":2.5, "w":1.5}, {"label":"do", "x":15, "y":2.5, "h":1.33}, + {"label":"tab", "x":0, "y":3.5, "w":1.5}, {"label":"Q", "x":1.5, "y":3.5}, {"label":"W", "x":2.5, "y":3.5}, {"label":"E", "x":3.5, "y":3.5}, {"label":"R", "x":4.5, "y":3.5}, {"label":"T", "x":5.5, "y":3.5}, {"label":"Y", "x":6.5, "y":3.5}, {"label":"U", "x":7.5, "y":3.5}, {"label":"I", "x":8.5, "y":3.5}, {"label":"O", "x":9.5, "y":3.5}, {"label":"P", "x":10.5, "y":3.5}, {"label":"[", "x":11.5, "y":3.5}, {"label":"]", "x":12.5, "y":3.5}, {"label":"help", "x":15, "y":3.833, "h":1.33}, + {"label":"caps lock", "x":0, "y":4.5, "w":1.75}, {"label":"A", "x":1.75, "y":4.5}, {"label":"S", "x":2.75, "y":4.5}, {"label":"D", "x":3.75, "y":4.5}, {"label":"F", "x":4.75, "y":4.5}, {"label":"G", "x":5.75, "y":4.5}, {"label":"H", "x":6.75, "y":4.5}, {"label":"J", "x":7.75, "y":4.5}, {"label":"K", "x":8.75, "y":4.5}, {"label":"L", "x":9.75, "y":4.5}, {"label":";", "x":10.75, "y":4.5}, {"label":"'", "x":11.75, "y":4.5}, {"label":"return", "x":12.75, "y":4.5, "w":1.75}, {"label":"undo", "x":15, "y":5.167, "h":1.33}, + {"label":"shift", "x":0, "y":5.5, "w":2.25}, {"label":"Z", "x":2.25, "y":5.5}, {"label":"X", "x":3.25, "y":5.5}, {"label":"C", "x":4.25, "y":5.5}, {"label":"V", "x":5.25, "y":5.5}, {"label":"B", "x":6.25, "y":5.5}, {"label":"N", "x":7.25, "y":5.5}, {"label":"M", "x":8.25, "y":5.5}, {"label":"<", "x":9.25, "y":5.5}, {"label":">", "x":10.25, "y":5.5}, {"label":"?", "x":11.25, "y":5.5}, {"label":"shift", "x":12.25, "y":5.5, "w":2.25}, + {"label":"style", "x":1.25, "y":6.5, "w":1.5}, {"label":"space", "x":2.75, "y":6.5, "w":9}, {"label":"insert", "x":11.75, "y":6.5, "w":1.5} + ] + } + } +} diff --git a/keyboards/handwired/videowriter/keymaps/default/keymap.c b/keyboards/handwired/videowriter/keymaps/default/keymap.c new file mode 100644 index 000000000..527ee6fff --- /dev/null +++ b/keyboards/handwired/videowriter/keymaps/default/keymap.c @@ -0,0 +1,107 @@ +/* Copyright 2019 DmNosachev + * + * 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN1 +}; + +// Example of custom keycodes used by macros in process_record_user +/* +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * ,---------------------------------------------------------------------------------------. + * | ,----------------. ,-----------------------. ,--------------. | up | | + * | |vol- |vol+| mute| | prev| play| stop| next| |prsc|scrlk|ins| |left|down|right| + * |---------------------------------------------------------------------------------------| + * | ~`| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSp| fn1 | + * |---------------------------------------------------------------------------------------| + * |Tab/fn1| Q | W | E | R | T | Y | U | I | O | P | [ | ] | | menu| + * |---------------------------------------------------------------------------------------| + * |Ctrl | A | S | D | F | G | H | J | K | L | ; | " | enter ||\ctrl| + * |---------------------------------------------------------------------------------------' + * | Shift | Z | X | C | V | B | N | M | < | > | ? | Shift | + * `---------------------------------------------------------------------------------' + * | Alt | Space | Caps | + * `------------------------------------------------------------------' + */ + [_BASE] = LAYOUT( + KC_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MPLY, KC_MSTP, KC_MNXT, KC_PSCR, KC_SLCK, KC_INS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + 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_BSPC, KC_PGUP, + 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_PGDN, + KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, RCTL_T(KC_BSLS), + 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_LGUI, KC_SPC, KC_RALT), +/* + * + * ,---------------------------------------------------------------------------------------. + * | ,----------------. ,-----------------------. ,--------------. |pgup| | + * | | | | | | | | |sect| | |reset|pause| |home|pgdn| end | + * |---------------------------------------------------------------------------------------| + * |Esc| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | del | | + * |---------------------------------------------------------------------------------------| + * | | mlb | mup | mrb | ms+ | | | | up | | | | | | gui | + * |---------------------------------------------------------------------------------------| + * | | ml | mdn | mr | ms- | | | left| down|right| | | | | + * |---------------------------------------------------------------------------------------' + * | | | | | | | | | | | | | + * `---------------------------------------------------------------------------------' + * | | | | + * `------------------------------------------------------------------' + */ + [_FN1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, + _______, 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_HOME, + _______, KC_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + _______, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ) +}; + +/* macros template (example) +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/\n"); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +*/ + diff --git a/keyboards/handwired/videowriter/keymaps/default/readme.md b/keyboards/handwired/videowriter/keymaps/default/readme.md new file mode 100644 index 000000000..05b0f039f --- /dev/null +++ b/keyboards/handwired/videowriter/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for videowriter diff --git a/keyboards/handwired/co60/rev6/led_custom.h b/keyboards/handwired/videowriter/keymaps/oleg/config.h index 96c4d0c2b..3f2896a66 100644 --- a/keyboards/handwired/co60/rev6/led_custom.h +++ b/keyboards/handwired/videowriter/keymaps/oleg/config.h @@ -1,5 +1,4 @@ -/* - * Copyright 2019 John M Daly <jmdaly@gmail.com> +/* Copyright 2019 DmNosachev * * 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 @@ -17,6 +16,5 @@ #pragma once -void backlight_task(void); -void breathing_interrupt_disable(void); -void breathing_interrupt_enable(void); +// Have't added any diodes in this particular convertion project +#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/videowriter/keymaps/oleg/keymap.c b/keyboards/handwired/videowriter/keymaps/oleg/keymap.c new file mode 100644 index 000000000..76587f6f7 --- /dev/null +++ b/keyboards/handwired/videowriter/keymaps/oleg/keymap.c @@ -0,0 +1,108 @@ +/* Copyright 2019 DmNosachev + * + * 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN1 +}; + +// Example of custom keycodes used by macros in process_record_user +/* +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + * ,---------------------------------------------------------------------------------------. + * | ,----------------. ,-----------------------. ,--------------. | up | | + * | |vol- |vol+| mute| | prev| play| stop| next| |prsc|scrlk|ins| |left|down|right| + * |---------------------------------------------------------------------------------------| + * | ~`| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSp| fn1 | + * |---------------------------------------------------------------------------------------| + * |Tab/fn1| Q | W | E | R | T | Y | U | I | O | P | [ | ] | | menu| + * |---------------------------------------------------------------------------------------| + * |Ctrl | A | S | D | F | G | H | J | K | L | ; | " | enter ||\ctrl| + * |---------------------------------------------------------------------------------------' + * | Shift | Z | X | C | V | B | N | M | < | > | ? | Shift | + * `---------------------------------------------------------------------------------' + * | Alt | Space | Caps | + * `------------------------------------------------------------------' + */ + + [_BASE] = LAYOUT( + KC_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MPLY, KC_MSTP, KC_MNXT, KC_PSCR, KC_SLCK, KC_INS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + 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_BSPC, MO(_FN1), + LT(_FN1, 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_APP, + 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, RCTL_T(KC_BSLS), + 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_LALT, KC_SPC, KC_CAPS + ), + +/* + * sect = section sign, Unicode 0x00A7 + * ,---------------------------------------------------------------------------------------. + * | ,----------------. ,-----------------------. ,--------------. |pgup| | + * | | | | | | | | |sect| | |reset|pause| |home|pgdn| end | + * |---------------------------------------------------------------------------------------| + * |Esc| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | del | | + * |---------------------------------------------------------------------------------------| + * | | mlb | mup | mrb | ms+ | | | | up | | | | | | gui | + * |---------------------------------------------------------------------------------------| + * | | ml | mdn | mr | ms- | | | left| down|right| | | | | + * |---------------------------------------------------------------------------------------' + * | | | | | | | | | | | | | + * `---------------------------------------------------------------------------------' + * | | | | + * `------------------------------------------------------------------' + */ + + [_FN1] = LAYOUT( + _______, _______, _______, _______, _______, _______, UC(0x00A7), _______, RESET, KC_PAUS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, + _______, 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_BTN1, KC_MS_U, KC_BTN2, KC_WH_U ,_______, _______, _______, KC_UP, _______, _______, _______, _______, KC_RGUI, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ) +}; + +/* macros template (example) +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case USECT: + if (record->event.pressed) { + // when keycode USECT is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode USECT is released + } + break; + } + return true; +} +*/ + + +void matrix_init_user(void) { + set_unicode_input_mode(UC_WIN); +} + diff --git a/keyboards/handwired/videowriter/keymaps/oleg/rules.mk b/keyboards/handwired/videowriter/keymaps/oleg/rules.mk new file mode 100644 index 000000000..0065be986 --- /dev/null +++ b/keyboards/handwired/videowriter/keymaps/oleg/rules.mk @@ -0,0 +1,4 @@ +# this particular convertion project uses Pro Micro with DFU bootloader instead of Caterina +BOOTLOADER = lufa-dfu + +UNICODE_ENABLE = yes diff --git a/keyboards/handwired/videowriter/rules.mk b/keyboards/handwired/videowriter/rules.mk new file mode 100644 index 000000000..7b326cc31 --- /dev/null +++ b/keyboards/handwired/videowriter/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +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 +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/videowriter/videowriter.c b/keyboards/handwired/videowriter/videowriter.c new file mode 100644 index 000000000..5f0f3d712 --- /dev/null +++ b/keyboards/handwired/videowriter/videowriter.c @@ -0,0 +1,17 @@ +/* Copyright 2019 DmNosachev + * + * 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 "videowriter.h" diff --git a/keyboards/handwired/videowriter/videowriter.h b/keyboards/handwired/videowriter/videowriter.h new file mode 100644 index 000000000..f06a5d50a --- /dev/null +++ b/keyboards/handwired/videowriter/videowriter.h @@ -0,0 +1,59 @@ +/* Copyright 2019 DmNosachev + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +/* + * ,---------------------------------------------------------------------------------------. + * | ,----------------. ,-----------------------. ,--------------. | up | | + * | |menu|print|spell| |page|center|split|find | |copy|move|goto| |left|down|right| + * |---------------------------------------------------------------------------------------| + * |del| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSp| do | + * |---------------------------------------------------------------------------------------| + * |Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | help| + * |-----------------------------------------------------------------------------' |-----| + * |Caps | A | S | D | F | G | H | J | K | L | ; | " | return | undo| + * |---------------------------------------------------------------------------------------| + * | Shift | Z | X | C | V | B | N | M | < | > | ? | Shift | | + * '---------------------------------------------------------------------------------------' + * | style| Space | insert| + * '------------------------------------------------------------------' + */ + +#define LAYOUT( \ + K17, K16, K15, K14, K13, K12, K11, K10, K27, K26, K80, K97, K81, K96, \ + K25, K24, K23, K22, K21, K20, K37, K36, K35, K34, K33, K32, K31, K30, K95, \ + K47, K46, K45, K44, K43, K42, K41, K40, K57, K56, K55, K54, K53, K94, \ + K07, K51, K50, K67, K66, K65, K64, K63, K62, K61, K60, K77, K52, K93, \ + K06, K76, K75, K74, K73, K72, K71, K70, K87, K86, K85, K92, \ + K84, K83, K82 \ +) \ +{ \ + { XXX, XXX, XXX, XXX, XXX, XXX, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77 }, \ + { K80, K81, K82, K83, K84, K85, K86, K87 }, \ + { XXX, XXX, K92, K93, K94, K95, K96, K97 } \ +} diff --git a/keyboards/handwired/wulkan/keymaps/default/keymap.c b/keyboards/handwired/wulkan/keymaps/default/keymap.c index 5134fb000..fec8442ee 100644 --- a/keyboards/handwired/wulkan/keymaps/default/keymap.c +++ b/keyboards/handwired/wulkan/keymaps/default/keymap.c @@ -102,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/handwired/xealous/keymaps/default/keymap.c b/keyboards/handwired/xealous/keymaps/default/keymap.c index ca82445a5..41a3f8c80 100644 --- a/keyboards/handwired/xealous/keymaps/default/keymap.c +++ b/keyboards/handwired/xealous/keymaps/default/keymap.c @@ -87,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float tone_qwerty[][2] = TONE_QWERTY; float tone_numpad[][2] = TONE_NUMPAD; -uint32_t default_layer_state_set_kb(uint32_t state) { +layer_state_t default_layer_state_set_kb(layer_state_t state) { if (state == 1UL<<_QWERTY) { PLAY_SONG(tone_qwerty); } else if (state == 1UL<<_NUMPAD) { |