mirror of
https://github.com/firewalkwithm3/qmk_firmware.git
synced 2024-11-22 11:30:30 +08:00
DK60 refactor (#10791)
This commit is contained in:
parent
952a4c8312
commit
67654e4a82
|
@ -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/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER DARKOU
|
||||
#define PRODUCT DK60
|
||||
#define DESCRIPTION QMK keyboard firmware for DK60 support
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x56C2
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER DARKOU
|
||||
#define PRODUCT DK60
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 13
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 13
|
||||
|
||||
// ROWS: Top to bottom, COLS: Left to right
|
||||
#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
|
||||
/*
|
||||
* 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 { 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 */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
/* COL2ROW, ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 5
|
||||
//#define BACKLIGHT_PIN B7
|
||||
//#define BACKLIGHT_LEVELS 3
|
||||
//#define BACKLIGHT_BREATHING
|
||||
|
||||
/* 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
|
||||
#endif
|
||||
//#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 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
|
||||
|
|
|
@ -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"
|
||||
|
||||
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_off(void);
|
||||
|
||||
|
||||
void dk60_blink_all_leds(void)
|
||||
{
|
||||
void dk60_blink_all_leds(void) {
|
||||
dk60_led_all_off();
|
||||
dk60_led_all_on();
|
||||
_delay_ms(500);
|
||||
wait_ms(500);
|
||||
dk60_led_all_off();
|
||||
}
|
||||
|
||||
|
@ -26,19 +41,18 @@ void matrix_init_kb(void) {
|
|||
}
|
||||
|
||||
void led_init_ports(void) {
|
||||
// * Set our LED pins as output
|
||||
DDRE |= (1<<6);
|
||||
DDRF |= (1<<0);
|
||||
setPinOutput(E6);
|
||||
setPinOutput(F0);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
// Turn capslock on
|
||||
dk60_caps_led_on();
|
||||
} else {
|
||||
// Turn capslock off
|
||||
dk60_caps_led_off();
|
||||
}
|
||||
bool led_update_kb(led_t led_state) {
|
||||
if (led_update_user(led_state)) {
|
||||
if (led_state.caps_lock) {
|
||||
dk60_caps_led_on();
|
||||
} else {
|
||||
dk60_caps_led_off();
|
||||
}
|
||||
}
|
||||
|
||||
led_set_user(usb_led);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,41 +1,52 @@
|
|||
#ifndef DK60_H
|
||||
#define DK60_H
|
||||
/*
|
||||
Copyright 2017 Damien Broqua <contact@darkou.fr>
|
||||
|
||||
#include "quantum.h"
|
||||
#include <util/delay.h>
|
||||
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.
|
||||
|
||||
inline void dk60_caps_led_on(void) { PORTE |= (1<<6); }
|
||||
inline void dk60_esc_led_on(void) { PORTF |= (1<<0); }
|
||||
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.
|
||||
|
||||
inline void dk60_caps_led_off(void) { PORTE &= ~(1<<6); }
|
||||
inline void dk60_esc_led_off(void) { PORTF &= ~(1<<0); }
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
inline void dk60_led_all_on(void)
|
||||
{
|
||||
dk60_caps_led_on();
|
||||
dk60_esc_led_on();
|
||||
}
|
||||
#pragma once
|
||||
|
||||
inline void dk60_led_all_off(void)
|
||||
{
|
||||
dk60_caps_led_off();
|
||||
dk60_esc_led_off();
|
||||
}
|
||||
#include "quantum.h"
|
||||
|
||||
#define ___ KC_NO
|
||||
inline void dk60_caps_led_on(void) { writePinHigh(E6); }
|
||||
inline void dk60_esc_led_on(void) { writePinHigh(F0); }
|
||||
|
||||
#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 }, \
|
||||
{ ___, K41, K42, ___, ___, K45, ___, ___, K48, K49, K4A, K4B, K4C } \
|
||||
}
|
||||
inline void dk60_caps_led_off(void) { writePinLow(E6); }
|
||||
inline void dk60_esc_led_off(void) { writePinLow(F0); }
|
||||
|
||||
#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 } \
|
||||
}
|
||||
|
|
|
@ -1,13 +1,77 @@
|
|||
{
|
||||
"keyboard_name": "DK60",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 15,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"key_count": 60,
|
||||
"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}]
|
||||
"keyboard_name": "DK60",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 15,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"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": 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}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
enum planck_layers {
|
||||
_QWERTY,
|
||||
_FN,
|
||||
_DVORAK,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_PLOVER,
|
||||
_ADJUST
|
||||
enum layer_names {
|
||||
_QWERTY,
|
||||
_FN
|
||||
};
|
||||
|
||||
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] = {
|
||||
/* Qwerty gui/alt/space/alt/gui
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* |LGUI | LAlt | Space | RAlt |RGUI |
|
||||
* `-----------------------------------------------------------------'
|
||||
*/
|
||||
[_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_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_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_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI \
|
||||
),
|
||||
/* Qwerty gui/alt/space/alt/gui
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* |LGUI | LAlt | Space | RAlt |RGUI |
|
||||
* `-----------------------------------------------------------------'
|
||||
*/
|
||||
[_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_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_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
|
||||
),
|
||||
|
||||
/* FN Layer
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | CAPS | | | | | | | | Psc | Slck| Paus| Up | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | Prev| Play| Next| | | + | - | End |PgDn| Down| | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | Stop | |
|
||||
* `-----------------------------------------------------------------'
|
||||
*/
|
||||
[_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_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_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, \
|
||||
______, ______, ______, KC_MSTP, ______ \
|
||||
)
|
||||
/* FN Layer
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | CAPS | | | | | | | | Psc | Slck| Paus| Up | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | Prev| Play| Next| | | + | - | End |PgDn| Down| | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | Stop | |
|
||||
* `-----------------------------------------------------------------'
|
||||
*/
|
||||
[_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_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_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______,
|
||||
_______, _______, _______, KC_MSTP, _______
|
||||
)
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case FN:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_FN);
|
||||
dk60_esc_led_on();
|
||||
} else {
|
||||
layer_off(_FN);
|
||||
dk60_esc_led_off();
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
switch (keycode) {
|
||||
case MO(_FN):
|
||||
if (record->event.pressed) {
|
||||
dk60_esc_led_on();
|
||||
} else {
|
||||
dk60_esc_led_off();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
DK60
|
||||
===
|
||||
# DK60
|
||||
|
||||
![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)
|
||||
Hardware Supported: DK60 PCB revA
|
||||
* Keyboard Maintainer: [Damien Broqua aka DarKou](https://github.com/Dbroqua)
|
||||
* Hardware Supported: DK60 PCB revA
|
||||
* Hardware Availability: https://github.com/Dbroqua/DK60/
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
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).
|
||||
|
|
|
@ -2,26 +2,23 @@
|
|||
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
|
||||
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||
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
|
||||
KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key
|
||||
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 = yes # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
SLEEP_LED_ENABLE = yes
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = full # 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 = yes # 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
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
KEYBOARD_LOCK_ENABLE = yes
|
||||
UNICODE_ENABLE = yes
|
||||
|
|
Loading…
Reference in a new issue