diff options
| -rw-r--r-- | quantum/keymap_common.c | 1 | ||||
| -rw-r--r-- | quantum/template/config.h | 53 | ||||
| -rw-r--r-- | tmk_core/common/keyboard.c | 2 |
3 files changed, 44 insertions, 12 deletions
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 7068ca4f3..2eef4f15a 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c | |||
| @@ -25,6 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 25 | #include "debug.h" | 25 | #include "debug.h" |
| 26 | #include "backlight.h" | 26 | #include "backlight.h" |
| 27 | #include "keymap_midi.h" | 27 | #include "keymap_midi.h" |
| 28 | #include "bootloader.h" | ||
| 28 | 29 | ||
| 29 | #include <stdio.h> | 30 | #include <stdio.h> |
| 30 | #include <inttypes.h> | 31 | #include <inttypes.h> |
diff --git a/quantum/template/config.h b/quantum/template/config.h index dae4b6313..e6fb7866c 100644 --- a/quantum/template/config.h +++ b/quantum/template/config.h | |||
| @@ -32,36 +32,67 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 32 | #define MATRIX_ROWS 2 | 32 | #define MATRIX_ROWS 2 |
| 33 | #define MATRIX_COLS 3 | 33 | #define MATRIX_COLS 3 |
| 34 | 34 | ||
| 35 | // Planck PCB default pin-out | 35 | /* |
| 36 | // Change this to how you wired your keyboard | 36 | * Keyboard Matrix Assignments |
| 37 | // COLS: Left to right, ROWS: Top to bottom | 37 | * |
| 38 | * Change this to how you wired your keyboard | ||
| 39 | * COLS: AVR pins used for columns, left to right | ||
| 40 | * ROWS: AVR pins used for rows, top to bottom | ||
| 41 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 42 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 43 | * | ||
| 44 | */ | ||
| 38 | #define COLS (int []){ F1, F0, B0 } | 45 | #define COLS (int []){ F1, F0, B0 } |
| 39 | #define ROWS (int []){ D0, D5 } | 46 | #define ROWS (int []){ D0, D5 } |
| 40 | 47 | ||
| 41 | /* COL2ROW or ROW2COL */ | 48 | /* COL2ROW or ROW2COL */ |
| 42 | #define DIODE_DIRECTION COL2ROW | 49 | #define DIODE_DIRECTION COL2ROW |
| 43 | 50 | ||
| 44 | /* define if matrix has ghost */ | 51 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ |
| 52 | #define DEBOUNCE 5 | ||
| 53 | |||
| 54 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
| 45 | //#define MATRIX_HAS_GHOST | 55 | //#define MATRIX_HAS_GHOST |
| 46 | 56 | ||
| 47 | /* number of backlight levels */ | 57 | /* number of backlight levels */ |
| 48 | #define BACKLIGHT_LEVELS 3 | 58 | #define BACKLIGHT_LEVELS 3 |
| 49 | 59 | ||
| 50 | /* Set 0 if debouncing isn't needed */ | ||
| 51 | #define DEBOUNCE 5 | ||
| 52 | |||
| 53 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | 60 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ |
| 54 | #define LOCKING_SUPPORT_ENABLE | 61 | #define LOCKING_SUPPORT_ENABLE |
| 55 | /* Locking resynchronize hack */ | 62 | /* Locking resynchronize hack */ |
| 56 | #define LOCKING_RESYNC_ENABLE | 63 | #define LOCKING_RESYNC_ENABLE |
| 57 | 64 | ||
| 58 | /* Force NKRO Mode - If forced on, must be disabled via magic key (default = LShift+RShift+N) */ | 65 | /* |
| 66 | * Force NKRO | ||
| 67 | * | ||
| 68 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 69 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 70 | * makefile for this to work.) | ||
| 71 | * | ||
| 72 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 73 | * until the next keyboard reset. | ||
| 74 | * | ||
| 75 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 76 | * fully operational during normal computer usage. | ||
| 77 | * | ||
| 78 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 79 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 80 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 81 | * power-up. | ||
| 82 | * | ||
| 83 | */ | ||
| 59 | //#define FORCE_NKRO | 84 | //#define FORCE_NKRO |
| 60 | 85 | ||
| 61 | /* | 86 | /* |
| 62 | * Magic key options | 87 | * Magic Key Options |
| 63 | * These options allow the magic key functionality to be changed. This is useful | 88 | * |
| 64 | * if your keyboard/keypad is missing keys and you want magic key support. | 89 | * Magic keys are hotkey commands that allow control over firmware functions of |
| 90 | * the keyboard. They are best used in combination with the HID Listen program, | ||
| 91 | * found here: https://www.pjrc.com/teensy/hid_listen.html | ||
| 92 | * | ||
| 93 | * The options below allow the magic key functionality to be changed. This is | ||
| 94 | * useful if your keyboard/keypad is missing keys and you want magic key support. | ||
| 95 | * | ||
| 65 | */ | 96 | */ |
| 66 | 97 | ||
| 67 | /* key combination for magic key command */ | 98 | /* key combination for magic key command */ |
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index e66808485..302b3ec87 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c | |||
| @@ -92,7 +92,7 @@ void keyboard_init(void) | |||
| 92 | backlight_init(); | 92 | backlight_init(); |
| 93 | #endif | 93 | #endif |
| 94 | 94 | ||
| 95 | #ifdef FORCE_NKRO | 95 | #if defined(NKRO_ENABLE) && defined(FORCE_NKRO) |
| 96 | keyboard_nkro = true; | 96 | keyboard_nkro = true; |
| 97 | #endif | 97 | #endif |
| 98 | 98 | ||
