forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
YD60MQ refactor and Configurator layout support (qmk#8313)
* refactor yd60mq.h - four-space indent - use K<row><col> base32hex notation - rename LAYOUT to LAYOUT_all (with alias for backwards compatibility) * refactor yd60mq.c to use led_update_kb() * align rules.mk to AVR template * refactor default keymap Also correct positions for KC_NUHS and KC_NUBS. * update readme * add Configurator layout support * initialize the Caps Lock LED pin properly
- Loading branch information
Showing
6 changed files
with
148 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{ | ||
"keyboard_name": "YD60MQ", | ||
"url": "", | ||
"maintainer": "qmk", | ||
"width": 15, | ||
"height": 5, | ||
"layouts": { | ||
"LAYOUT_all": { | ||
"key_count": 69, | ||
"layout": [ | ||
{"label":"Esc", "x":0, "y":0}, | ||
{"label":"1", "x":1, "y":0}, | ||
{"label":"2", "x":2, "y":0}, | ||
{"label":"3", "x":3, "y":0}, | ||
{"label":"4", "x":4, "y":0}, | ||
{"label":"5", "x":5, "y":0}, | ||
{"label":"6", "x":6, "y":0}, | ||
{"label":"7", "x":7, "y":0}, | ||
{"label":"8", "x":8, "y":0}, | ||
{"label":"9", "x":9, "y":0}, | ||
{"label":"0", "x":10, "y":0}, | ||
{"label":"-", "x":11, "y":0}, | ||
{"label":"=", "x":12, "y":0}, | ||
{"label":"\\", "x":13, "y":0}, | ||
{"label":"`", "x":14, "y":0}, | ||
{"label":"Tab", "x":0, "y":1, "w":1.5}, | ||
{"label":"Q", "x":1.5, "y":1}, | ||
{"label":"W", "x":2.5, "y":1}, | ||
{"label":"E", "x":3.5, "y":1}, | ||
{"label":"R", "x":4.5, "y":1}, | ||
{"label":"T", "x":5.5, "y":1}, | ||
{"label":"Y", "x":6.5, "y":1}, | ||
{"label":"U", "x":7.5, "y":1}, | ||
{"label":"I", "x":8.5, "y":1}, | ||
{"label":"O", "x":9.5, "y":1}, | ||
{"label":"P", "x":10.5, "y":1}, | ||
{"label":"[", "x":11.5, "y":1}, | ||
{"label":"]", "x":12.5, "y":1}, | ||
{"label":"\\", "x":13.5, "y":1, "w":1.5}, | ||
{"label":"Caps", "x":0, "y":2, "w":1.75}, | ||
{"label":"A", "x":1.75, "y":2}, | ||
{"label":"S", "x":2.75, "y":2}, | ||
{"label":"D", "x":3.75, "y":2}, | ||
{"label":"F", "x":4.75, "y":2}, | ||
{"label":"G", "x":5.75, "y":2}, | ||
{"label":"H", "x":6.75, "y":2}, | ||
{"label":"J", "x":7.75, "y":2}, | ||
{"label":"K", "x":8.75, "y":2}, | ||
{"label":"L", "x":9.75, "y":2}, | ||
{"label":";", "x":10.75, "y":2}, | ||
{"label":"\"", "x":11.75, "y":2}, | ||
{"label":"ISO Hash", "x":12.75, "y":2}, | ||
{"label":"Enter", "x":13.75, "y":2, "w":1.25}, | ||
{"label":"Shift", "x":0, "y":3}, | ||
{"label":"ISO \\", "x":1, "y":3}, | ||
{"label":"Z", "x":2, "y":3}, | ||
{"label":"X", "x":3, "y":3}, | ||
{"label":"C", "x":4, "y":3}, | ||
{"label":"V", "x":5, "y":3}, | ||
{"label":"B", "x":6, "y":3}, | ||
{"label":"N", "x":7, "y":3}, | ||
{"label":"M", "x":8, "y":3}, | ||
{"label":",", "x":9, "y":3}, | ||
{"label":".", "x":10, "y":3}, | ||
{"label":"/", "x":11, "y":3}, | ||
{"label":"Shift", "x":12, "y":3}, | ||
{"label":"Up", "x":13, "y":3}, | ||
{"label":"Del", "x":14, "y":3}, | ||
{"label":"Ctrl", "x":0, "y":4, "w":1.25}, | ||
{"label":"GUI", "x":1.25, "y":4, "w":1.25}, | ||
{"label":"Alt", "x":2.5, "y":4, "w":1.25}, | ||
{"label":"MO(1)", "x":3.75, "y":4, "w":2.25}, | ||
{"label":"Space", "x":6, "y":4, "w":1.25}, | ||
{"label":"MO(1)", "x":7.25, "y":4, "w":2.75}, | ||
{"label":"Alt", "x":10, "y":4}, | ||
{"label":"Ctrl", "x":11, "y":4}, | ||
{"label":"Left", "x":12, "y":4}, | ||
{"label":"Down", "x":13, "y":4}, | ||
{"label":"Right", "x":14, "y":4} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
YD60MQ | ||
====== | ||
# YD60MQ | ||
|
||
![YD60MQ PCB](https://ae01.alicdn.com/kf/HTB1PVQ2X_HuK1RkSndVq6xVwpXaO.jpg) | ||
|
||
Customizable 60% PCB by [YMDK](https://ymdk.aliexpress.com/store/429151?spm=2114.10010108.0.0.3ab23641lIkgzm). | ||
|
||
Keyboard Maintainer: QMK Community | ||
Hardware Supported: YD60MQ | ||
Hardware Availability: YMDK - [AliExpress](https://www.aliexpress.com/item/YMDK-60-YD60MQ-QMK-Programmable-Underglow-RGB-Led-PCB-Plate-Stabilizers-For-DIY-Mechanical-Keyboard-Interchange/32869207240.html) | ||
* Keyboard Maintainer: QMK Community | ||
* Hardware Supported: YD60MQ PCB, ATmega32U4 | ||
* Hardware Availability: [YMDK on AliExpress](https://www.aliexpress.com/i/32869207240.html) | ||
|
||
Make example for this keyboard (after setting up your build environment): | ||
|
||
make yd60mq:default | ||
|
||
The keyboard uses a DFU bootloader. To make a keymap and use dfu-util to flash it: | ||
The keyboard uses a DFU bootloader. To make a keymap and use dfu to flash it: | ||
|
||
make yd60mq:default:dfu | ||
make yd60mq:default:flash | ||
|
||
See the [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. | ||
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
#include "yd60mq.h" | ||
|
||
void led_set_kb(uint8_t usb_led) { | ||
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
setPinOutput(F4); | ||
writePinLow(F4); | ||
} else { | ||
setPinInput(F4); | ||
} | ||
void matrix_init_kb(void){ | ||
setPinOutput(F4); | ||
writePinHigh(F4); | ||
} | ||
|
||
led_set_user(usb_led); | ||
bool led_update_kb(led_t led_state) { | ||
bool res = led_update_user(led_state); | ||
if (res) { | ||
// writePin sets the pin high for 1 and low for 0. | ||
// In this example the pins are inverted, setting | ||
// it low/0 turns it on, and high/1 turns the LED off. | ||
// This behavior depends on whether the LED is between the pin | ||
// and VCC or the pin and GND. | ||
writePin(F4, !led_state.caps_lock); | ||
} | ||
return res; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters