diff options
| author | Ryan <fauxpark@gmail.com> | 2020-10-31 00:14:13 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-31 00:14:13 +1100 |
| commit | 67654e4a82fad91640371473e3e2da3a9bf7e68a (patch) | |
| tree | 204669d4193a3481271e5a5514063ffc2fa13207 /keyboards/dk60 | |
| parent | 952a4c83127d7a545bbc6b5a59caaf54ef55c1fb (diff) | |
| download | qmk_firmware-67654e4a82fad91640371473e3e2da3a9bf7e68a.tar.gz qmk_firmware-67654e4a82fad91640371473e3e2da3a9bf7e68a.zip | |
DK60 refactor (#10791)
Diffstat (limited to 'keyboards/dk60')
| -rw-r--r-- | keyboards/dk60/config.h | 157 | ||||
| -rw-r--r-- | keyboards/dk60/dk60.c | 46 | ||||
| -rw-r--r-- | keyboards/dk60/dk60.h | 93 | ||||
| -rw-r--r-- | keyboards/dk60/info.json | 84 | ||||
| -rw-r--r-- | keyboards/dk60/keymaps/default/keymap.c | 139 | ||||
| -rw-r--r-- | keyboards/dk60/readme.md | 16 | ||||
| -rw-r--r-- | keyboards/dk60/rules.mk | 39 |
7 files changed, 377 insertions, 197 deletions
diff --git a/keyboards/dk60/config.h b/keyboards/dk60/config.h index 6a69516cb..bec665419 100644 --- a/keyboards/dk60/config.h +++ b/keyboards/dk60/config.h | |||
| @@ -15,36 +15,127 @@ You should have received a copy of the GNU General Public License | |||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #ifndef CONFIG_H | 18 | #pragma once |
| 19 | #define CONFIG_H | 19 | |
| 20 | 20 | #include "config_common.h" | |
| 21 | #include "config_common.h" | 21 | |
| 22 | 22 | /* USB Device descriptor parameter */ | |
| 23 | /* USB Device descriptor parameter */ | 23 | #define VENDOR_ID 0xFEED |
| 24 | #define VENDOR_ID 0xFEED | 24 | #define PRODUCT_ID 0x56C2 |
| 25 | #define PRODUCT_ID 0x6060 | 25 | #define DEVICE_VER 0x0001 |
| 26 | #define DEVICE_VER 0x0001 | 26 | #define MANUFACTURER DARKOU |
| 27 | #define MANUFACTURER DARKOU | 27 | #define PRODUCT DK60 |
| 28 | #define PRODUCT DK60 | 28 | |
| 29 | #define DESCRIPTION QMK keyboard firmware for DK60 support | 29 | /* key matrix size */ |
| 30 | 30 | #define MATRIX_ROWS 5 | |
| 31 | /* key matrix size */ | 31 | #define MATRIX_COLS 13 |
| 32 | #define MATRIX_ROWS 5 | 32 | |
| 33 | #define MATRIX_COLS 13 | 33 | /* |
| 34 | 34 | * Keyboard Matrix Assignments | |
| 35 | // ROWS: Top to bottom, COLS: Left to right | 35 | * |
| 36 | #define MATRIX_ROW_PINS { B6, B4, D7, D6, D4 } | 36 | * Change this to how you wired your keyboard |
| 37 | #define MATRIX_COL_PINS { B0, B3, B2, B1, D3, D5, B5, B7, C6, C7, D0, D1, D2 } | 37 | * COLS: AVR pins used for columns, left to right |
| 38 | #define UNUSED_PINS | 38 | * ROWS: AVR pins used for rows, top to bottom |
| 39 | 39 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | |
| 40 | /* COL2ROW or ROW2COL */ | 40 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) |
| 41 | #define DIODE_DIRECTION COL2ROW | 41 | * |
| 42 | 42 | */ | |
| 43 | /* Set 0 if debouncing isn't needed */ | 43 | #define MATRIX_ROW_PINS { B6, B4, D7, D6, D4 } |
| 44 | #define DEBOUNCE 5 | 44 | #define MATRIX_COL_PINS { B0, B3, B2, B1, D3, D5, B5, B7, C6, C7, D0, D1, D2 } |
| 45 | 45 | #define UNUSED_PINS | |
| 46 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | 46 | |
| 47 | #define LOCKING_SUPPORT_ENABLE | 47 | /* COL2ROW, ROW2COL */ |
| 48 | /* Locking resynchronize hack */ | 48 | #define DIODE_DIRECTION COL2ROW |
| 49 | #define LOCKING_RESYNC_ENABLE | 49 | |
| 50 | #endif | 50 | //#define BACKLIGHT_PIN B7 |
| 51 | //#define BACKLIGHT_LEVELS 3 | ||
| 52 | //#define BACKLIGHT_BREATHING | ||
| 53 | |||
| 54 | //#define RGB_DI_PIN E2 | ||
| 55 | //#ifdef RGB_DI_PIN | ||
| 56 | //# define RGBLED_NUM 16 | ||
| 57 | //# define RGBLIGHT_HUE_STEP 8 | ||
| 58 | //# define RGBLIGHT_SAT_STEP 8 | ||
| 59 | //# define RGBLIGHT_VAL_STEP 8 | ||
| 60 | //# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
| 61 | //# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
| 62 | /*== all animations enable ==*/ | ||
| 63 | //# define RGBLIGHT_ANIMATIONS | ||
| 64 | /*== or choose animations ==*/ | ||
| 65 | //# define RGBLIGHT_EFFECT_BREATHING | ||
| 66 | //# define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 67 | //# define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 68 | //# define RGBLIGHT_EFFECT_SNAKE | ||
| 69 | //# define RGBLIGHT_EFFECT_KNIGHT | ||
| 70 | //# define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 71 | //# define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 72 | //# define RGBLIGHT_EFFECT_RGB_TEST | ||
| 73 | //# define RGBLIGHT_EFFECT_ALTERNATING | ||
| 74 | /*== customize breathing effect ==*/ | ||
| 75 | /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ | ||
| 76 | //# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 | ||
| 77 | /*==== use exp() and sin() ====*/ | ||
| 78 | //# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 | ||
| 79 | //# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 | ||
| 80 | //#endif | ||
| 81 | |||
| 82 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 83 | #define DEBOUNCE 5 | ||
| 84 | |||
| 85 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
| 86 | //#define MATRIX_HAS_GHOST | ||
| 87 | |||
| 88 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 89 | #define LOCKING_SUPPORT_ENABLE | ||
| 90 | /* Locking resynchronize hack */ | ||
| 91 | #define LOCKING_RESYNC_ENABLE | ||
| 92 | |||
| 93 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | ||
| 94 | * This is useful for the Windows task manager shortcut (ctrl+shift+esc). | ||
| 95 | */ | ||
| 96 | //#define GRAVE_ESC_CTRL_OVERRIDE | ||
| 97 | |||
| 98 | /* | ||
| 99 | * Force NKRO | ||
| 100 | * | ||
| 101 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 102 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 103 | * makefile for this to work.) | ||
| 104 | * | ||
| 105 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 106 | * until the next keyboard reset. | ||
| 107 | * | ||
| 108 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 109 | * fully operational during normal computer usage. | ||
| 110 | * | ||
| 111 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 112 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 113 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 114 | * power-up. | ||
| 115 | * | ||
| 116 | */ | ||
| 117 | //#define FORCE_NKRO | ||
| 118 | |||
| 119 | /* | ||
| 120 | * Feature disable options | ||
| 121 | * These options are also useful to firmware size reduction. | ||
| 122 | */ | ||
| 123 | |||
| 124 | /* disable debug print */ | ||
| 125 | //#define NO_DEBUG | ||
| 126 | |||
| 127 | /* disable print */ | ||
| 128 | //#define NO_PRINT | ||
| 129 | |||
| 130 | /* disable action features */ | ||
| 131 | //#define NO_ACTION_LAYER | ||
| 132 | //#define NO_ACTION_TAPPING | ||
| 133 | //#define NO_ACTION_ONESHOT | ||
| 134 | |||
| 135 | /* disable these deprecated features by default */ | ||
| 136 | #define NO_ACTION_MACRO | ||
| 137 | #define NO_ACTION_FUNCTION | ||
| 138 | |||
| 139 | /* Bootmagic Lite key configuration */ | ||
| 140 | //#define BOOTMAGIC_LITE_ROW 0 | ||
| 141 | //#define BOOTMAGIC_LITE_COLUMN 0 | ||
diff --git a/keyboards/dk60/dk60.c b/keyboards/dk60/dk60.c index 8b9dc547d..6d72ff6bd 100644 --- a/keyboards/dk60/dk60.c +++ b/keyboards/dk60/dk60.c | |||
| @@ -1,3 +1,20 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2017 Damien Broqua <contact@darkou.fr> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 1 | #include "dk60.h" | 18 | #include "dk60.h" |
| 2 | 19 | ||
| 3 | extern inline void dk60_caps_led_on(void); | 20 | extern inline void dk60_caps_led_on(void); |
| @@ -9,12 +26,10 @@ extern inline void dk60_esc_led_off(void); | |||
| 9 | extern inline void dk60_led_all_on(void); | 26 | extern inline void dk60_led_all_on(void); |
| 10 | extern inline void dk60_led_all_off(void); | 27 | extern inline void dk60_led_all_off(void); |
| 11 | 28 | ||
| 12 | 29 | void dk60_blink_all_leds(void) { | |
| 13 | void dk60_blink_all_leds(void) | ||
| 14 | { | ||
| 15 | dk60_led_all_off(); | 30 | dk60_led_all_off(); |
| 16 | dk60_led_all_on(); | 31 | dk60_led_all_on(); |
| 17 | _delay_ms(500); | 32 | wait_ms(500); |
| 18 | dk60_led_all_off(); | 33 | dk60_led_all_off(); |
| 19 | } | 34 | } |
| 20 | 35 | ||
| @@ -26,19 +41,18 @@ void matrix_init_kb(void) { | |||
| 26 | } | 41 | } |
| 27 | 42 | ||
| 28 | void led_init_ports(void) { | 43 | void led_init_ports(void) { |
| 29 | // * Set our LED pins as output | 44 | setPinOutput(E6); |
| 30 | DDRE |= (1<<6); | 45 | setPinOutput(F0); |
| 31 | DDRF |= (1<<0); | ||
| 32 | } | 46 | } |
| 33 | 47 | ||
| 34 | void led_set_kb(uint8_t usb_led) { | 48 | bool led_update_kb(led_t led_state) { |
| 35 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) { | 49 | if (led_update_user(led_state)) { |
| 36 | // Turn capslock on | 50 | if (led_state.caps_lock) { |
| 37 | dk60_caps_led_on(); | 51 | dk60_caps_led_on(); |
| 38 | } else { | 52 | } else { |
| 39 | // Turn capslock off | 53 | dk60_caps_led_off(); |
| 40 | dk60_caps_led_off(); | 54 | } |
| 41 | } | 55 | } |
| 42 | 56 | ||
| 43 | led_set_user(usb_led); | 57 | return true; |
| 44 | } | 58 | } |
diff --git a/keyboards/dk60/dk60.h b/keyboards/dk60/dk60.h index 7c96af100..36ac690ab 100644 --- a/keyboards/dk60/dk60.h +++ b/keyboards/dk60/dk60.h | |||
| @@ -1,41 +1,52 @@ | |||
| 1 | #ifndef DK60_H | 1 | /* |
| 2 | #define DK60_H | 2 | Copyright 2017 Damien Broqua <contact@darkou.fr> |
| 3 | 3 | ||
| 4 | #include "quantum.h" | 4 | This program is free software: you can redistribute it and/or modify |
| 5 | #include <util/delay.h> | 5 | it under the terms of the GNU General Public License as published by |
| 6 | 6 | the Free Software Foundation, either version 2 of the License, or | |
| 7 | inline void dk60_caps_led_on(void) { PORTE |= (1<<6); } | 7 | (at your option) any later version. |
| 8 | inline void dk60_esc_led_on(void) { PORTF |= (1<<0); } | 8 | |
| 9 | 9 | This program is distributed in the hope that it will be useful, | |
| 10 | inline void dk60_caps_led_off(void) { PORTE &= ~(1<<6); } | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | inline void dk60_esc_led_off(void) { PORTF &= ~(1<<0); } | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | 12 | GNU General Public License for more details. | |
| 13 | inline void dk60_led_all_on(void) | 13 | |
| 14 | { | 14 | You should have received a copy of the GNU General Public License |
| 15 | dk60_caps_led_on(); | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | dk60_esc_led_on(); | 16 | */ |
| 17 | } | 17 | |
| 18 | 18 | #pragma once | |
| 19 | inline void dk60_led_all_off(void) | 19 | |
| 20 | { | 20 | #include "quantum.h" |
| 21 | dk60_caps_led_off(); | 21 | |
| 22 | dk60_esc_led_off(); | 22 | inline void dk60_caps_led_on(void) { writePinHigh(E6); } |
| 23 | } | 23 | inline void dk60_esc_led_on(void) { writePinHigh(F0); } |
| 24 | 24 | ||
| 25 | #define ___ KC_NO | 25 | inline void dk60_caps_led_off(void) { writePinLow(E6); } |
| 26 | 26 | inline void dk60_esc_led_off(void) { writePinLow(F0); } | |
| 27 | #define LAYOUT( \ | 27 | |
| 28 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K4B, K4A, \ | 28 | inline void dk60_led_all_on(void) { |
| 29 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K4C, \ | 29 | dk60_caps_led_on(); |
| 30 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ | 30 | dk60_esc_led_on(); |
| 31 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ | 31 | } |
| 32 | K41, K42, K45, K48, K49 \ | 32 | |
| 33 | ) { \ | 33 | inline void dk60_led_all_off(void) { |
| 34 | { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \ | 34 | dk60_caps_led_off(); |
| 35 | { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \ | 35 | dk60_esc_led_off(); |
| 36 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \ | 36 | } |
| 37 | { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C }, \ | 37 | |
| 38 | { ___, K41, K42, ___, ___, K45, ___, ___, K48, K49, K4A, K4B, K4C } \ | 38 | #define XXX KC_NO |
| 39 | } | 39 | |
| 40 | 40 | #define LAYOUT( \ | |
| 41 | #endif | 41 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K4B, K4A, \ |
| 42 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K4C, \ | ||
| 43 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ | ||
| 44 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ | ||
| 45 | K41, K42, K45, K48, K49 \ | ||
| 46 | ) { \ | ||
| 47 | { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \ | ||
| 48 | { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \ | ||
| 49 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \ | ||
| 50 | { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C }, \ | ||
| 51 | { XXX, K41, K42, XXX, XXX, K45, XXX, XXX, K48, K49, K4A, K4B, K4C } \ | ||
| 52 | } | ||
diff --git a/keyboards/dk60/info.json b/keyboards/dk60/info.json index 0dd669fd3..2a6725bd2 100644 --- a/keyboards/dk60/info.json +++ b/keyboards/dk60/info.json | |||
| @@ -1,13 +1,77 @@ | |||
| 1 | { | 1 | { |
| 2 | "keyboard_name": "DK60", | 2 | "keyboard_name": "DK60", |
| 3 | "url": "", | 3 | "url": "", |
| 4 | "maintainer": "qmk", | 4 | "maintainer": "qmk", |
| 5 | "width": 15, | 5 | "width": 15, |
| 6 | "height": 5, | 6 | "height": 5, |
| 7 | "layouts": { | 7 | "layouts": { |
| 8 | "LAYOUT": { | 8 | "LAYOUT": { |
| 9 | "key_count": 60, | 9 | "layout": [ |
| 10 | "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":"K0C", "x":12, "y":0}, {"label":"K4B", "x":13, "y":0}, {"label":"K4A", "x":14, "y":0}, {"label":"K10", "x":0, "y":1, "w":1.5}, {"label":"K11", "x":1.5, "y":1}, {"label":"K12", "x":2.5, "y":1}, {"label":"K13", "x":3.5, "y":1}, {"label":"K14", "x":4.5, "y":1}, {"label":"K15", "x":5.5, "y":1}, {"label":"K16", "x":6.5, "y":1}, {"label":"K17", "x":7.5, "y":1}, {"label":"K18", "x":8.5, "y":1}, {"label":"K19", "x":9.5, "y":1}, {"label":"K1A", "x":10.5, "y":1}, {"label":"K1B", "x":11.5, "y":1}, {"label":"K1C", "x":12.5, "y":1}, {"label":"K4C", "x":13.5, "y":1, "w":1.5}, {"label":"K20", "x":0, "y":2, "w":1.75}, {"label":"K21", "x":1.75, "y":2}, {"label":"K22", "x":2.75, "y":2}, {"label":"K23", "x":3.75, "y":2}, {"label":"K24", "x":4.75, "y":2}, {"label":"K25", "x":5.75, "y":2}, {"label":"K26", "x":6.75, "y":2}, {"label":"K27", "x":7.75, "y":2}, {"label":"K28", "x":8.75, "y":2}, {"label":"K29", "x":9.75, "y":2}, {"label":"K2A", "x":10.75, "y":2}, {"label":"K2B", "x":11.75, "y":2}, {"label":"K2C", "x":12.75, "y":2, "w":2.25}, {"label":"K30", "x":0, "y":3, "w":2.25}, {"label":"K31", "x":2.25, "y":3}, {"label":"K32", "x":3.25, "y":3}, {"label":"K33", "x":4.25, "y":3}, {"label":"K34", "x":5.25, "y":3}, {"label":"K35", "x":6.25, "y":3}, {"label":"K36", "x":7.25, "y":3}, {"label":"K37", "x":8.25, "y":3}, {"label":"K38", "x":9.25, "y":3}, {"label":"K39", "x":10.25, "y":3}, {"label":"K3A", "x":11.25, "y":3}, {"label":"K3B", "x":12.25, "y":3, "w":1.75}, {"label":"K3C", "x":14, "y":3}, {"label":"K41", "x":1.5, "y":4}, {"label":"K42", "x":2.5, "y":4, "w":1.25}, {"label":"K45", "x":3.75, "y":4, "w":7}, {"label":"K48", "x":10.75, "y":4, "w":1.25}, {"label":"K49", "x":12, "y":4}] | 10 | {"x": 0, "y": 0}, |
| 11 | {"x": 1, "y": 0}, | ||
| 12 | {"x": 2, "y": 0}, | ||
| 13 | {"x": 3, "y": 0}, | ||
| 14 | {"x": 4, "y": 0}, | ||
| 15 | {"x": 5, "y": 0}, | ||
| 16 | {"x": 6, "y": 0}, | ||
| 17 | {"x": 7, "y": 0}, | ||
| 18 | {"x": 8, "y": 0}, | ||
| 19 | {"x": 9, "y": 0}, | ||
| 20 | {"x": 10, "y": 0}, | ||
| 21 | {"x": 11, "y": 0}, | ||
| 22 | {"x": 12, "y": 0}, | ||
| 23 | {"x": 13, "y": 0}, | ||
| 24 | {"x": 14, "y": 0}, | ||
| 25 | |||
| 26 | {"x": 0, "y": 1, "w": 1.5}, | ||
| 27 | {"x": 1.5, "y": 1}, | ||
| 28 | {"x": 2.5, "y": 1}, | ||
| 29 | {"x": 3.5, "y": 1}, | ||
| 30 | {"x": 4.5, "y": 1}, | ||
| 31 | {"x": 5.5, "y": 1}, | ||
| 32 | {"x": 6.5, "y": 1}, | ||
| 33 | {"x": 7.5, "y": 1}, | ||
| 34 | {"x": 8.5, "y": 1}, | ||
| 35 | {"x": 9.5, "y": 1}, | ||
| 36 | {"x": 10.5, "y": 1}, | ||
| 37 | {"x": 11.5, "y": 1}, | ||
| 38 | {"x": 12.5, "y": 1}, | ||
| 39 | {"x": 13.5, "y": 1, "w": 1.5}, | ||
| 40 | |||
| 41 | {"x": 0, "y": 2, "w": 1.75}, | ||
| 42 | {"x": 1.75, "y": 2}, | ||
| 43 | {"x": 2.75, "y": 2}, | ||
| 44 | {"x": 3.75, "y": 2}, | ||
| 45 | {"x": 4.75, "y": 2}, | ||
| 46 | {"x": 5.75, "y": 2}, | ||
| 47 | {"x": 6.75, "y": 2}, | ||
| 48 | {"x": 7.75, "y": 2}, | ||
| 49 | {"x": 8.75, "y": 2}, | ||
| 50 | {"x": 9.75, "y": 2}, | ||
| 51 | {"x": 10.75, "y": 2}, | ||
| 52 | {"x": 11.75, "y": 2}, | ||
| 53 | {"x": 12.75, "y": 2, "w": 2.25}, | ||
| 54 | |||
| 55 | {"x": 0, "y": 3, "w": 2.25}, | ||
| 56 | {"x": 2.25, "y": 3}, | ||
| 57 | {"x": 3.25, "y": 3}, | ||
| 58 | {"x": 4.25, "y": 3}, | ||
| 59 | {"x": 5.25, "y": 3}, | ||
| 60 | {"x": 6.25, "y": 3}, | ||
| 61 | {"x": 7.25, "y": 3}, | ||
| 62 | {"x": 8.25, "y": 3}, | ||
| 63 | {"x": 9.25, "y": 3}, | ||
| 64 | {"x": 10.25, "y": 3}, | ||
| 65 | {"x": 11.25, "y": 3}, | ||
| 66 | {"x": 12.25, "y": 3, "w": 1.75}, | ||
| 67 | {"x": 14, "y": 3}, | ||
| 68 | |||
| 69 | {"x": 1.5, "y": 4}, | ||
| 70 | {"x": 2.5, "y": 4, "w": 1.25}, | ||
| 71 | {"x": 3.75, "y": 4, "w": 7}, | ||
| 72 | {"x": 10.75, "y": 4, "w": 1.25}, | ||
| 73 | {"x": 12, "y": 4} | ||
| 74 | ] | ||
| 75 | } | ||
| 11 | } | 76 | } |
| 12 | } | ||
| 13 | } | 77 | } |
diff --git a/keyboards/dk60/keymaps/default/keymap.c b/keyboards/dk60/keymaps/default/keymap.c index 43c281983..7ebc3952b 100644 --- a/keyboards/dk60/keymaps/default/keymap.c +++ b/keyboards/dk60/keymaps/default/keymap.c | |||
| @@ -1,79 +1,80 @@ | |||
| 1 | #include QMK_KEYBOARD_H | 1 | /* |
| 2 | Copyright 2017 Damien Broqua <contact@darkou.fr> | ||
| 2 | 3 | ||
| 3 | enum planck_layers { | 4 | This program is free software: you can redistribute it and/or modify |
| 4 | _QWERTY, | 5 | it under the terms of the GNU General Public License as published by |
| 5 | _FN, | 6 | the Free Software Foundation, either version 2 of the License, or |
| 6 | _DVORAK, | 7 | (at your option) any later version. |
| 7 | _LOWER, | ||
| 8 | _RAISE, | ||
| 9 | _PLOVER, | ||
| 10 | _ADJUST | ||
| 11 | }; | ||
| 12 | 8 | ||
| 13 | enum planck_keycodes { | 9 | This program is distributed in the hope that it will be useful, |
| 14 | QWERTY = SAFE_RANGE, | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | FN | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | }; | 12 | GNU General Public License for more details. |
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | 17 | ||
| 18 | // Fillers to make layering more clear | 18 | #include QMK_KEYBOARD_H |
| 19 | #define ______ KC_TRNS | 19 | |
| 20 | enum layer_names { | ||
| 21 | _QWERTY, | ||
| 22 | _FN | ||
| 23 | }; | ||
| 20 | 24 | ||
| 21 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 25 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 22 | /* Qwerty gui/alt/space/alt/gui | 26 | /* Qwerty gui/alt/space/alt/gui |
| 23 | * ,-----------------------------------------------------------------------------------------. | 27 | * ,-----------------------------------------------------------------------------------------. |
| 24 | * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | | 28 | * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | |
| 25 | * |-----------------------------------------------------------------------------------------+ | 29 | * |-----------------------------------------------------------------------------------------+ |
| 26 | * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | | 30 | * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | |
| 27 | * |-----------------------------------------------------------------------------------------+ | 31 | * |-----------------------------------------------------------------------------------------+ |
| 28 | * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | | 32 | * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | |
| 29 | * |-----------------------------------------------------------------------------------------+ | 33 | * |-----------------------------------------------------------------------------------------+ |
| 30 | * | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN | | 34 | * | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN | |
| 31 | * |-----------------------------------------------------------------------------------------+ | 35 | * |-----------------------------------------------------------------------------------------+ |
| 32 | * |LGUI | LAlt | Space | RAlt |RGUI | | 36 | * |LGUI | LAlt | Space | RAlt |RGUI | |
| 33 | * `-----------------------------------------------------------------' | 37 | * `-----------------------------------------------------------------' |
| 34 | */ | 38 | */ |
| 35 | [_QWERTY] = LAYOUT( /* Basic QWERTY */ | 39 | [_QWERTY] = LAYOUT( /* Basic QWERTY */ |
| 36 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ | 40 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, |
| 37 | 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, \ | 41 | 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, |
| 38 | 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, \ | 42 | 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, |
| 39 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN, \ | 43 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), |
| 40 | KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI \ | 44 | KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI |
| 41 | ), | 45 | ), |
| 42 | 46 | ||
| 43 | /* FN Layer | 47 | /* FN Layer |
| 44 | * ,-----------------------------------------------------------------------------------------. | 48 | * ,-----------------------------------------------------------------------------------------. |
| 45 | * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | | 49 | * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | |
| 46 | * |-----------------------------------------------------------------------------------------+ | 50 | * |-----------------------------------------------------------------------------------------+ |
| 47 | * | CAPS | | | | | | | | Psc | Slck| Paus| Up | | | | 51 | * | CAPS | | | | | | | | Psc | Slck| Paus| Up | | | |
| 48 | * |-----------------------------------------------------------------------------------------+ | 52 | * |-----------------------------------------------------------------------------------------+ |
| 49 | * | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| | | 53 | * | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| | |
| 50 | * |-----------------------------------------------------------------------------------------+ | 54 | * |-----------------------------------------------------------------------------------------+ |
| 51 | * | | Prev| Play| Next| | | + | - | End |PgDn| Down| | | | 55 | * | | Prev| Play| Next| | | + | - | End |PgDn| Down| | | |
| 52 | * |-----------------------------------------------------------------------------------------+ | 56 | * |-----------------------------------------------------------------------------------------+ |
| 53 | * | | | | Stop | | | 57 | * | | | | Stop | | |
| 54 | * `-----------------------------------------------------------------' | 58 | * `-----------------------------------------------------------------' |
| 55 | */ | 59 | */ |
| 56 | [_FN] = LAYOUT( /* Layer 1 */ | 60 | [_FN] = LAYOUT( /* Layer 1 */ |
| 57 | ______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ | 61 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, |
| 58 | KC_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \ | 62 | KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, |
| 59 | ______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______, \ | 63 | _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, |
| 60 | ______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, \ | 64 | _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, |
| 61 | ______, ______, ______, KC_MSTP, ______ \ | 65 | _______, _______, _______, KC_MSTP, _______ |
| 62 | ) | 66 | ) |
| 63 | }; | 67 | }; |
| 64 | 68 | ||
| 65 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 69 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 66 | switch (keycode) { | 70 | switch (keycode) { |
| 67 | case FN: | 71 | case MO(_FN): |
| 68 | if (record->event.pressed) { | 72 | if (record->event.pressed) { |
| 69 | layer_on(_FN); | 73 | dk60_esc_led_on(); |
| 70 | dk60_esc_led_on(); | 74 | } else { |
| 71 | } else { | 75 | dk60_esc_led_off(); |
| 72 | layer_off(_FN); | 76 | } |
| 73 | dk60_esc_led_off(); | 77 | return false; |
| 74 | } | 78 | } |
| 75 | return false; | 79 | return true; |
| 76 | break; | ||
| 77 | } | ||
| 78 | return true; | ||
| 79 | } | 80 | } |
diff --git a/keyboards/dk60/readme.md b/keyboards/dk60/readme.md index b9d9b6711..0e557f32b 100644 --- a/keyboards/dk60/readme.md +++ b/keyboards/dk60/readme.md | |||
| @@ -1,17 +1,19 @@ | |||
| 1 | DK60 | 1 | # DK60 |
| 2 | === | ||
| 3 | 2 | ||
| 4 |  | 3 |  |
| 5 | 4 | ||
| 6 | Another 60% keyboard with different HHKB layout made and sold by dbroqua. [More info on github/dbroqua](https://github.com/Dbroqua/DK60/) | 5 | Another 60% keyboard with different HHKB layout made and sold by dbroqua. |
| 7 | 6 | ||
| 8 | Keyboard Maintainer: [Damien Broqua aka DarKou](https://github.com/Dbroqua) | 7 | * Keyboard Maintainer: [Damien Broqua aka DarKou](https://github.com/Dbroqua) |
| 9 | Hardware Supported: DK60 PCB revA | 8 | * Hardware Supported: DK60 PCB revA |
| 9 | * Hardware Availability: https://github.com/Dbroqua/DK60/ | ||
| 10 | 10 | ||
| 11 | Make example for this keyboard (after setting up your build environment): | 11 | Make example for this keyboard (after setting up your build environment): |
| 12 | 12 | ||
| 13 | make dk60:default | 13 | make dk60:default |
| 14 | 14 | ||
| 15 | See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. | 15 | Flashing example for this keyboard: |
| 16 | 16 | ||
| 17 | Open Hardware project! | 17 | make dk60:default:flash |
| 18 | |||
| 19 | 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/dk60/rules.mk b/keyboards/dk60/rules.mk index b7518eee3..bd7843a9b 100644 --- a/keyboards/dk60/rules.mk +++ b/keyboards/dk60/rules.mk | |||
| @@ -2,26 +2,23 @@ | |||
| 2 | MCU = atmega32u4 | 2 | MCU = atmega32u4 |
| 3 | 3 | ||
| 4 | # Bootloader selection | 4 | # Bootloader selection |
| 5 | # Teensy halfkay | ||
| 6 | # Pro Micro caterina | ||
| 7 | # Atmel DFU atmel-dfu | ||
| 8 | # LUFA DFU lufa-dfu | ||
| 9 | # QMK DFU qmk-dfu | ||
| 10 | # ATmega32A bootloadHID | ||
| 11 | # ATmega328P USBasp | ||
| 12 | BOOTLOADER = atmel-dfu | 5 | BOOTLOADER = atmel-dfu |
| 13 | 6 | ||
| 14 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration | 7 | # Build Options |
| 15 | MOUSEKEY_ENABLE = no # Mouse keys | 8 | # change yes to no to disable |
| 16 | EXTRAKEY_ENABLE = yes # Audio control and System control | 9 | # |
| 17 | # CONSOLE_ENABLE = yes # Console for debug | 10 | BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration |
| 18 | # COMMAND_ENABLE = yes # Commands for debug and configuration | 11 | MOUSEKEY_ENABLE = no # Mouse keys |
| 19 | KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key | 12 | EXTRAKEY_ENABLE = yes # Audio control and System control |
| 20 | NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 13 | CONSOLE_ENABLE = no # Console for debug |
| 21 | RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality | 14 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 22 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
| 23 | MIDI_ENABLE = no # MIDI controls | 16 | SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend |
| 24 | AUDIO_ENABLE = no | 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
| 25 | UNICODE_ENABLE = yes # Unicode | 18 | NKRO_ENABLE = yes # USB Nkey Rollover |
| 26 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality |
| 27 | SLEEP_LED_ENABLE = yes | 20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow |
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 22 | AUDIO_ENABLE = no # Audio output | ||
| 23 | KEYBOARD_LOCK_ENABLE = yes | ||
| 24 | UNICODE_ENABLE = yes | ||
