From 629cfc7f5ebd815231c9e3f969170995db1481c6 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 26 Aug 2020 18:41:32 +1000 Subject: K-Type refactor (#9864) * K-Type refactor * Declare QMK in product name again * Hopefully fix matrix scanning * Maybe this time * Partial (literally) RGB Matrix support * Put RGB_MATRIX_ENABLE into rgb keymap for now * Add ifdefs for RGB config * Set layer 1 to actually be layer 1... * Update keyboards/k_type/readme.md * Put all RGB config in keymap for now * Set SDB high? * Before `rgb_matrix_init()` would be best * User level, not keyboard * Combating dropped keys * Nope * Readme for RGB keymap * Remove custom matrix --- keyboards/k_type/config.h | 75 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 61 insertions(+), 14 deletions(-) (limited to 'keyboards/k_type/config.h') diff --git a/keyboards/k_type/config.h b/keyboards/k_type/config.h index 86b08769d..82f641c53 100644 --- a/keyboards/k_type/config.h +++ b/keyboards/k_type/config.h @@ -15,30 +15,73 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0x1c11 -#define PRODUCT_ID 0xb04d -#define DEVICE_VER 0x0001 -#define MANUFACTURER Input Club -#define PRODUCT K-Type/QMK +#define VENDOR_ID 0x1C11 +#define PRODUCT_ID 0xB04D +#define DEVICE_VER 0x0001 +#define MANUFACTURER Input:Club +#define PRODUCT K-Type (QMK) + /* key matrix size */ #define MATRIX_ROWS 10 #define MATRIX_COLS 10 -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST +/* + * 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 { D5, D6, D7, C1, C2, C3, C4, C5, C6, C7 } +#define MATRIX_COL_PINS { B2, B3, B18, B19, C0, C8, C9, D0, D1, D4 } +#define UNUSED_PINS -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* 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 useful 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 + /* * Feature disable options * These options are also useful to firmware size reduction. @@ -54,7 +97,11 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION -#endif +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 -- cgit v1.2.3