DK60 refactor (#10791)

master
Ryan 2020-10-31 00:14:13 +11:00 committed by GitHub
parent 952a4c8312
commit 67654e4a82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 362 additions and 182 deletions

View File

@ -15,36 +15,127 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CONFIG_H #pragma once
#define CONFIG_H
#include "config_common.h" #include "config_common.h"
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060 #define PRODUCT_ID 0x56C2
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER DARKOU #define MANUFACTURER DARKOU
#define PRODUCT DK60 #define PRODUCT DK60
#define DESCRIPTION QMK keyboard firmware for DK60 support
/* key matrix size */ /* key matrix size */
#define MATRIX_ROWS 5 #define MATRIX_ROWS 5
#define MATRIX_COLS 13 #define MATRIX_COLS 13
// ROWS: Top to bottom, COLS: Left to right /*
#define MATRIX_ROW_PINS { B6, B4, D7, D6, D4 } * Keyboard Matrix Assignments
#define MATRIX_COL_PINS { B0, B3, B2, B1, D3, D5, B5, B7, C6, C7, D0, D1, D2 } *
#define UNUSED_PINS * 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 { B6, B4, D7, D6, D4 }
#define MATRIX_COL_PINS { B0, B3, B2, B1, D3, D5, B5, B7, C6, C7, D0, D1, D2 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */ /* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */ //#define BACKLIGHT_PIN B7
#define DEBOUNCE 5 //#define BACKLIGHT_LEVELS 3
//#define BACKLIGHT_BREATHING
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define RGB_DI_PIN E2
#define LOCKING_SUPPORT_ENABLE //#ifdef RGB_DI_PIN
/* Locking resynchronize hack */ //# define RGBLED_NUM 16
#define LOCKING_RESYNC_ENABLE //# define RGBLIGHT_HUE_STEP 8
#endif //# 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 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.
*/
/* 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 */
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
/* Bootmagic Lite key configuration */
//#define BOOTMAGIC_LITE_ROW 0
//#define BOOTMAGIC_LITE_COLUMN 0

View File

@ -1,3 +1,20 @@
/*
Copyright 2017 Damien Broqua <contact@darkou.fr>
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 "dk60.h" #include "dk60.h"
extern inline void dk60_caps_led_on(void); extern inline void dk60_caps_led_on(void);
@ -9,12 +26,10 @@ extern inline void dk60_esc_led_off(void);
extern inline void dk60_led_all_on(void); extern inline void dk60_led_all_on(void);
extern inline void dk60_led_all_off(void); extern inline void dk60_led_all_off(void);
void dk60_blink_all_leds(void) {
void dk60_blink_all_leds(void)
{
dk60_led_all_off(); dk60_led_all_off();
dk60_led_all_on(); dk60_led_all_on();
_delay_ms(500); wait_ms(500);
dk60_led_all_off(); dk60_led_all_off();
} }
@ -26,19 +41,18 @@ void matrix_init_kb(void) {
} }
void led_init_ports(void) { void led_init_ports(void) {
// * Set our LED pins as output setPinOutput(E6);
DDRE |= (1<<6); setPinOutput(F0);
DDRF |= (1<<0);
} }
void led_set_kb(uint8_t usb_led) { bool led_update_kb(led_t led_state) {
if (usb_led & (1<<USB_LED_CAPS_LOCK)) { if (led_update_user(led_state)) {
// Turn capslock on if (led_state.caps_lock) {
dk60_caps_led_on(); dk60_caps_led_on();
} else { } else {
// Turn capslock off dk60_caps_led_off();
dk60_caps_led_off(); }
} }
led_set_user(usb_led); return true;
} }

View File

@ -1,41 +1,52 @@
#ifndef DK60_H /*
#define DK60_H Copyright 2017 Damien Broqua <contact@darkou.fr>
#include "quantum.h" This program is free software: you can redistribute it and/or modify
#include <util/delay.h> 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.
inline void dk60_caps_led_on(void) { PORTE |= (1<<6); } This program is distributed in the hope that it will be useful,
inline void dk60_esc_led_on(void) { PORTF |= (1<<0); } 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.
inline void dk60_caps_led_off(void) { PORTE &= ~(1<<6); } You should have received a copy of the GNU General Public License
inline void dk60_esc_led_off(void) { PORTF &= ~(1<<0); } along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
inline void dk60_led_all_on(void) #pragma once
{
dk60_caps_led_on();
dk60_esc_led_on();
}
inline void dk60_led_all_off(void) #include "quantum.h"
{
dk60_caps_led_off();
dk60_esc_led_off();
}
#define ___ KC_NO inline void dk60_caps_led_on(void) { writePinHigh(E6); }
inline void dk60_esc_led_on(void) { writePinHigh(F0); }
#define LAYOUT( \ inline void dk60_caps_led_off(void) { writePinLow(E6); }
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K4B, K4A, \ inline void dk60_esc_led_off(void) { writePinLow(F0); }
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K4C, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
K41, K42, K45, K48, K49 \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C }, \
{ ___, K41, K42, ___, ___, K45, ___, ___, K48, K49, K4A, K4B, K4C } \
}
#endif inline void dk60_led_all_on(void) {
dk60_caps_led_on();
dk60_esc_led_on();
}
inline void dk60_led_all_off(void) {
dk60_caps_led_off();
dk60_esc_led_off();
}
#define XXX KC_NO
#define LAYOUT( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K4B, K4A, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K4C, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
K41, K42, K45, K48, K49 \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C }, \
{ XXX, K41, K42, XXX, XXX, K45, XXX, XXX, K48, K49, K4A, K4B, K4C } \
}

View File

@ -1,13 +1,77 @@
{ {
"keyboard_name": "DK60", "keyboard_name": "DK60",
"url": "", "url": "",
"maintainer": "qmk", "maintainer": "qmk",
"width": 15, "width": 15,
"height": 5, "height": 5,
"layouts": { "layouts": {
"LAYOUT": { "LAYOUT": {
"key_count": 60, "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":"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}] {"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": 12, "y": 0},
{"x": 13, "y": 0},
{"x": 14, "y": 0},
{"x": 0, "y": 1, "w": 1.5},
{"x": 1.5, "y": 1},
{"x": 2.5, "y": 1},
{"x": 3.5, "y": 1},
{"x": 4.5, "y": 1},
{"x": 5.5, "y": 1},
{"x": 6.5, "y": 1},
{"x": 7.5, "y": 1},
{"x": 8.5, "y": 1},
{"x": 9.5, "y": 1},
{"x": 10.5, "y": 1},
{"x": 11.5, "y": 1},
{"x": 12.5, "y": 1},
{"x": 13.5, "y": 1, "w": 1.5},
{"x": 0, "y": 2, "w": 1.75},
{"x": 1.75, "y": 2},
{"x": 2.75, "y": 2},
{"x": 3.75, "y": 2},
{"x": 4.75, "y": 2},
{"x": 5.75, "y": 2},
{"x": 6.75, "y": 2},
{"x": 7.75, "y": 2},
{"x": 8.75, "y": 2},
{"x": 9.75, "y": 2},
{"x": 10.75, "y": 2},
{"x": 11.75, "y": 2},
{"x": 12.75, "y": 2, "w": 2.25},
{"x": 0, "y": 3, "w": 2.25},
{"x": 2.25, "y": 3},
{"x": 3.25, "y": 3},
{"x": 4.25, "y": 3},
{"x": 5.25, "y": 3},
{"x": 6.25, "y": 3},
{"x": 7.25, "y": 3},
{"x": 8.25, "y": 3},
{"x": 9.25, "y": 3},
{"x": 10.25, "y": 3},
{"x": 11.25, "y": 3},
{"x": 12.25, "y": 3, "w": 1.75},
{"x": 14, "y": 3},
{"x": 1.5, "y": 4},
{"x": 2.5, "y": 4, "w": 1.25},
{"x": 3.75, "y": 4, "w": 7},
{"x": 10.75, "y": 4, "w": 1.25},
{"x": 12, "y": 4}
]
}
} }
}
} }

View File

@ -1,79 +1,80 @@
/*
Copyright 2017 Damien Broqua <contact@darkou.fr>
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 #include QMK_KEYBOARD_H
enum planck_layers { enum layer_names {
_QWERTY, _QWERTY,
_FN, _FN
_DVORAK,
_LOWER,
_RAISE,
_PLOVER,
_ADJUST
}; };
enum planck_keycodes {
QWERTY = SAFE_RANGE,
FN
};
// Fillers to make layering more clear
#define ______ KC_TRNS
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty gui/alt/space/alt/gui /* Qwerty gui/alt/space/alt/gui
* ,-----------------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------------.
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
* |-----------------------------------------------------------------------------------------+ * |-----------------------------------------------------------------------------------------+
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
* |-----------------------------------------------------------------------------------------+ * |-----------------------------------------------------------------------------------------+
* | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
* |-----------------------------------------------------------------------------------------+ * |-----------------------------------------------------------------------------------------+
* | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN | * | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN |
* |-----------------------------------------------------------------------------------------+ * |-----------------------------------------------------------------------------------------+
* |LGUI | LAlt | Space | RAlt |RGUI | * |LGUI | LAlt | Space | RAlt |RGUI |
* `-----------------------------------------------------------------' * `-----------------------------------------------------------------'
*/ */
[_QWERTY] = LAYOUT( /* Basic QWERTY */ [_QWERTY] = LAYOUT( /* Basic QWERTY */
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN, \ 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),
KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI \ KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI
), ),
/* FN Layer /* FN Layer
* ,-----------------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
* |-----------------------------------------------------------------------------------------+ * |-----------------------------------------------------------------------------------------+
* | CAPS | | | | | | | | Psc | Slck| Paus| Up | | | * | CAPS | | | | | | | | Psc | Slck| Paus| Up | | |
* |-----------------------------------------------------------------------------------------+ * |-----------------------------------------------------------------------------------------+
* | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| | * | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| |
* |-----------------------------------------------------------------------------------------+ * |-----------------------------------------------------------------------------------------+
* | | Prev| Play| Next| | | + | - | End |PgDn| Down| | | * | | Prev| Play| Next| | | + | - | End |PgDn| Down| | |
* |-----------------------------------------------------------------------------------------+ * |-----------------------------------------------------------------------------------------+
* | | | | Stop | | * | | | | Stop | |
* `-----------------------------------------------------------------' * `-----------------------------------------------------------------'
*/ */
[_FN] = LAYOUT( /* Layer 1 */ [_FN] = LAYOUT( /* Layer 1 */
______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL,
KC_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \ KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______,
______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______, \ _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______,
______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, \ _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______,
______, ______, ______, KC_MSTP, ______ \ _______, _______, _______, KC_MSTP, _______
) )
}; };
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case FN: case MO(_FN):
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_FN); dk60_esc_led_on();
dk60_esc_led_on(); } else {
} else { dk60_esc_led_off();
layer_off(_FN); }
dk60_esc_led_off(); return false;
} }
return false; return true;
break;
}
return true;
} }

View File

@ -1,17 +1,19 @@
DK60 # DK60
===
![DK60](https://github.com/Dbroqua/DK60/raw/master/Previews/DK60.png) ![DK60](https://github.com/Dbroqua/DK60/raw/master/Previews/DK60.png)
Another 60% keyboard with different HHKB layout made and sold by dbroqua. [More info on github/dbroqua](https://github.com/Dbroqua/DK60/) Another 60% keyboard with different HHKB layout made and sold by dbroqua.
Keyboard Maintainer: [Damien Broqua aka DarKou](https://github.com/Dbroqua) * Keyboard Maintainer: [Damien Broqua aka DarKou](https://github.com/Dbroqua)
Hardware Supported: DK60 PCB revA * Hardware Supported: DK60 PCB revA
* Hardware Availability: https://github.com/Dbroqua/DK60/
Make example for this keyboard (after setting up your build environment): Make example for this keyboard (after setting up your build environment):
make dk60:default make dk60:default
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. Flashing example for this keyboard:
Open Hardware project! make dk60:default: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).

View File

@ -2,26 +2,23 @@
MCU = atmega32u4 MCU = atmega32u4
# Bootloader selection # 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 BOOTLOADER = atmel-dfu
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration # Build Options
MOUSEKEY_ENABLE = no # Mouse keys # change yes to no to disable
EXTRAKEY_ENABLE = yes # Audio control and System control #
# CONSOLE_ENABLE = yes # Console for debug BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
# COMMAND_ENABLE = yes # Commands for debug and configuration MOUSEKEY_ENABLE = no # Mouse keys
KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key EXTRAKEY_ENABLE = yes # Audio control and System control
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work CONSOLE_ENABLE = no # Console for debug
RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality COMMAND_ENABLE = no # Commands for debug and configuration
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
MIDI_ENABLE = no # MIDI controls SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
AUDIO_ENABLE = no # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
UNICODE_ENABLE = yes # Unicode NKRO_ENABLE = yes # USB Nkey Rollover
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
SLEEP_LED_ENABLE = yes RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
KEYBOARD_LOCK_ENABLE = yes
UNICODE_ENABLE = yes