forked from Github/qmk_firmware
Compare commits
127 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b4bda14f3c | ||
![]() |
f42dd61b8d | ||
![]() |
b2405fccce | ||
![]() |
3415dcef6f | ||
![]() |
7048b94034 | ||
![]() |
3c190f8927 | ||
![]() |
1ac99586a6 | ||
![]() |
cfb4c9bb61 | ||
![]() |
78ffc4f7fe | ||
![]() |
1646717b4b | ||
![]() |
67054fc380 | ||
![]() |
4ebecc424e | ||
![]() |
a860da8914 | ||
![]() |
98c8a30764 | ||
![]() |
ae40fc498b | ||
![]() |
0082ecf1f3 | ||
![]() |
7cddcce237 | ||
![]() |
adb72b60b0 | ||
![]() |
bc2157eea8 | ||
![]() |
f3bf301825 | ||
![]() |
85f4c3ebb4 | ||
![]() |
853b99954e | ||
![]() |
74dc65ab2e | ||
![]() |
3eb82e0470 | ||
![]() |
ad7ba08ac8 | ||
![]() |
876e544433 | ||
![]() |
b54722cc63 | ||
![]() |
94e2a39d72 | ||
![]() |
f6b9604f4a | ||
![]() |
0374677814 | ||
![]() |
3d54b1adf0 | ||
![]() |
d4c23d881f | ||
![]() |
1f26101f0e | ||
![]() |
80c2e26741 | ||
![]() |
707d449ba0 | ||
![]() |
ba13127c04 | ||
![]() |
20d3a979f1 | ||
![]() |
2d1c985ff4 | ||
![]() |
e4818cf732 | ||
![]() |
a1b53b45ca | ||
![]() |
09c7304bd9 | ||
![]() |
58b2c72d53 | ||
![]() |
627d6c154c | ||
![]() |
4fbb53e817 | ||
![]() |
ab78386e02 | ||
![]() |
f5638e54f5 | ||
![]() |
77efa1c620 | ||
![]() |
a037cedfdc | ||
![]() |
df78593b1b | ||
![]() |
45e71aedf0 | ||
![]() |
bbad6e1ae7 | ||
![]() |
efb21c00ce | ||
![]() |
071eb2478f | ||
![]() |
770a4ee729 | ||
![]() |
ccda62616d | ||
![]() |
698d0dbda8 | ||
![]() |
1af31a0523 | ||
![]() |
a8153774b5 | ||
![]() |
10e8ed7430 | ||
![]() |
cde56a7eee | ||
![]() |
8551ab3daf | ||
![]() |
b0bee465aa | ||
![]() |
7085066f08 | ||
![]() |
e4dd9e1393 | ||
![]() |
9c6a7522d7 | ||
![]() |
01653a5f96 | ||
![]() |
5acb7e3707 | ||
![]() |
6c834dea7b | ||
![]() |
b3c7864990 | ||
![]() |
8984f24f7c | ||
![]() |
294caf1ff1 | ||
![]() |
033c7af292 | ||
![]() |
15e5f57952 | ||
![]() |
4b11c2b552 | ||
![]() |
201c5bfa5c | ||
![]() |
34f302e1a5 | ||
![]() |
722c196b08 | ||
![]() |
c6ebb59a8b | ||
![]() |
4808b930db | ||
![]() |
c74295de88 | ||
![]() |
a7209533a3 | ||
![]() |
3d78e6078e | ||
![]() |
e676278474 | ||
![]() |
730a736ef0 | ||
![]() |
a8320f20f7 | ||
![]() |
f275ffbdfc | ||
![]() |
36a6e269bf | ||
![]() |
e8efc46e74 | ||
![]() |
1b08a19e3e | ||
![]() |
419128bfa1 | ||
![]() |
2d256f48d0 | ||
![]() |
380e05ad6e | ||
![]() |
de4eb79c6a | ||
![]() |
be47f91bc4 | ||
![]() |
8030c17d63 | ||
![]() |
9c8e66dc05 | ||
![]() |
3ad389de55 | ||
![]() |
66040506a7 | ||
![]() |
d598f01cb7 | ||
![]() |
1718dfa658 | ||
![]() |
1c8208ad9a | ||
![]() |
583be4a5f3 | ||
![]() |
24507ddca8 | ||
![]() |
3152bf572b | ||
![]() |
96d4ba84c2 | ||
![]() |
680924777b | ||
![]() |
75c8a79d0e | ||
![]() |
da1a527c90 | ||
![]() |
bf962821b3 | ||
![]() |
ce5678b819 | ||
![]() |
d9cf6c6730 | ||
![]() |
b386ccc786 | ||
![]() |
0ed492978a | ||
![]() |
a2c6257942 | ||
![]() |
a14c9a057a | ||
![]() |
c9838fea12 | ||
![]() |
dfe18b40aa | ||
![]() |
f099142004 | ||
![]() |
d98ed28e7c | ||
![]() |
beb9f3ab71 | ||
![]() |
77c04d148e | ||
![]() |
90c74701aa | ||
![]() |
ede67df6bd | ||
![]() |
27bf464dc3 | ||
![]() |
fb02593bd4 | ||
![]() |
c0dbd81b2b | ||
![]() |
25d1901d7a |
5
bin/qmk
5
bin/qmk
@@ -25,6 +25,11 @@ with open(os.path.join(qmk_dir, 'requirements.txt'), 'r') as fd:
|
||||
line = line.split('#')[0]
|
||||
|
||||
module = line.split('=')[0] if '=' in line else line
|
||||
|
||||
if module in ['pep8-naming']:
|
||||
# Not every module is importable by its own name.
|
||||
continue
|
||||
|
||||
if not find_spec(module):
|
||||
print('Could not find module %s!' % module)
|
||||
print('Please run `pip3 install -r requirements.txt` to install the python dependencies.')
|
||||
|
@@ -22,5 +22,5 @@ else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","")
|
||||
endif
|
||||
|
||||
# Generate the keymap.c
|
||||
$(KEYBOARD_OUTPUT)/src/keymap.c:
|
||||
$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
|
||||
bin/qmk json-keymap --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
|
||||
|
@@ -109,6 +109,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/rgblight.c
|
||||
CIE1931_CURVE = yes
|
||||
LED_BREATHING_TABLE = yes
|
||||
RGB_KEYCODES_ENABLE = yes
|
||||
ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
|
||||
else
|
||||
@@ -147,6 +148,7 @@ endif
|
||||
SRC += $(QUANTUM_DIR)/rgb_matrix.c
|
||||
SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c
|
||||
CIE1931_CURVE = yes
|
||||
RGB_KEYCODES_ENABLE = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
|
||||
@@ -187,6 +189,10 @@ ifeq ($(strip $(RGB_MATRIX_CUSTOM_USER)), yes)
|
||||
OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
|
||||
OPT_DEFS += -DTAP_DANCE_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
|
||||
@@ -231,15 +237,16 @@ endif
|
||||
|
||||
# backward compat
|
||||
ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes)
|
||||
BACKLIGHT_ENABLE = custom
|
||||
BACKLIGHT_DRIVER = custom
|
||||
endif
|
||||
|
||||
VALID_BACKLIGHT_TYPES := yes software custom
|
||||
VALID_BACKLIGHT_TYPES := pwm software custom
|
||||
|
||||
BACKLIGHT_ENABLE ?= no
|
||||
ifneq ($(strip $(BACKLIGHT_ENABLE)), no)
|
||||
ifeq ($(filter $(BACKLIGHT_ENABLE),$(VALID_BACKLIGHT_TYPES)),)
|
||||
$(error BACKLIGHT_ENABLE="$(BACKLIGHT_ENABLE)" is not a valid backlight type)
|
||||
BACKLIGHT_DRIVER ?= pwm
|
||||
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
|
||||
ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),)
|
||||
$(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
||||
@@ -250,10 +257,10 @@ ifneq ($(strip $(BACKLIGHT_ENABLE)), no)
|
||||
SRC += $(QUANTUM_DIR)/backlight/backlight.c
|
||||
OPT_DEFS += -DBACKLIGHT_ENABLE
|
||||
|
||||
ifeq ($(strip $(BACKLIGHT_ENABLE)), software)
|
||||
ifeq ($(strip $(BACKLIGHT_DRIVER)), software)
|
||||
SRC += $(QUANTUM_DIR)/backlight/backlight_soft.c
|
||||
else
|
||||
ifeq ($(strip $(BACKLIGHT_ENABLE)), custom)
|
||||
ifeq ($(strip $(BACKLIGHT_DRIVER)), custom)
|
||||
OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER
|
||||
endif
|
||||
|
||||
@@ -407,12 +414,18 @@ ifeq ($(strip $(SPACE_CADET_ENABLE)), yes)
|
||||
OPT_DEFS += -DSPACE_CADET_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/dip_switch.c
|
||||
OPT_DEFS += -DDIP_SWITCH_ENABLE
|
||||
MAGIC_ENABLE ?= yes
|
||||
ifeq ($(strip $(MAGIC_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_magic.c
|
||||
OPT_DEFS += -DMAGIC_KEYCODE_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(DYNAMIC_MACRO_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_dynamic_macro.c
|
||||
OPT_DEFS += -DDYNAMIC_MACRO_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/dip_switch.c
|
||||
OPT_DEFS += -DDIP_SWITCH_ENABLE
|
||||
endif
|
||||
|
@@ -4,5 +4,6 @@
|
||||
- [:es: Español](/es/)
|
||||
- [:fr: Français](/fr-fr/)
|
||||
- [:he: עברית](/he-il/)
|
||||
- [:brazil: Português](/pt-br/)
|
||||
- [:ru: Русский](/ru-ru/)
|
||||
- [:jp: 日本語](/ja/)
|
||||
|
@@ -3,7 +3,10 @@
|
||||
* [Building Your First Firmware](newbs_building_firmware.md)
|
||||
* [Flashing Firmware](newbs_flashing.md)
|
||||
* [Testing and Debugging](newbs_testing_debugging.md)
|
||||
* [Git Best Practices](newbs_best_practices.md)
|
||||
* [Best Git Practices](newbs_git_best_practices.md)
|
||||
* [Using Your Fork's Master](newbs_git_using_your_master_branch.md)
|
||||
* [Resolving Merge Conflicts](newbs_git_resolving_merge_conflicts.md)
|
||||
* [Resynchronizing a Branch](newbs_git_resynchronize_a_branch.md)
|
||||
* [Learning Resources](newbs_learn_more_resources.md)
|
||||
|
||||
* [QMK Basics](README.md)
|
||||
@@ -98,6 +101,7 @@
|
||||
* [Hand Wiring Guide](hand_wire.md)
|
||||
* [ISP Flashing Guide](isp_flashing_guide.md)
|
||||
* [ARM Debugging Guide](arm_debugging.md)
|
||||
* [ADC Driver](adc_driver.md)
|
||||
* [I2C Driver](i2c_driver.md)
|
||||
* [WS2812 Driver](ws2812_driver.md)
|
||||
* [GPIO Controls](internals_gpio_control.md)
|
||||
|
50
docs/adc_driver.md
Normal file
50
docs/adc_driver.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# ADC Driver
|
||||
|
||||
QMK can leverage the Analog-to-Digital Converter (ADC) on supported MCUs to measure voltages on certain pins. This can be useful for implementing things such as battery level indicators for Bluetooth keyboards, or volume controls using a potentiometer, as opposed to a [rotary encoder](feature_encoders.md).
|
||||
|
||||
This driver is currently AVR-only. The values returned are 10-bit integers (0-1023) mapped between 0V and VCC (usually 5V or 3.3V).
|
||||
|
||||
## Usage
|
||||
|
||||
To use this driver, add the following to your `rules.mk`:
|
||||
|
||||
```make
|
||||
SRC += analog.c
|
||||
```
|
||||
|
||||
Then place this include at the top of your code:
|
||||
|
||||
```c
|
||||
#include "analog.h"
|
||||
```
|
||||
|
||||
## Channels
|
||||
|
||||
|Channel|AT90USB64/128|ATmega16/32U4|ATmega32A|ATmega328P|
|
||||
|-------|-------------|-------------|---------|----------|
|
||||
|0 |`F0` |`F0` |`A0` |`C0` |
|
||||
|1 |`F1` |`F1` |`A1` |`C1` |
|
||||
|2 |`F2` | |`A2` |`C2` |
|
||||
|3 |`F3` | |`A3` |`C3` |
|
||||
|4 |`F4` |`F4` |`A4` |`C4` |
|
||||
|5 |`F5` |`F5` |`A5` |`C5` |
|
||||
|6 |`F6` |`F6` |`A6` |* |
|
||||
|7 |`F7` |`F7` |`A7` |* |
|
||||
|8 | |`D4` | | |
|
||||
|9 | |`D6` | | |
|
||||
|10 | |`D7` | | |
|
||||
|11 | |`B4` | | |
|
||||
|12 | |`B5` | | |
|
||||
|13 | |`B6` | | |
|
||||
|
||||
<sup>\* The ATmega328P possesses two extra ADC channels; however, they are not present on the DIP pinout, and are not shared with GPIO pins. You can use `adc_read()` directly to gain access to these.</sup>
|
||||
|
||||
## Functions
|
||||
|
||||
|Function |Description |
|
||||
|----------------------------|-------------------------------------------------------------------------------------------------------------------|
|
||||
|`analogReference(mode)` |Sets the analog voltage reference source. Must be one of `ADC_REF_EXTERNAL`, `ADC_REF_POWER` or `ADC_REF_INTERNAL`.|
|
||||
|`analogRead(pin)` |Reads the value from the specified Arduino pin, eg. `4` for ADC6 on the ATmega32U4. |
|
||||
|`analogReadPin(pin)` |Reads the value from the specified QMK pin, eg. `F6` for ADC6 on the ATmega32U4. |
|
||||
|`pinToMux(pin)` |Translates a given QMK pin to a mux value. If an unsupported pin is given, returns the mux value for "0V (GND)". |
|
||||
|`adc_read(mux)` |Reads the value from the ADC according to the specified mux. See your MCU's datasheet for more information. |
|
@@ -14,7 +14,7 @@ Most of our style is pretty easy to pick up on, but right now it's not entirely
|
||||
* Think of them as a story describing the feature
|
||||
* Use them liberally to explain why particular decisions were made.
|
||||
* Do not write obvious comments
|
||||
* If you not sure if a comment is obvious, go ahead and include it.
|
||||
* If you're not sure if a comment is obvious, go ahead and include it.
|
||||
* In general we don't wrap lines, they can be as long as needed. If you do choose to wrap lines please do not wrap any wider than 76 columns.
|
||||
* We use `#pragma once` at the start of header files rather than old-style include guards (`#ifndef THIS_FILE_H`, `#define THIS_FILE_H`, ..., `#endif`)
|
||||
* We accept both forms of preprocessor if's: `#ifdef DEFINED` and `#if defined(DEFINED)`
|
||||
|
@@ -8,7 +8,7 @@ Most of our style follows PEP8 with some local modifications to make things less
|
||||
* Think of them as a story describing the feature
|
||||
* Use them liberally to explain why particular decisions were made.
|
||||
* Do not write obvious comments
|
||||
* If you not sure if a comment is obvious, go ahead and include it.
|
||||
* If you're not sure if a comment is obvious, go ahead and include it.
|
||||
* We require useful docstrings for all functions.
|
||||
* In general we don't wrap lines, they can be as long as needed. If you do choose to wrap lines please do not wrap any wider than 76 columns.
|
||||
* Some of our practices conflict with the wider python community to make our codebase more approachable to non-pythonistas.
|
||||
|
@@ -85,7 +85,7 @@ Limited experimentation on the devices I have available shows that 7 is high eno
|
||||
|
||||
Documentation is one of the easiest ways to get started contributing to QMK. Finding places where the documentation is wrong or incomplete and fixing those is easy! We also very badly need someone to edit our documentation, so if you have editing skills but aren't sure where or how to jump in please [reach out for help](#where-can-i-go-for-help)!
|
||||
|
||||
You'll find all our documentation in the `qmk_firmware/docs` directory, or if you'd rather use a web based workflow you can click "Suggest An Edit" at the top of each page on http://docs.qmk.fm/.
|
||||
You'll find all our documentation in the `qmk_firmware/docs` directory, or if you'd rather use a web based workflow you can click the "Edit this page" link at the bottom of each page on https://docs.qmk.fm/.
|
||||
|
||||
When providing code examples in your documentation, try to observe naming conventions used elsewhere in the docs. For example, standardizing enums as `my_layers` or `my_keycodes` for consistency:
|
||||
|
||||
|
@@ -87,10 +87,6 @@ Re-running the QMK installation script (`./util/qmk_install.sh` from the `qmk_fi
|
||||
|
||||
If that doesn't work, then you may need to download and run Zadig. See [Bootloader Driver Installation with Zadig](driver_installation_zadig.md) for more detailed information.
|
||||
|
||||
## WINAVR is Obsolete
|
||||
It is no longer recommended and may cause some problem.
|
||||
See [TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99).
|
||||
|
||||
## USB VID and PID
|
||||
You can use any ID you want with editing `config.h`. Using any presumably unused ID will be no problem in fact except for very low chance of collision with other product.
|
||||
|
||||
@@ -103,29 +99,6 @@ You can buy a really unique VID:PID here. I don't think you need this for person
|
||||
- http://www.obdev.at/products/vusb/license.html
|
||||
- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1
|
||||
|
||||
## Cortex: `cstddef: No such file or directory`
|
||||
GCC 4.8 of Ubuntu 14.04 had this problem and had to update to 4.9 with this PPA.
|
||||
https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded
|
||||
|
||||
https://github.com/tmk/tmk_keyboard/issues/212
|
||||
https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstddef
|
||||
https://developer.mbed.org/forum/mbed/topic/5205/
|
||||
|
||||
## `clock_prescale_set` and `clock_div_1` Not Available
|
||||
Your toolchain is too old to support the MCU. For example WinAVR 20100110 doesn't support ATMega32u2.
|
||||
|
||||
```
|
||||
Compiling C: ../../tmk_core/protocol/lufa/lufa.c
|
||||
avr-gcc -c -mmcu=atmega32u2 -gdwarf-2 -DF_CPU=16000000UL -DINTERRUPT_CONTROL_ENDPOINT -DBOOTLOADER_SIZE=4096 -DF_USB=16000000UL -DARCH=ARCH_AVR8 -DUSB_DEVICE_ONLY -DUSE_FLASH_DESCRIPTORS -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -DFIXED_CONTROL_ENDPOINT_SIZE=8 -DFIXED_NUM_CONFIGURATIONS=1 -DPROTOCOL_LUFA -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DVERSION=unknown -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=obj_alps64/protocol/lufa/lufa.lst -I. -I../../tmk_core -I../../tmk_core/protocol/lufa -I../../tmk_core/protocol/lufa/LUFA-git -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_alps64_protocol_lufa_lufa.o.d ../../tmk_core/protocol/lufa/lufa.c -o obj_alps64/protocol/lufa/lufa.o
|
||||
../../tmk_core/protocol/lufa/lufa.c: In function 'setup_mcu':
|
||||
../../tmk_core/protocol/lufa/lufa.c:575: warning: implicit declaration of function 'clock_prescale_set'
|
||||
../../tmk_core/protocol/lufa/lufa.c:575: error: 'clock_div_1' undeclared (first use in this function)
|
||||
../../tmk_core/protocol/lufa/lufa.c:575: error: (Each undeclared identifier is reported only once
|
||||
../../tmk_core/protocol/lufa/lufa.c:575: error: for each function it appears in.)
|
||||
make: *** [obj_alps64/protocol/lufa/lufa.o] Error 1
|
||||
```
|
||||
|
||||
|
||||
## BOOTLOADER_SIZE for AVR
|
||||
Note that Teensy2.0++ bootloader size is 2048byte. Some Makefiles may have wrong comment.
|
||||
|
||||
|
@@ -112,56 +112,6 @@ In C `1` means one of [int] type which is [16 bit] in case of AVR so you can't s
|
||||
|
||||
http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
|
||||
|
||||
|
||||
## Bootloader Jump Doesn't Work
|
||||
Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**.
|
||||
```
|
||||
# Size of Bootloaders in bytes:
|
||||
# Atmel DFU loader(ATmega32U4) 4096
|
||||
# Atmel DFU loader(AT90USB128) 8192
|
||||
# LUFA bootloader(ATmega32U4) 4096
|
||||
# Arduino Caterina(ATmega32U4) 4096
|
||||
# USBaspLoader(ATmega***) 2048
|
||||
# Teensy halfKay(ATmega32U4) 512
|
||||
# Teensy++ halfKay(AT90USB128) 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
```
|
||||
AVR Boot section size are defined by setting **BOOTSZ** fuse in fact. Consult with your MCU datasheet.
|
||||
Note that **Word**(2 bytes) size and address are used in datasheet while TMK uses **Byte**.
|
||||
|
||||
AVR Boot section is located at end of Flash memory like the followings.
|
||||
```
|
||||
byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286)
|
||||
0x0000 +---------------+ 0x00000 +---------------+
|
||||
| | | |
|
||||
| | | |
|
||||
| Application | | Application |
|
||||
| | | |
|
||||
= = = =
|
||||
| | 32KB-4KB | | 128KB-8KB
|
||||
0x6000 +---------------+ 0x1E000 +---------------+
|
||||
| Bootloader | 4KB | Bootloader | 8KB
|
||||
0x7FFF +---------------+ 0x1FFFF +---------------+
|
||||
|
||||
|
||||
byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286)
|
||||
0x0000 +---------------+ 0x00000 +---------------+
|
||||
| | | |
|
||||
| | | |
|
||||
| Application | | Application |
|
||||
| | | |
|
||||
= = = =
|
||||
| | 32KB-512B | | 128KB-2KB
|
||||
0x7E00 +---------------+ 0x1FC00 +---------------+
|
||||
| Bootloader | 512B | Bootloader | 2KB
|
||||
0x7FFF +---------------+ 0x1FFFF +---------------+
|
||||
```
|
||||
|
||||
And see this discussion for further reference.
|
||||
https://github.com/tmk/tmk_keyboard/issues/179
|
||||
|
||||
If you are using a TeensyUSB, there is a [known bug](https://github.com/qmk/qmk_firmware/issues/164) in which the hardware reset button prevents the RESET key from working. Unplugging the keyboard and plugging it back in should resolve the problem.
|
||||
|
||||
## Special Extra Key Doesn't Work (System, Audio Control Keys)
|
||||
You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK.
|
||||
|
||||
@@ -194,24 +144,6 @@ If you would like to keep JTAG enabled, just add the following to your `config.h
|
||||
#define NO_JTAG_DISABLE
|
||||
```
|
||||
|
||||
## Adding LED Indicators of Lock Keys
|
||||
You need your own LED indicators for CapsLock, ScrollLock and NumLock? See this post.
|
||||
|
||||
http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560
|
||||
|
||||
## Program Arduino Micro/Leonardo
|
||||
Push reset button and then run command like this within 8 seconds.
|
||||
|
||||
```
|
||||
avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:adb_usb.hex -P/dev/ttyACM0
|
||||
```
|
||||
|
||||
Device name will vary depending on your system.
|
||||
|
||||
http://arduino.cc/en/Main/ArduinoBoardMicro
|
||||
https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867
|
||||
|
||||
|
||||
## USB 3 Compatibility
|
||||
I heard some people have a problem with USB 3 port, try USB 2 port.
|
||||
|
||||
|
@@ -67,24 +67,8 @@ After enabling this feature use keycodes `KC_LCAP`, `KC_LNUM` and `KC_LSCR` in y
|
||||
Old vintage mechanical keyboards occasionally have lock switches but modern ones don't have. ***You don't need this feature in most case and just use keycodes `KC_CAPS`, `KC_NLCK` and `KC_SLCK`.***
|
||||
|
||||
## Input Special Characters Other Than ASCII like Cédille 'Ç'
|
||||
NO UNIVERSAL METHOD TO INPUT THOSE WORKS OVER ALL SYSTEMS. You have to define **MACRO** in way specific to your OS or layout.
|
||||
|
||||
See this post for example **MACRO** code.
|
||||
|
||||
http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p195620
|
||||
|
||||
On **Windows** you can use `AltGr` key or **Alt code**.
|
||||
* http://en.wikipedia.org/wiki/AltGr_key
|
||||
* http://en.wikipedia.org/wiki/Alt_code
|
||||
|
||||
On **Mac** OS defines `Option` key combinations.
|
||||
* http://en.wikipedia.org/wiki/Option_key#Alternative_keyboard_input
|
||||
|
||||
On **Xorg** you can use `compose` key, instead.
|
||||
* http://en.wikipedia.org/wiki/Compose_key
|
||||
|
||||
And see this for **Unicode** input.
|
||||
* http://en.wikipedia.org/wiki/Unicode_input
|
||||
See the [Unicode](feature_unicode.md) feature.
|
||||
|
||||
## `Fn` Key on macOS
|
||||
|
||||
@@ -130,51 +114,6 @@ https://github.com/tekezo/Karabiner/issues/403
|
||||
|
||||
See the [Grave Escape](feature_grave_esc.md) feature.
|
||||
|
||||
## Arrow on Right Modifier Keys with Dual-Role
|
||||
This turns right modifier keys into arrow keys when the keys are tapped while still modifiers when the keys are hold. In TMK the dual-role function is dubbed **TAP**.
|
||||
```
|
||||
|
||||
#include "keymap_common.h"
|
||||
|
||||
|
||||
/* Arrow keys on right modifier keys with TMK dual role feature
|
||||
*
|
||||
* https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#213-modifier-with-tap-keydual-role
|
||||
* https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys
|
||||
*/
|
||||
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* 0: qwerty */
|
||||
[0] = LAYOUT( \
|
||||
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS,BSPC, \
|
||||
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \
|
||||
LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \
|
||||
LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,FN0, ESC, \
|
||||
FN4, LGUI,LALT, SPC, APP, FN2, FN1, FN3),
|
||||
[1] = LAYOUT( \
|
||||
GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS, \
|
||||
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\
|
||||
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
|
||||
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN5, TRNS, \
|
||||
TRNS,TRNS,TRNS, TRNS, TRNS,FN7, FN6, FN8),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_UP),
|
||||
[1] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_DOWN),
|
||||
[2] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_LEFT),
|
||||
[3] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RIGHT),
|
||||
[4] = ACTION_LAYER_MOMENTARY(1),
|
||||
[5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_PGUP),
|
||||
[6] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_PGDN),
|
||||
[7] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_HOME),
|
||||
[8] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_END),
|
||||
};
|
||||
|
||||
```
|
||||
|
||||
Dual-role key: https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys
|
||||
|
||||
|
||||
## Eject on Mac OSX
|
||||
`KC_EJCT` keycode works on OSX. https://github.com/tmk/tmk_keyboard/issues/250
|
||||
It seems Windows 10 ignores the code and Linux/Xorg recognizes but has no mapping by default.
|
||||
|
@@ -155,7 +155,7 @@ You can control the behavior of one shot keys by defining these in `config.h`:
|
||||
|
||||
Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine.
|
||||
|
||||
For one shot layers, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `set_oneshot_layer(ONESHOT_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`.
|
||||
For one shot layers, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`.
|
||||
|
||||
For one shot mods, you need to call `set_oneshot_mods(MOD)` to set it, or `clear_oneshot_mods()` to cancel it.
|
||||
|
||||
|
@@ -6,16 +6,14 @@ QMK is able to control the brightness of these LEDs by switching them on and off
|
||||
|
||||
The MCU can only supply so much current to its GPIO pins. Instead of powering the backlight directly from the MCU, the backlight pin is connected to a transistor or MOSFET that switches the power to the LEDs.
|
||||
|
||||
## Driver configuration
|
||||
## Feature Configuration
|
||||
|
||||
Most keyboards have backlighting enabled by default if they support it, but if it is not working for you, check that your `rules.mk` includes the following:
|
||||
|
||||
```makefile
|
||||
BACKLIGHT_ENABLE = software # Valid driver values are 'yes,software,no'
|
||||
BACKLIGHT_ENABLE = yes
|
||||
```
|
||||
|
||||
See below for help on individual drivers.
|
||||
|
||||
## Keycodes
|
||||
Once enabled the following keycodes below can be used to change the backlight level.
|
||||
|
||||
@@ -51,6 +49,16 @@ Once enabled the following keycodes below can be used to change the backlight le
|
||||
|`breathing_enable()` |Turns on backlight breathing |
|
||||
|`breathing_disable()` |Turns off backlight breathing |
|
||||
|
||||
## Driver Configuration
|
||||
|
||||
To select which driver to use, configure your `rules.mk` with the following:
|
||||
|
||||
```makefile
|
||||
BACKLIGHT_DRIVER = software # Valid driver values are 'pwm,software,no'
|
||||
```
|
||||
|
||||
See below for help on individual drivers.
|
||||
|
||||
## Common Driver Configuration
|
||||
|
||||
To change the behavior of the backlighting, `#define` these in your `config.h`:
|
||||
@@ -72,9 +80,9 @@ This functionality is configured at the keyboard level with the `BACKLIGHT_ON_ST
|
||||
|
||||
## AVR driver
|
||||
|
||||
On AVR boards, the default driver currently sniffs the configuration to pick the best scenario. To enable it, add this to your rules.mk:
|
||||
On AVR boards, the default driver currently sniffs the configuration to pick the best scenario. The driver is configured by default, however the equivalent setting within rules.mk would be:
|
||||
```makefile
|
||||
BACKLIGHT_ENABLE = yes
|
||||
BACKLIGHT_DRIVER = pwm
|
||||
```
|
||||
|
||||
### Caveats
|
||||
@@ -150,9 +158,9 @@ The breathing effect is the same as in the hardware PWM implementation.
|
||||
|
||||
## ARM Driver
|
||||
|
||||
While still in its early stages, ARM backlight support aims to eventually have feature parity with AVR. To enable it, add this to your rules.mk:
|
||||
While still in its early stages, ARM backlight support aims to eventually have feature parity with AVR. The driver is configured by default, however the equivalent setting within rules.mk would be:
|
||||
```makefile
|
||||
BACKLIGHT_ENABLE = yes
|
||||
BACKLIGHT_DRIVER = pwm
|
||||
```
|
||||
|
||||
### Caveats
|
||||
@@ -176,7 +184,7 @@ To change the behavior of the backlighting, `#define` these in your `config.h`:
|
||||
|
||||
Emulation of PWM while running other keyboard tasks, it offers maximum hardware compatibility without extra platform configuration. The tradeoff is the backlight might jitter when the keyboard is busy. To enable, add this to your rules.mk:
|
||||
```makefile
|
||||
BACKLIGHT_ENABLE = software
|
||||
BACKLIGHT_DRIVER = software
|
||||
```
|
||||
|
||||
### Software PWM Configuration
|
||||
@@ -200,3 +208,29 @@ To activate multiple backlight pins, you need to add something like this to your
|
||||
#undef BACKLIGHT_PIN
|
||||
#define BACKLIGHT_PINS { F5, B2 }
|
||||
```
|
||||
|
||||
## Custom Driver
|
||||
|
||||
To enable, add this to your rules.mk:
|
||||
|
||||
```makefile
|
||||
BACKLIGHT_DRIVER = custom
|
||||
```
|
||||
|
||||
When implementing the custom driver API, the provided keyboard hooks are as follows:
|
||||
|
||||
```c
|
||||
void backlight_init_ports(void) {
|
||||
// Optional - Run on startup
|
||||
// - usually you want to configure pins here
|
||||
}
|
||||
void backlight_set(uint8_t level) {
|
||||
// Optional - Run on level change
|
||||
// - usually you want to respond to the new value
|
||||
}
|
||||
|
||||
void backlight_task(void) {
|
||||
// Optional - Run periodically
|
||||
// - long running actions here can cause performance issues
|
||||
}
|
||||
```
|
||||
|
@@ -56,37 +56,37 @@ Hold down the Bootmagic key (Space by default) and the desired hotkey while plug
|
||||
|
||||
## Keycodes
|
||||
|
||||
|Keycode |Aliases |Description |
|
||||
|----------------------------------|---------|------------------------------------------|
|
||||
|`MAGIC_CAPSLOCK_TO_CONTROL` | |Treat Caps Lock as Left Control |
|
||||
|`MAGIC_UNCAPSLOCK_TO_CONTROL` | |Stop treating Caps Lock as Left Control |
|
||||
|`MAGIC_HOST_NKRO` | |Force N-Key Rollover (NKRO) on |
|
||||
|`MAGIC_UNHOST_NKRO` | |Force NKRO off |
|
||||
|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off |
|
||||
|`MAGIC_NO_GUI` | |Disable the GUI keys (useful when gaming) |
|
||||
|`MAGIC_UNNO_GUI` | |Enable the GUI keys |
|
||||
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides (for macOS)|
|
||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI |
|
||||
|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap |
|
||||
|`MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Ctrl and GUI on both sides (for macOS)|
|
||||
|`MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Ctrl and GUI |
|
||||
|`MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Ctrl and GUI swap |
|
||||
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap `\` and Backspace |
|
||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap `\` and Backspace |
|
||||
|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Left Control and Caps Lock |
|
||||
|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` | |Unswap Left Control and Caps Lock |
|
||||
|`MAGIC_SWAP_GRAVE_ESC` | |Swap <code>`</code> and Escape |
|
||||
|`MAGIC_UNSWAP_GRAVE_ESC` | |Unswap <code>`</code> and Escape |
|
||||
|`MAGIC_SWAP_LALT_LGUI` | |Swap Left Alt and Left GUI |
|
||||
|`MAGIC_UNSWAP_LALT_LGUI` | |Unswap Left Alt and Left GUI |
|
||||
|`MAGIC_SWAP_RALT_RGUI` | |Swap Right Alt and Right GUI |
|
||||
|`MAGIC_UNSWAP_RALT_RGUI` | |Unswap Right Alt and Right GUI |
|
||||
|`MAGIC_SWAP_LCTL_LGUI` | |Swap Left Control and Left GUI |
|
||||
|`MAGIC_UNSWAP_LCTL_LGUI` | |Unswap Left Control and Left GUI |
|
||||
|`MAGIC_SWAP_RCTL_RGUI` | |Swap Right Control and Right GUI |
|
||||
|`MAGIC_UNSWAP_RCTL_RGUI` | |Unswap Right Control and Right GUI |
|
||||
|`MAGIC_EE_HANDS_LEFT` | |Set "Left Hand" for EE_HANDS handedness |
|
||||
|`MAGIC_EE_HANDS_RIGHT` | |Set "Right Hand" for EE_HANDS handedness |
|
||||
|Key |Aliases |Description |
|
||||
|----------------------------------|---------|--------------------------------------------------------------------------|
|
||||
|`MAGIC_SWAP_CONTROL_CAPSLOCK` |`CL_SWAP`|Swap Caps Lock and Left Control |
|
||||
|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` |`CL_NORM`|Unswap Caps Lock and Left Control |
|
||||
|`MAGIC_CAPSLOCK_TO_CONTROL` |`CL_CTRL`|Treat Caps Lock as Control |
|
||||
|`MAGIC_UNCAPSLOCK_TO_CONTROL` |`CL_CAPS`|Stop treating Caps Lock as Control |
|
||||
|`MAGIC_SWAP_LCTL_LGUI` |`LCG_SWP`|Swap Left Control and GUI |
|
||||
|`MAGIC_UNSWAP_LCTL_LGUI` |`LCG_NRM`|Unswap Left Control and GUI |
|
||||
|`MAGIC_SWAP_RCTL_RGUI` |`RCG_SWP`|Swap Right Control and GUI |
|
||||
|`MAGIC_UNSWAP_RCTL_RGUI` |`RCG_NRM`|Unswap Right Control and GUI |
|
||||
|`MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Control and GUI on both sides |
|
||||
|`MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Control and GUI on both sides |
|
||||
|`MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Control and GUI swap on both sides |
|
||||
|`MAGIC_SWAP_LALT_LGUI` |`LAG_SWP`|Swap Left Alt and GUI |
|
||||
|`MAGIC_UNSWAP_LALT_LGUI` |`LAG_NRM`|Unswap Left Alt and GUI |
|
||||
|`MAGIC_SWAP_RALT_RGUI` |`RAG_SWP`|Swap Right Alt and GUI |
|
||||
|`MAGIC_UNSWAP_RALT_RGUI` |`RAG_NRM`|Unswap Right Alt and GUI |
|
||||
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides |
|
||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides |
|
||||
|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides |
|
||||
|`MAGIC_NO_GUI` |`GUI_OFF`|Disable the GUI keys |
|
||||
|`MAGIC_UNNO_GUI` |`GUI_ON` |Enable the GUI keys |
|
||||
|`MAGIC_SWAP_GRAVE_ESC` |`GE_SWAP`|Swap <code>`</code> and Escape |
|
||||
|`MAGIC_UNSWAP_GRAVE_ESC` |`GE_NORM`|Unswap <code>`</code> and Escape |
|
||||
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` |`BS_SWAP`|Swap `\` and Backspace |
|
||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|`BS_NORM`|Unswap `\` and Backspace |
|
||||
|`MAGIC_HOST_NKRO` |`NK_ON` |Enable N-key rollover |
|
||||
|`MAGIC_UNHOST_NKRO` |`NK_OFF` |Disable N-key rollover |
|
||||
|`MAGIC_TOGGLE_NKRO` |`NK_TOGG`|Toggle N-key rollover |
|
||||
|`MAGIC_EE_HANDS_LEFT` |`EH_LEFT`|Set the master half of a split keyboard as the left hand (for `EE_HANDS`) |
|
||||
|`MAGIC_EE_HANDS_RIGHT` |`EH_RGHT`|Set the master half of a split keyboard as the right hand (for `EE_HANDS`)|
|
||||
|
||||
## Configuration
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
## Haptic feedback rules.mk options
|
||||
|
||||
The following options are currently available for haptic feedback in `rule.mk`:
|
||||
The following options are currently available for haptic feedback in `rules.mk`:
|
||||
|
||||
`HAPTIC_ENABLE += DRV2605L`
|
||||
|
||||
|
@@ -286,7 +286,7 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con
|
||||
|
||||
## Custom RGB Matrix Effects
|
||||
|
||||
By setting `RGB_MATRIX_CUSTOM_USER` (and/or `RGB_MATRIX_CUSTOM_KB`) in `rule.mk`, new effects can be defined directly from userspace, without having to edit any QMK core files.
|
||||
By setting `RGB_MATRIX_CUSTOM_USER` (and/or `RGB_MATRIX_CUSTOM_KB`) in `rules.mk`, new effects can be defined directly from userspace, without having to edit any QMK core files.
|
||||
|
||||
To declare new effects, create a new `rgb_matrix_user/kb.inc` that looks something like this:
|
||||
|
||||
|
@@ -86,10 +86,6 @@ Relancer le script d'installation de QMK (`./util/qmk_install.sh` situé dans r
|
||||
|
||||
Si vous rencontrez toujours des problèmes, essayez de télécharger et lancer Zadig. Voir [Installation du driver du bootloader avec Zadig](driver_installation_zadig.md) pour plus d'informations.
|
||||
|
||||
## WINAVR est obsolète
|
||||
|
||||
Il n'est plus recommandé et peut causer des problèmes. Voir [TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99).
|
||||
|
||||
## USB VID et PID
|
||||
|
||||
Vous pouvez utiliser l'ID de votre choix en modifier `config.h`. Il y a peu de chance de conflit avec d'autres produits.
|
||||
@@ -103,30 +99,6 @@ Vous pouvez acheter un VID:PID unique ici. Je ne pense pas que ce soit nécessai
|
||||
- http://www.obdev.at/products/vusb/license.html
|
||||
- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1
|
||||
|
||||
## Cortex: `cstddef: No such file or directory`
|
||||
|
||||
Ce problème existait avec le GCC 4.8 d'Ubuntu 14.04, la solution a nécessité de mettre à jour vers 4.9 avec ce PPA.
|
||||
https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded
|
||||
|
||||
https://github.com/tmk/tmk_keyboard/issues/212
|
||||
https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstddef
|
||||
https://developer.mbed.org/forum/mbed/topic/5205/
|
||||
|
||||
## `clock_prescale_set` and `clock_div_1` Not Available
|
||||
|
||||
Votre chaîne d'outils (Toolchain) est trop vieille pour supporter le MCU. Par exemple, WinAVR 20100110 ne supporte pas ATMega32u2.
|
||||
|
||||
```
|
||||
Compiling C: ../../tmk_core/protocol/lufa/lufa.c
|
||||
avr-gcc -c -mmcu=atmega32u2 -gdwarf-2 -DF_CPU=16000000UL -DINTERRUPT_CONTROL_ENDPOINT -DBOOTLOADER_SIZE=4096 -DF_USB=16000000UL -DARCH=ARCH_AVR8 -DUSB_DEVICE_ONLY -DUSE_FLASH_DESCRIPTORS -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -DFIXED_CONTROL_ENDPOINT_SIZE=8 -DFIXED_NUM_CONFIGURATIONS=1 -DPROTOCOL_LUFA -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DVERSION=unknown -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=obj_alps64/protocol/lufa/lufa.lst -I. -I../../tmk_core -I../../tmk_core/protocol/lufa -I../../tmk_core/protocol/lufa/LUFA-git -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_alps64_protocol_lufa_lufa.o.d ../../tmk_core/protocol/lufa/lufa.c -o obj_alps64/protocol/lufa/lufa.o
|
||||
../../tmk_core/protocol/lufa/lufa.c: In function 'setup_mcu':
|
||||
../../tmk_core/protocol/lufa/lufa.c:575: warning: implicit declaration of function 'clock_prescale_set'
|
||||
../../tmk_core/protocol/lufa/lufa.c:575: error: 'clock_div_1' undeclared (first use in this function)
|
||||
../../tmk_core/protocol/lufa/lufa.c:575: error: (Each undeclared identifier is reported only once
|
||||
../../tmk_core/protocol/lufa/lufa.c:575: error: for each function it appears in.)
|
||||
make: *** [obj_alps64/protocol/lufa/lufa.o] Error 1
|
||||
```
|
||||
|
||||
## BOOTLOADER_SIZE pour AVR
|
||||
|
||||
Notez que la taille du bootloader pour les Teensy2.0++ est de 2048bytes. Quelques Makefiles peuvent contenir une erreur et avoir le mauvais commentaire.
|
||||
|
@@ -104,58 +104,6 @@ En C, `1` implique un type [int] qui est [16 bits] pour les AVR, ce qui implique
|
||||
|
||||
http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
|
||||
|
||||
## Bootloader Jump ne fonctionne pas
|
||||
|
||||
Configurez correctement la taille du bootloader dans le **Makefile**. Une mauvaise taille de section du bootloader empêchera probablement le démarrage avec **Magic command** et **Boot Magic**.
|
||||
|
||||
```
|
||||
# Size of Bootloaders in bytes:
|
||||
# Atmel DFU loader(ATmega32U4) 4096
|
||||
# Atmel DFU loader(AT90USB128) 8192
|
||||
# LUFA bootloader(ATmega32U4) 4096
|
||||
# Arduino Caterina(ATmega32U4) 4096
|
||||
# USBaspLoader(ATmega***) 2048
|
||||
# Teensy halfKay(ATmega32U4) 512
|
||||
# Teensy++ halfKay(AT90USB128) 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
```
|
||||
|
||||
La taille de la section de démarrage de AVR est définie par l'option **BOOTSZ** fuse. Vérifiez la fiche technique du MCU. Veuilez noter que les tailles et adresses sont définies en **Word** (2 octets) dans la fiche technique alors que TMK utilise des **Byte**.
|
||||
|
||||
La section de boot AVR se trouve à la fin de la mémoire flash, comme suit.
|
||||
|
||||
```
|
||||
byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286)
|
||||
0x0000 +---------------+ 0x00000 +---------------+
|
||||
| | | |
|
||||
| | | |
|
||||
| Application | | Application |
|
||||
| | | |
|
||||
= = = =
|
||||
| | 32KB-4KB | | 128KB-8KB
|
||||
0x6000 +---------------+ 0x1E000 +---------------+
|
||||
| Bootloader | 4KB | Bootloader | 8KB
|
||||
0x7FFF +---------------+ 0x1FFFF +---------------+
|
||||
|
||||
|
||||
byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286)
|
||||
0x0000 +---------------+ 0x00000 +---------------+
|
||||
| | | |
|
||||
| | | |
|
||||
| Application | | Application |
|
||||
| | | |
|
||||
= = = =
|
||||
| | 32KB-512B | | 128KB-2KB
|
||||
0x7E00 +---------------+ 0x1FC00 +---------------+
|
||||
| Bootloader | 512B | Bootloader | 2KB
|
||||
0x7FFF +---------------+ 0x1FFFF +---------------+
|
||||
```
|
||||
|
||||
Référez-vous à cette discussion pour plus de référence.
|
||||
https://github.com/tmk/tmk_keyboard/issues/179
|
||||
|
||||
Si vous utilisez un TeensyUSB, il y a un [bug connu](https://github.com/qmk/qmk_firmware/issues/164) qui fait que le bouton reset matériel empêche la touche RESET de fonctionner. Débrancher et rebrancher le clavier devrait résoudre le problème.
|
||||
|
||||
## Les touches spéciales ne fonctionnent pas (Touche Système, Touches de contrôle du son)
|
||||
|
||||
Vous devez définir `EXTRAKEY_ENABLE` dans le fichier `rules.mk` pour les utiliser dans QMK.
|
||||
@@ -189,25 +137,6 @@ Si vous voulez garder JTAG activé, ajoutez la ligne suivante à votre fichier `
|
||||
#define NO_JTAG_DISABLE
|
||||
```
|
||||
|
||||
## Adding LED Indicators of Lock Keys
|
||||
|
||||
Si vous souhaitez votre propre indicateur LED pour CapsLock, ScrollLock et NumLock alors lisez ce post.
|
||||
|
||||
http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560
|
||||
|
||||
## Programmer Arduino Micro/Leonardo
|
||||
|
||||
Appuyez sur le bouton reset puis lancez la commande suivante dans les 8 secondes.
|
||||
|
||||
```
|
||||
avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:adb_usb.hex -P/dev/ttyACM0
|
||||
```
|
||||
|
||||
Le nom du périphérique peut varier en fonction de votre système.
|
||||
|
||||
http://arduino.cc/en/Main/ArduinoBoardMicro
|
||||
https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867
|
||||
|
||||
## Compatibilité USB 3
|
||||
|
||||
Il semble que certaines personnes ont eu des problèmes avec les ports USB 3, essayez un port USB 2.
|
||||
|
@@ -72,24 +72,7 @@ Des vieux claviers mécaniques ont parfois des touches à verrouillage, mais les
|
||||
|
||||
## Ajouter des caractères spéciaux autres que ASCII comme la cédille 'Ç'
|
||||
|
||||
IL N'EXISTE AUCUNE METHODE UNIVERSELLE POUR LES AJOUTER QUI FONCTIONNE SUR TOUS LES SYSTEMES. Vous devez définir une **MACRO** d'une manière spécifique à votre OS ou layout.
|
||||
|
||||
Voir ce post pour un exemple de code **MACRO**.
|
||||
|
||||
http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p195620
|
||||
|
||||
Sous **Windows** vous pouvez utiliser la touche `AltGr` ou **Alt code**.
|
||||
* http://en.wikipedia.org/wiki/AltGr_key
|
||||
* http://en.wikipedia.org/wiki/Alt_code
|
||||
|
||||
Sous **Mac OS** définissez une combinaison de touche `Option`.
|
||||
* http://en.wikipedia.org/wiki/Option_key#Alternative_keyboard_input
|
||||
|
||||
Sous **Xorg** vous pouvez utiliser une touche `compose` à la place.
|
||||
* http://en.wikipedia.org/wiki/Compose_key
|
||||
|
||||
Et voir ceci pour une entrée **Unicode**.
|
||||
* http://en.wikipedia.org/wiki/Unicode_input
|
||||
Voir la fonctionnalité [Unicode](feature_unicode.md).
|
||||
|
||||
## Touche `Fn` sur macOS
|
||||
|
||||
@@ -144,54 +127,6 @@ Cette fonctionnalité permet d'utiliser une touche à la fois comme touche Écha
|
||||
|
||||
Voir la fonctionnalité [Grave Escape](feature_grave_esc.md).
|
||||
|
||||
## Avoir les touches modificatrices qui ont double usage en flèches directionnelles.
|
||||
|
||||
Ceci transforme les touches "modificateur droit" en touches fléchées lorsque les touches sont seulement "tapées" tout en restant des modificateurs lorsqu'elles sont maintenues.
|
||||
|
||||
Dans TMK la fonction double rôle s'appelle **TAP**.
|
||||
|
||||
```C
|
||||
|
||||
#include "keymap_common.h"
|
||||
|
||||
|
||||
/* Arrow keys on right modifier keys with TMK dual role feature
|
||||
*
|
||||
* https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#213-modifier-with-tap-keydual-role
|
||||
* https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys
|
||||
*/
|
||||
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* 0: qwerty */
|
||||
[0] = LAYOUT( \
|
||||
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS,BSPC, \
|
||||
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \
|
||||
LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \
|
||||
LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,FN0, ESC, \
|
||||
FN4, LGUI,LALT, SPC, APP, FN2, FN1, FN3),
|
||||
[1] = LAYOUT( \
|
||||
GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS, \
|
||||
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\
|
||||
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
|
||||
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN5, TRNS, \
|
||||
TRNS,TRNS,TRNS, TRNS, TRNS,FN7, FN6, FN8),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_UP),
|
||||
[1] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_DOWN),
|
||||
[2] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_LEFT),
|
||||
[3] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RIGHT),
|
||||
[4] = ACTION_LAYER_MOMENTARY(1),
|
||||
[5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_PGUP),
|
||||
[6] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_PGDN),
|
||||
[7] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_HOME),
|
||||
[8] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_END),
|
||||
};
|
||||
|
||||
```
|
||||
|
||||
Touches double rôle : https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys
|
||||
|
||||
## Eject sur Mac OSX
|
||||
|
||||
Le keycode`KC_EJCT` fonctionne sous OSX. https://github.com/tmk/tmk_keyboard/issues/250
|
||||
|
@@ -19,7 +19,7 @@ And be sure to select "HTTPS", and select the link and copy it:
|
||||
From here, enter `git clone ` into the command line, and then paste your link:
|
||||
|
||||
```
|
||||
user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git
|
||||
user@computer:~$ git clone --recurse-submodules https://github.com/whoeveryouare/qmk_firmware.git
|
||||
Cloning into 'qmk_firmware'...
|
||||
remote: Counting objects: 46625, done.
|
||||
remote: Compressing objects: 100% (2/2), done.
|
||||
|
@@ -4,7 +4,7 @@ This page attempts to explain the basic information you need to know to work wit
|
||||
|
||||
## Basic QMK Structure
|
||||
|
||||
QMK is a fork of [Jun Wako](https://github.com/tmk)'s [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
|
||||
QMK is a fork of [Jun Wako](https://github.com/tmk)'s [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk_core` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
|
||||
|
||||
### Userspace Structure
|
||||
|
||||
|
@@ -59,7 +59,7 @@ To disable debug messages (*dprint*) and reduce the .hex file size, include `#de
|
||||
|
||||
To disable print messages (*print*, *xprintf*) and user print messages (*uprint*) and reduce the .hex file size, include `#define NO_PRINT` in your `config.h` file.
|
||||
|
||||
To disable print messages (*print*, *xprintf*) and **KEEP** user print messages (*uprint*), include `#define USER_PRINT` in your `config.h` file.
|
||||
To disable print messages (*print*, *xprintf*) and **KEEP** user print messages (*uprint*), include `#define USER_PRINT` in your `config.h` file (do not also include `#define NO_PRINT` in this case).
|
||||
|
||||
To see the text, open `hid_listen` and enjoy looking at your printed messages.
|
||||
|
||||
|
@@ -35,6 +35,7 @@
|
||||
'/fr-fr/': '/#/fr-fr/',
|
||||
'/he-il/': '/#/he-il/',
|
||||
'/ja/': '/#/ja/',
|
||||
'/pt-br/': '/#/pt-br/',
|
||||
'/ru-ru/': '/#/ru-ru/',
|
||||
'/zh-cn/': '/#/zh-cn/',
|
||||
'/': '/#/'
|
||||
@@ -50,6 +51,7 @@
|
||||
'fr-fr',
|
||||
'he-il',
|
||||
'ja',
|
||||
'pt-br',
|
||||
'ru-ru',
|
||||
'zh-cn'
|
||||
],
|
||||
@@ -60,12 +62,14 @@
|
||||
'/es/': 'Buscar',
|
||||
'/zh-cn/': '搜索',
|
||||
'/ja/': '検索',
|
||||
'/pt-br/': 'Busca',
|
||||
'/': 'Search'
|
||||
},
|
||||
noData: {
|
||||
'/es/': '¡Ningún resultado!',
|
||||
'/zh-cn/': '没有结果!',
|
||||
'/ja/': '見つかりません!',
|
||||
'/pt-br/': 'Nenhum resultado!',
|
||||
'/': 'No results!'
|
||||
},
|
||||
depth: 6
|
||||
@@ -78,9 +82,9 @@
|
||||
.replace('raw.githubusercontent.com', 'github.com')
|
||||
.replace(/\/master/, '/blob/master')
|
||||
} else {
|
||||
url = 'https://github.com/qmk/qmk_firmware/blob/master/docs/' + vm.route.file
|
||||
url = 'https://github.com/qmk/qmk_firmware/edit/master/docs/' + vm.route.file
|
||||
}
|
||||
var editHtml = '[:memo: Edit Document](' + url + ')\n'
|
||||
var editHtml = ':pencil2: [Edit this page](' + url + ')\n'
|
||||
return html
|
||||
+ '\n\n----\n\n'
|
||||
+ editHtml
|
||||
|
37
docs/ja/README.md
Normal file
37
docs/ja/README.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# Quantum Mechanical Keyboard Firmware
|
||||
|
||||
<!---
|
||||
original document: eae21eed7:docs/README.md
|
||||
git diff eae21eed7 HEAD docs/README.md | cat
|
||||
-->
|
||||
|
||||
[](https://github.com/qmk/qmk_firmware/tags)
|
||||
[](https://travis-ci.org/qmk/qmk_firmware)
|
||||
[](https://discord.gg/Uq7gcHh)
|
||||
[](https://docs.qmk.fm)
|
||||
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
||||
[](https://github.com/qmk/qmk_firmware/)
|
||||
|
||||
## QMK ファームウェアとは何か?
|
||||
|
||||
QMK (*Quantum Mechanical Keyboard*)は QMK ファームウェア、QMK ツールボックス、qmk.fm およびそれらのドキュメントを保守するオープンソースコミュニティです。QMK ファームウェアは[tmk\_keyboard](http://github.com/tmk/tmk_keyboard) を元にしたキーボードファームウェアで、Atmel AVR コントローラ、より具体的には [OLKB 製品](http://olkb.com)、[ErgoDox EZ](http://www.ergodox-ez.com) キーボードおよび [Clueboard 製品](http://clueboard.co/) のための幾つかの便利な機能を持ちます。また、ChibiOS を使って ARM チップに移植されています。これを使ってあなたの作った手配線のキーボードあるいはカスタムキーボード PCB で作ったキーボードを動かすことができます。
|
||||
|
||||
## 入手方法
|
||||
|
||||
QMK のキーマップ、キーボード、機能に貢献をする予定がある場合、最も簡単なのは、[Github を介してリポジトリをフォークし](https://github.com/qmk/qmk_firmware#fork-destination-box)、リポジトリをあなたの開発環境にクローンして変更を加え、それらをプッシュし、[プルリクエスト](https://github.com/qmk/qmk_firmware/pulls)を開くことです。
|
||||
|
||||
それ以外の場合は、`git clone https://github.com/qmk/qmk_firmware` を介して直接クローンすることができます。zip または tar ファイルをダウンロードしないでください。コンパイルするためのサブモジュールをダウンロードするために git リポジトリが必要です。
|
||||
|
||||
## コンパイル方法
|
||||
|
||||
コンパイルをする前に、AVR または ARM 開発のための[環境をインストール](ja/getting_started_build_tools.md)する必要があります。それが完了したら、`make` コマンドを使用して、以下の表記でキーボードとキーマップをビルドします。
|
||||
|
||||
make planck/rev4:default
|
||||
|
||||
これは、`planck` の `rev4` リビジョンを `default` キーマップでビルドします。全てのキーボードにリビジョン(サブプロジェクトまたはフォルダとも呼ばれます)があるわけではありません。その場合は省略されます:
|
||||
|
||||
make preonic:default
|
||||
|
||||
## カスタマイズ方法
|
||||
|
||||
QMK には、探求すべき多くの[機能](ja/features.md)と、深堀りするための[リファレンス ドキュメント](http://docs.qmk.fm)がたくさんあります。ほとんどの機能は[キーマップ](ja/keymap.md)を変更し、[キーコード](ja/keycodes.md)を変更することで活用されます。
|
92
docs/ja/arm_debugging.md
Normal file
92
docs/ja/arm_debugging.md
Normal file
@@ -0,0 +1,92 @@
|
||||
# Eclipse を使った ARM デバッグ
|
||||
|
||||
<!---
|
||||
original document: eae21eed7:docs/arm_debugging.md
|
||||
git diff eae21eed7 HEAD docs/arm_debugging.md | cat
|
||||
-->
|
||||
|
||||
このページでは、SWD アダプタとオープンソース/フリーツールを使って ARM MCU をデバッグするためのセットアップ方法について説明します。このガイドでは、GNU MCU Eclipse IDE for C/C++ Developers および OpenOCD を必要な依存関係と一緒にインストールします。
|
||||
|
||||
このガイドは上級者向けであり、あなたのマシンで、MAKE フローを使って、ARM 互換キーボードをコンパイルできることを前提にしています。
|
||||
|
||||
## ソフトウェアのインストール
|
||||
|
||||
ここでの主な目的は MCU Eclipse IDE を正しくマシンにインストールすることです。必要な手順は[この](https://gnu-mcu-eclipse.github.io/install/)インストールガイドから派生しています。
|
||||
|
||||
### xPack マネージャ
|
||||
|
||||
このツールはソフトウェアパッケージマネージャであり、必要な依存関係を取得するために使われます。
|
||||
|
||||
XPM は Node.js を使って実行されるため、[ここ](https://nodejs.org/en/)から取得してください。インストール後に、ターミナルを開き `npm -v` と入力します。バージョン番号が返ってくるとインストールは成功です。
|
||||
|
||||
XPM のインストール手順は[ここ](https://www.npmjs.com/package/xpm)で見つけることができ、OS 固有のものです。ターミナルに `xpm --version` と入力すると、ソフトウェアのバージョンが返ってくるはずです。
|
||||
|
||||
### ARM ツールチェーン
|
||||
|
||||
XPM を使うと、ARM ツールチェーンをとても簡単にインストールできます。`xpm install --global @gnu-mcu-eclipse/arm-none-eabi-gcc` とコマンドを入力します。
|
||||
|
||||
### Windows ビルドツール
|
||||
|
||||
Windows を使っている場合は、これをインストールする必要があります!
|
||||
|
||||
`xpm install --global @gnu-mcu-eclipse/windows-build-tools`
|
||||
|
||||
### プログラマ/デバッガドライバ
|
||||
|
||||
プログラマのドライバをインストールします。このチュートリアルはほとんどどこでも入手できる ST-Link v2 を使って作成されました。
|
||||
ST-Link を持っている場合は、ドライバは[ここ](https://www.st.com/en/development-tools/stsw-link009.html)で見つけることができます。そうでない場合はツールの製造元にお問い合わせください。
|
||||
|
||||
### OpenOCD
|
||||
|
||||
この依存関係により、SWD は GDB からアクセスでき、デバッグに不可欠です。`xpm install --global @gnu-mcu-eclipse/openocd` を実行します。
|
||||
|
||||
### Java
|
||||
|
||||
Java は Eclipse で必要とされるため、[ここ](https://www.oracle.com/technetwork/java/javase/downloads/index.html)からダウンロードしてください。
|
||||
|
||||
### GNU MCU Eclipse IDE
|
||||
|
||||
最後に IDE をインストールする番です。[ここ](https://github.com/gnu-mcu-eclipse/org.eclipse.epp.packages/releases/)のリリースページから最新バージョンを取得します。
|
||||
|
||||
## Eclipse の設定
|
||||
|
||||
ダウンロードした Eclipse IDE を開きます。QMK ディレクトリをインポートするために、File -> Import -> C/C++ -> Existing code as Makefile Project を選択します。Next を選択し、Browse を使用して QMK フォルダを選択します。tool-chain リストから ARM Cross GCC を選択し、Finish を選択します。
|
||||
|
||||
これで、左側に QMK フォルダが表示されます。右クリックして、Properties を選択します。左側で MCU を展開し、ARM Toolchain Paths を選択します。xPack を押して OK を押します。OpenOCD Path で同じことを繰り返し、Windows の場合は、Build Tool Path でも同じことを繰り返します。Apply and Close を選択します。
|
||||
|
||||
ここで、必要な MCU パッケージをインストールします。Window -> Open Perspective -> Others -> Packs を選択して、Packs perspective に移動します。Packs タブの横にある黄色のリフレッシュ記号を選択します。これは様々な場所から MCU の定義を要求するため、時間が掛かります。一部のリンクが失敗した場合は、おそらく Ignore を選択できます。
|
||||
|
||||
これが終了すると、ビルドやデバッグする MCU を見つけることができるはずです。この例では、STM32F3 シリーズの MCU を使います。左側で、STMicroelectronics -> STM32F3 Series を選択します。中央のウィンドウに、pack が表示されます。右クリックし、Install を選択します。それが終了したら、Window -> Open Perspective -> Others -> C/C++ を選択してデフォルトのパースペクティブに戻ることができます。
|
||||
|
||||
Eclipse に QMK をビルドしようとするデバイスを教える必要があります。QMK フォルダを右クリック -> Properties -> C/C++ Build -> Settings を選択します。Devices タブを選択し、devices の下から MCU の適切な種類を選択します。私の例では、STM32F303CC です。
|
||||
|
||||
この間に、build コマンドもセットアップしましょう。C/C++ Build を選択し、Behavior タブを選択します。build コマンドのところで、`all` を必要な make コマンドに置き換えます。例えば、rev6 Planck の default キーマップの場合、これは `planck/rev6:default` になります。Apply and Close を選択します。
|
||||
|
||||
## ビルド
|
||||
|
||||
全て正しくセットアップできていれば、ハンマーボタンを押すとファームウェアがビルドされ、.binファイルが出力されるはずです。
|
||||
|
||||
## デバッグ
|
||||
|
||||
### デバッガの接続
|
||||
|
||||
ARM MCU は、クロック信号(SWCLK) とデータ信号(SWDIO) で構成される Single Wire Debug (SWD) プロトコルを使います。MCUを 完全に操作するには、この2本のワイヤとグラウンドを接続するだけで十分です。ここでは、キーボードは USB を介して電力が供給されると想定しています。手動でリセットボタンを使えるため、RESET 信号は必要ありません。より高度なセットアップのために printf と scanf をホストに非同期にパイプする SWO 信号を使用できますが、私たちのセットアップでは無視します。
|
||||
|
||||
注意: SWCLK と SWDIO ピンがキーボードのマトリックスで使われていないことを確認してください。もし使われている場合は、一時的に他のピンに切り替えることができます。
|
||||
|
||||
### デバッガの設定
|
||||
|
||||
QMK フォルダを右クリックし、Debug As -> Debug Configuration を選択します。ここで、GDB OpenOCD Debugging をダブルクリックします。Debugger タブを選択し、MCU に必要な設定を入力します。これを見つけるにはいじったりググったりする必要があるかもしれません。STM32F3 用のデフォルトスクリプトは stm32f3discovery.cfg と呼ばれます。OpenOCD に伝えるには、Config options で `-f board/stm32f3discovery.cfg` と入力します。
|
||||
|
||||
注意: 私の場合、この設定スクリプトはリセット操作を無効にするために編集が必要です。スクリプトの場所は、通常はパス `openocd/version/.content/scripts/board` の下の実際の実行可能フィールドの中で見つかります。ここで、私は `reset_config srst_only` を `reset_config none` に編集しました。
|
||||
|
||||
Apply and Close を選択します。
|
||||
|
||||
### デバッガの実行
|
||||
|
||||
キーボードをリセットしてください。
|
||||
|
||||
虫アイコンをクリックし、もし全てうまく行けば debug パースペクティブに移動します。ここでは、main 関数の最初でプログラムカウンタが停止するので、Play ボタンを押します。全てのデバッガのほとんどの機能は ARM MCU で動作しますが、正確な詳細については google があなたのお友達です!
|
||||
|
||||
|
||||
ハッピーデバッギング!
|
227
docs/ja/cli.md
Normal file
227
docs/ja/cli.md
Normal file
@@ -0,0 +1,227 @@
|
||||
# QMK CLI
|
||||
|
||||
<!---
|
||||
original document: d598f01cb:cli.md
|
||||
git diff d598f01cb HEAD cli.md | cat
|
||||
-->
|
||||
|
||||
このページは QMK CLI のセットアップと使用方法について説明します。
|
||||
|
||||
# 概要
|
||||
|
||||
QMK CLI を使用すると QMK キーボードの構築と作業が簡単になります。QMK ファームウェアの取得とコンパイル、キーマップの作成などのようなタスクを簡素化し合理化するためのコマンドを多く提供します。
|
||||
|
||||
* [グローバル CLI](#global-cli)
|
||||
* [ローカル CLI](#local-cli)
|
||||
* [CLI コマンド](#cli-commands)
|
||||
|
||||
# 必要事項
|
||||
|
||||
CLI は Python 3.5 以上を必要とします。我々は必要事項の数を少なくしようとしていますが、[`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt) にリストされているパッケージもインストールする必要があります。
|
||||
|
||||
# グローバル CLI :id=global-cli
|
||||
|
||||
QMK は、QMK ビルド環境のセットアップ、QMK の操作、および `qmk_firmware` の複数のコピーの操作を容易にできるインストール可能な CLI を提供します。これを定期的にインストールおよび更新することをお勧めします。
|
||||
|
||||
## Homebrew を使ったインストール (macOS、いくつかの Linux)
|
||||
|
||||
[Homebrew](https://brew.sh) をインストールしている場合は、タップして QMK をインストールすることができます:
|
||||
|
||||
```
|
||||
brew tap qmk/qmk
|
||||
brew install qmk
|
||||
export QMK_HOME='~/qmk_firmware' # オプション、`qmk_firmware` の場所を設定します
|
||||
qmk setup # これは `qmk/qmk_firmware` をクローンし、オプションでビルド環境をセットアップします
|
||||
```
|
||||
|
||||
## easy_install あるいは pip を使ってインストール
|
||||
|
||||
上のリストにあなたのシステムがない場合は、QMK を手動でインストールすることができます。最初に、python 3.5 (以降)をインストールしていて、pip をインストールしていることを確認してください。次に以下のコマンドを使って QMK をインストールします:
|
||||
|
||||
```
|
||||
pip3 install qmk
|
||||
export QMK_HOME='~/qmk_firmware' # オプション、`qmk_firmware` の場所を設定します
|
||||
qmk setup # これは `qmk/qmk_firmware` をクローンし、オプションでビルド環境をセットアップします
|
||||
```
|
||||
|
||||
## 他のオペレーティングシステムのためのパッケージ
|
||||
|
||||
より多くのオペレーティングシステム用に `qmk` パッケージを作成および保守する人を探しています。OS 用のパッケージを作成する場合は、以下のガイドラインに従ってください:
|
||||
|
||||
* これらのガイドラインと矛盾する場合は、OS のベストプラクティスに従ってください
|
||||
* 逸脱する場合は、理由をコメントに文章化してください。
|
||||
* virtualenv を使ってインストールしてください
|
||||
* 環境変数 `QMK_HOME` を設定して、ファームウェアソースを `~/qmk_firmware` 以外のどこかにチェックアウトするようにユーザに指示してください。
|
||||
|
||||
# ローカル CLI :id=local-cli
|
||||
|
||||
グローバル CLI を使いたくない場合は、`qmk_firmware` に付属のローカル CLI があります。`qmk_firmware/bin/qmk` で見つけることができます。任意のディレクトリから `qmk` コマンドを実行でき、常に `qmk_firmware` のコピー上で動作します。
|
||||
|
||||
**例**:
|
||||
|
||||
```
|
||||
$ ~/qmk_firmware/bin/qmk hello
|
||||
Ψ Hello, World!
|
||||
```
|
||||
|
||||
## ローカル CLI の制限
|
||||
|
||||
グローバル CLI と比較して、ローカル CLI には幾つかの制限があります:
|
||||
|
||||
* ローカル CLI は `qmk setup` あるいは `qmk clone` をサポートしません。
|
||||
* 複数のリポジトリがクローンされている場合でも、ローカル CLI は常に `qmk_firmware` ツリー上で動作します。
|
||||
* ローカル CLI は virtualenv で動作しません。そのため依存関係が競合する可能性があります
|
||||
|
||||
# CLI コマンド :id=cli-commands
|
||||
|
||||
## `qmk cformat`
|
||||
|
||||
このコマンドは clang-format を使って C コードを整形します。引数無しで実行して全てのコアコードを整形するか、コマンドラインでファイル名を渡して特定のファイルに対して実行します。
|
||||
|
||||
**使用法**:
|
||||
|
||||
```
|
||||
qmk cformat [file1] [file2] [...] [fileN]
|
||||
```
|
||||
|
||||
## `qmk compile`
|
||||
|
||||
このコマンドにより、任意のディレクトリからファームウェアをコンパイルすることができます。<https://config.qmk.fm> からエクスポートした JSON をコンパイルするか、リポジトリ内でキーマップをコンパイルすることができます。
|
||||
|
||||
**Configurator Exports での使い方**:
|
||||
|
||||
```
|
||||
qmk compile <configuratorExport.json>
|
||||
```
|
||||
|
||||
**キーマップでの使い方**:
|
||||
|
||||
```
|
||||
qmk compile -kb <keyboard_name> -km <keymap_name>
|
||||
```
|
||||
|
||||
## `qmk flash`
|
||||
|
||||
このコマンドは `qmk compile` に似ていますが、ブートローダを対象にすることもできます。ブートローダはオプションで、デフォルトでは `:flash` に設定されています。
|
||||
違うブートローダを指定するには、`-bl <bootloader>` を使ってください。利用可能なブートローダの詳細については、<https://docs.qmk.fm/#/ja/flashing>
|
||||
を見てください。
|
||||
|
||||
**Configurator Exports での使い方**:
|
||||
|
||||
```
|
||||
qmk flash <configuratorExport.json> -bl <bootloader>
|
||||
```
|
||||
|
||||
**キーマップでの使い方**:
|
||||
|
||||
```
|
||||
qmk flash -kb <keyboard_name> -km <keymap_name> -bl <bootloader>
|
||||
```
|
||||
|
||||
**ブートローダのリスト**
|
||||
|
||||
```
|
||||
qmk flash -b
|
||||
```
|
||||
|
||||
## `qmk config`
|
||||
|
||||
このコマンドにより QMK の挙動を設定することができます。完全な `qmk config` のドキュメントについては、[CLI 設定](ja/cli_configuration.md)を見てください。
|
||||
|
||||
**使用法**:
|
||||
|
||||
```
|
||||
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
|
||||
```
|
||||
|
||||
## `qmk docs`
|
||||
|
||||
このコマンドは、ドキュメントを参照または改善するために使うことができるローカル HTTP サーバを起動します。デフォルトのポートは 8936 です。
|
||||
|
||||
**使用法**:
|
||||
|
||||
```
|
||||
qmk docs [-p PORT]
|
||||
```
|
||||
|
||||
## `qmk doctor`
|
||||
|
||||
このコマンドは環境を調査し、潜在的なビルドあるいは書き込みの問題について警告します。
|
||||
|
||||
**使用法**:
|
||||
|
||||
```
|
||||
qmk doctor
|
||||
```
|
||||
|
||||
## `qmk json-keymap`
|
||||
|
||||
QMK Configurator からエクスポートしたものから keymap.c を生成します。
|
||||
|
||||
**使用法**:
|
||||
|
||||
```
|
||||
qmk json-keymap [-o OUTPUT] filename
|
||||
```
|
||||
|
||||
## `qmk kle2json`
|
||||
|
||||
このコマンドにより、生の KLE データから QMK Configurator の JSON へ変換することができます。絶対パスあるいは現在のディレクトリ内のファイル名のいずれかを受け取ります。デフォルトでは、`info.json` が既に存在している場合は上書きしません。上書きするには、`-f` あるいは `--force` フラグを使ってください。
|
||||
|
||||
**使用法**:
|
||||
|
||||
```
|
||||
qmk kle2json [-f] <filename>
|
||||
```
|
||||
|
||||
**例**:
|
||||
|
||||
```
|
||||
$ qmk kle2json kle.txt
|
||||
☒ File info.json already exists, use -f or --force to overwrite.
|
||||
```
|
||||
|
||||
```
|
||||
$ qmk kle2json -f kle.txt -f
|
||||
Ψ Wrote out to info.json
|
||||
```
|
||||
|
||||
## `qmk list-keyboards`
|
||||
|
||||
このコマンドは現在 `qmk_firmware` で定義されている全てのキーボードをリスト化します。
|
||||
|
||||
**使用法**:
|
||||
|
||||
```
|
||||
qmk list-keyboards
|
||||
```
|
||||
|
||||
## `qmk new-keymap`
|
||||
|
||||
このコマンドは、キーボードの既存のデフォルトのキーマップに基づいて新しいキーマップを作成します。
|
||||
|
||||
**使用法**:
|
||||
|
||||
```
|
||||
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
|
||||
```
|
||||
|
||||
## `qmk pyformat`
|
||||
|
||||
このコマンドは `qmk_firmware` 内の python コードを整形します。
|
||||
|
||||
**使用法**:
|
||||
|
||||
```
|
||||
qmk pyformat
|
||||
```
|
||||
|
||||
## `qmk pytest`
|
||||
|
||||
このコマンドは python のテストスィートを実行します。python コードに変更を加えた場合、これの実行が成功することを確認する必要があります。
|
||||
|
||||
**使用法**:
|
||||
|
||||
```
|
||||
qmk pytest
|
||||
```
|
126
docs/ja/cli_configuration.md
Normal file
126
docs/ja/cli_configuration.md
Normal file
@@ -0,0 +1,126 @@
|
||||
# QMK CLI 設定
|
||||
|
||||
<!---
|
||||
original document: d598f01cb:cli_configuration.md
|
||||
git diff d598f01cb HEAD cli_configuration.md | cat
|
||||
-->
|
||||
|
||||
このドキュメントは `qmk config` がどのように動作するかを説明します。
|
||||
|
||||
# はじめに
|
||||
|
||||
QMK CLI の設定はキーバリューシステムです。各キーはピリオドで区切られたサブコマンドと引数名で構成されます。これにより、設定キーと設定された引数の間で簡単かつ直接的な変換が可能になります。
|
||||
|
||||
## 簡単な例
|
||||
|
||||
例として、`qmk compile --keyboard clueboard/66/rev4 --keymap default` コマンドを見てみましょう。
|
||||
|
||||
設定から読み取ることができる2つのコマンドライン引数があります:
|
||||
|
||||
* `compile.keyboard`
|
||||
* `compile.keymap`
|
||||
|
||||
これらを設定してみましょう:
|
||||
|
||||
```
|
||||
$ qmk config compile.keyboard=clueboard/66/rev4 compile.keymap=default
|
||||
compile.keyboard: None -> clueboard/66/rev4
|
||||
compile.keymap: None -> default
|
||||
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||
```
|
||||
|
||||
これで、毎回キーボードとキーマップを設定することなく、`qmk compile` を実行することができます。
|
||||
|
||||
## ユーザデフォルトの設定
|
||||
|
||||
複数のコマンド間で設定を共有したい場合があります。例えば、いくつかのコマンドは引数 `--keyboard` を受け取ります。全てのコマンドでこの値を設定する代わりに、その引数を受け取る全てのコマンドで使われるユーザ値を設定することができます。
|
||||
|
||||
例:
|
||||
|
||||
```
|
||||
$ qmk config user.keyboard=clueboard/66/rev4 user.keymap=default
|
||||
user.keyboard: None -> clueboard/66/rev4
|
||||
user.keymap: None -> default
|
||||
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||
```
|
||||
|
||||
# CLI ドキュメント (`qmk config`)
|
||||
|
||||
`qmk config` コマンドは基礎となる設定とやり取りするために使われます。引数無しで実行すると、現在の設定を表示します。引数が指定された場合、それらは設定トークンと見なされます。設定トークンは以下の形式の空白を含まない文字列です:
|
||||
|
||||
<subcommand|general|default>[.<key>][=<value>]
|
||||
|
||||
## 設定値の設定
|
||||
|
||||
設定キーに等号 (=) を入れることで、設定値を設定することができます。キーは常に完全な `<section>.<key>` 形式である必要があります。
|
||||
|
||||
例:
|
||||
|
||||
```
|
||||
$ qmk config default.keymap=default
|
||||
default.keymap: None -> default
|
||||
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||
```
|
||||
|
||||
## 設定値の読み込み
|
||||
|
||||
設定全体、単一のキー、あるいはセクション全体の設定値を読み取ることができます。1つ以上の値を表示するために複数のキーを指定することができます。
|
||||
|
||||
### 全体の構成例
|
||||
|
||||
qmk config
|
||||
|
||||
### セクション全体の例
|
||||
|
||||
qmk config compile
|
||||
|
||||
### 単一キーの例
|
||||
|
||||
qmk config compile.keyboard
|
||||
|
||||
### 複数キーの例
|
||||
|
||||
qmk config user compile.keyboard compile.keymap
|
||||
|
||||
## 設定値の削除
|
||||
|
||||
設定値を特別な文字列 `None` に設定することで、設定値を削除することができます。
|
||||
|
||||
例:
|
||||
|
||||
```
|
||||
$ qmk config default.keymap=None
|
||||
default.keymap: default -> None
|
||||
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||
```
|
||||
|
||||
## 複数の操作
|
||||
|
||||
複数の読み込みおよび書き込み操作を1つのコマンドに組み合わせることができます。それらは順番に実行および表示されます:
|
||||
|
||||
```
|
||||
$ qmk config compile default.keymap=default compile.keymap=None
|
||||
compile.keymap=skully
|
||||
compile.keyboard=clueboard/66_hotswap/gen1
|
||||
default.keymap: None -> default
|
||||
compile.keymap: skully -> None
|
||||
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||
```
|
||||
|
||||
# ユーザ設定オプション
|
||||
|
||||
| キー | デフォルト値 | 説明 |
|
||||
|-----|---------------|-------------|
|
||||
| user.keyboard | None | キーボードのパス (例: `clueboard/66/rev4`) |
|
||||
| user.keymap | None | キーマップ名 (例: `default`) |
|
||||
| user.name | None | ユーザの github のユーザ名。 |
|
||||
|
||||
# 全ての設定オプション
|
||||
|
||||
| キー | デフォルト値 | 説明 |
|
||||
|-----|---------------|-------------|
|
||||
| compile.keyboard | None | キーボードのパス (例: `clueboard/66/rev4`) |
|
||||
| compile.keymap | None | キーマップ名 (例: `default`) |
|
||||
| hello.name | None | 実行時の挨拶の名前 |
|
||||
| new_keyboard.keyboard | None | キーボードのパス (例: `clueboard/66/rev4`) |
|
||||
| new_keyboard.keymap | None | キーマップ名 (例: `default`) |
|
376
docs/ja/config_options.md
Normal file
376
docs/ja/config_options.md
Normal file
@@ -0,0 +1,376 @@
|
||||
# QMK の設定
|
||||
|
||||
<!---
|
||||
original document: eae21eed7:docs/config_options.md
|
||||
git diff eae21eed7 HEAD docs/config_options.md | cat
|
||||
-->
|
||||
|
||||
QMK はほぼ無制限に設定可能です。可能なところはいかなるところでも、やりすぎな程、ユーザーがコードサイズを犠牲にしてでも彼らのキーボードをカスタマイズをすることを許しています。ただし、このレベルの柔軟性により設定が困難になります。
|
||||
|
||||
QMK には主に2種類の設定ファイルがあります- `config.h` と `rules.mk`。これらのファイルは QMK の様々なレベルに存在し、同じ種類の全てのファイルは最終的な設定を構築するために組み合わされます。最低の優先度から最高の優先度までのレベルは以下の通りです:
|
||||
|
||||
* QMK デフォルト
|
||||
* キーボード
|
||||
* フォルダ (最大5レべルの深さ)
|
||||
* キーマップ
|
||||
|
||||
## QMK デフォルト
|
||||
|
||||
QMK での全ての利用可能な設定にはデフォルトがあります。その設定がキーボード、フォルダ、あるいはキーマップレべルで設定されない場合、これが使用される設定です。
|
||||
|
||||
## キーボード
|
||||
|
||||
このレベルにはキーボード全体に適用される設定オプションが含まれています。一部の設定は、リビジョンあるいはほとんどのキーマップで変更されません。他の設定はこのキーボードのデフォルトに過ぎず、フォルダあるいはキーマップによって上書きされる可能性があります。
|
||||
|
||||
## フォルダ
|
||||
|
||||
一部のキーボードには、異なるハードウェア構成のためのフォルダとサブフォルダがあります。ほとんどのキーボードは深さ1のフォルダのみですが、QMK は最大深さ5のフォルダの構造をサポートします。各フォルダは、最終的な設定に組み込まれる独自の `config.h` と `rules.mk` ファイルを持つことができます。
|
||||
|
||||
## キーマップ
|
||||
|
||||
このレベルには特定のキーマップのための全てのオプションが含まれています。以前の定義を上書きしたい場合は、`#undef <variable>` を使って定義を解除し、エラー無しで再定義することができます。
|
||||
|
||||
# `config.h` ファイル
|
||||
|
||||
これは最初に include されるものの 1 つである C ヘッダファイルで、プロジェクト全体(もし含まれる場合)にわたって持続します。多くの変数をここで設定し、他の場所からアクセスすることができます。`config.h` ファイルでは、以下のもの以外の、他の `config.h` ファイルやその他のファイルの include をしないでください:
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
|
||||
## ハードウェアオプション
|
||||
* `#define VENDOR_ID 0x1234`
|
||||
* VID を定義します。ほとんどの DIY プロジェクトにおいて、任意のものを定義できます
|
||||
* `#define PRODUCT_ID 0x5678`
|
||||
* PID を定義します。ほとんどの DIY プロジェクトでは、任意のものを定義できます
|
||||
* `#define DEVICE_VER 0`
|
||||
* デバイスのバージョンを定義します (多くの場合リビジョンに使われます)
|
||||
* `#define MANUFACTURER Me`
|
||||
* 一般的に、誰もしくはどのブランドがボードを作成したか
|
||||
* `#define PRODUCT Board`
|
||||
* キーボードの名前
|
||||
* `#define DESCRIPTION a keyboard`
|
||||
* キーボードの簡単な説明
|
||||
* `#define MATRIX_ROWS 5`
|
||||
* キーボードのマトリックスの行の数
|
||||
* `#define MATRIX_COLS 15`
|
||||
* キーボードのマトリックスの列の数
|
||||
* `#define MATRIX_ROW_PINS { D0, D5, B5, B6 }`
|
||||
* 行のピン、上から下へ
|
||||
* `#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }`
|
||||
* 列のピン、左から右へ
|
||||
* `#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 }`
|
||||
* 参考として、キーボードで使われていないピン
|
||||
* `#define MATRIX_HAS_GHOST`
|
||||
* マトリックスにゴーストがあるか(ありそうにないか)定義します
|
||||
* `#define DIODE_DIRECTION COL2ROW`
|
||||
* COL2ROW あるいは ROW2COL - マトリックスがどのように設定されているか。COL2ROW は、スイッチとロウ(行)ラインの間にダイオードが黒い印をロウ(行)ラインに向けて置いてあることを意味します。
|
||||
* `#define DIRECT_PINS { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }`
|
||||
* ロウ(行)ラインとカラム(列)ラインにマップされているピンを左から右に。各スイッチが個別のピンとグラウンドに接続されているマトリックスを定義します。
|
||||
* `#define AUDIO_VOICES`
|
||||
* (循環させるために)代替音声を有効にします
|
||||
* `#define C4_AUDIO`
|
||||
* ピン C4 のオーディオを有効にします
|
||||
* `#define C5_AUDIO`
|
||||
* ピン C5 のオーディオを有効にします
|
||||
* `#define C6_AUDIO`
|
||||
* ピン C6 のオーディオを有効にします
|
||||
* `#define B5_AUDIO`
|
||||
* ピン B5 のオーディオを有効にします (C[4-6]\_AUDIO の1つとともに B[5-7]\_AUDIO の1つが有効にされている場合、疑似ステレオが有効にされます)
|
||||
* `#define B6_AUDIO`
|
||||
* ピン B6 のオーディオを有効にします (C[4-6]\_AUDIO の1つとともに B[5-7]\_AUDIO の1つが有効にされている場合、疑似ステレオが有効にされます)
|
||||
* `#define B7_AUDIO`
|
||||
* ピン B7 のオーディオを有効にします (C[4-6]\_AUDIO の1つとともに B[5-7]\_AUDIO の1つが有効にされている場合、疑似ステレオが有効にされます)
|
||||
* `#define BACKLIGHT_PIN B7`
|
||||
* バックライトのピン
|
||||
* `#define BACKLIGHT_LEVELS 3`
|
||||
* バックライトのレベル数 (off を除いて最大15)
|
||||
* `#define BACKLIGHT_BREATHING`
|
||||
* バックライトのブレスを有効にします
|
||||
* `#define BREATHING_PERIOD 6`
|
||||
* 1つのバックライトの "ブレス" の長さの秒数
|
||||
* `#define DEBOUNCE 5`
|
||||
* ピンの値を読み取る時の遅延 (5がデフォルト)
|
||||
* `#define LOCKING_SUPPORT_ENABLE`
|
||||
* メカニカルロックのサポート。キーマップで KC_LCAP、 KC_LNUM そして KC_LSCR を使えるようにします
|
||||
* `#define LOCKING_RESYNC_ENABLE`
|
||||
* キーボードの LED の状態をスイッチの状態と一致させ続けようとします
|
||||
* `#define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)`
|
||||
* マジックコマンドの使用を可能にするキーの組み合わせ (デバッグに便利です)
|
||||
* `#define USB_MAX_POWER_CONSUMPTION 500`
|
||||
* デバイスの USB 経由の最大電力(mA) を設定します (デフォルト: 500)
|
||||
* `#define USB_POLLING_INTERVAL_MS 10`
|
||||
* キーボード、マウス および 共有 (NKRO/メディアキー) インタフェースのための USB ポーリングレートをミリ秒で設定します
|
||||
* `#define F_SCL 100000L`
|
||||
* I2C を使用するキーボードのための I2C クロックレート速度を設定します。デフォルトは `400000L` ですが、`split_common` を使っているキーボードは別でデフォルトは `100000L` です。
|
||||
|
||||
## 無効にできる機能
|
||||
|
||||
これらのオプションを定義すると、関連する機能が無効になり、コードサイズを節約できます。
|
||||
|
||||
* `#define NO_DEBUG`
|
||||
* デバッグを無効にします
|
||||
* `#define NO_PRINT`
|
||||
* hid_listen を使った出力やデバッグを無効にします
|
||||
* `#define NO_ACTION_LAYER`
|
||||
* レイヤーを無効にします
|
||||
* `#define NO_ACTION_TAPPING`
|
||||
* タップダンスと他のタップ機能を無効にします
|
||||
* `#define NO_ACTION_ONESHOT`
|
||||
* ワンショットモディファイアを無効にします
|
||||
* `#define NO_ACTION_MACRO`
|
||||
* 古い形式のマクロ処理を無効にします: MACRO() & action_get_macro
|
||||
* `#define NO_ACTION_FUNCTION`
|
||||
* fn_actions 配列(非推奨)からの action_function() の呼び出しを無効にします
|
||||
|
||||
## 有効にできる機能
|
||||
|
||||
これらのオプションを定義すると、関連する機能が有効になり、コードサイズが大きくなるかもしれません。
|
||||
|
||||
* `#define FORCE_NKRO`
|
||||
* NKRO をデフォルトでオンにする必要があります。これにより EEPROM の設定に関係なく、キーボードの起動時に NKRO が強制的にオンになります。NKRO は引き続きオフにできますが、キーボードを再起動すると再びオンになります。
|
||||
* `#define STRICT_LAYER_RELEASE`
|
||||
* キーリリースがどのレイヤーから来たのかを覚えるのではなく、現在のレイヤースタックを使って強制的に評価されるようにします (高度なケースに使われます)
|
||||
|
||||
## 設定可能な挙動
|
||||
|
||||
* `#define TAPPING_TERM 200`
|
||||
* タップがホールドになるまでの時間。500以上に設定された場合、タップ期間中にタップされたキーもホールドになります。(訳注: PERMISSIVE_HOLDも参照)
|
||||
* `#define TAPPING_TERM_PER_KEY`
|
||||
* キーごとの `TAPPING_TERM` 設定の処理を有効にします
|
||||
* `#define RETRO_TAPPING`
|
||||
* 押下とリリースの間に他のキーによる中断がなければ、TAPPING_TERM の後であってもとにかくタップします
|
||||
* 詳細は [Retro Tapping](ja/feature_advanced_keycodes.md#retro-tapping) を見てください
|
||||
* `#define TAPPING_TOGGLE 2`
|
||||
* トグルを引き起こす前のタップ数
|
||||
* `#define PERMISSIVE_HOLD`
|
||||
* `TAPPING_TERM` にヒットしていなくても、リリースする前に別のキーが押されると、タップとフォールドキーがホールドを引き起こします
|
||||
* 詳細は [Permissive Hold](ja/feature_advanced_keycodes.md#permissive-hold) を見てください
|
||||
* `#define IGNORE_MOD_TAP_INTERRUPT`
|
||||
* 両方のキーに `TAPPING_TERM` を適用することで、ホールド時に他のキーに変換するキーを使ってローリングコンボ (zx) をすることができるようにします
|
||||
* 詳細は [Mod tap interrupt](ja/feature_advanced_keycodes.md#ignore-mod-tap-interrupt) を見てください
|
||||
* `#define TAPPING_FORCE_HOLD`
|
||||
* タップされた直後に、デュアルロールキーを修飾子として使用できるようにします
|
||||
* [Hold after tap](ja/feature_advanced_keycodes.md#tapping-force-hold)を見てください
|
||||
* タップトグル機能を無効にします (`TT` あるいは One Shot Tap Toggle)
|
||||
* `#define LEADER_TIMEOUT 300`
|
||||
* リーダーキーがタイムアウトするまでの時間
|
||||
* タイムアウトする前にシーケンスを終了できない場合は、タイムアウトの設定を増やす必要があるかもしれません。あるいは、`LEADER_PER_KEY_TIMING` オプションを有効にすると良いでしょう。これは各キーがタップされた後でタイムアウトを再設定します。
|
||||
* `#define LEADER_PER_KEY_TIMING`
|
||||
* 全体では無く各キーを押すたびに実行されるリーダーキーコードのタイマーを設定します
|
||||
* `#define LEADER_KEY_STRICT_KEY_PROCESSING`
|
||||
* Mod-Tap および Layer-Tap キーコードのためのキーコードフィルタリングを無効にします。例えば、これを有効にすると、`KC_A` を使いたい場合は `MT(MOD_CTL, KC_A)` を指定する必要があります。
|
||||
* `#define ONESHOT_TIMEOUT 300`
|
||||
* ワンショットがタイムアウトするまでの時間
|
||||
* `#define ONESHOT_TAP_TOGGLE 2`
|
||||
* ワンショットトグルが引き起こされるまでのタップ数
|
||||
* `#define QMK_KEYS_PER_SCAN 4`
|
||||
* 走査ごとに1つ以上のキーを送信できるようにします。デフォルトでは、走査ごとに `process_record()` 経由で1つのキーイベントのみが送信されます。これはほとんどのタイピングにほとんど影響しませんが、多くのコードを入力しているか、走査レートが最初から遅い場合、キーイベントの処理に多少の遅延が生じる可能性があります。それぞれのプレスとリリースは別のイベントです。スキャン時間が 1ms 程度のキーボードの場合、とても高速なタイピストでさえ、実際にキーボードから数 ms 以上の遅延を発生させるのに必要な 500 キーストロークを1秒間に生成することはないでしょう。しかし、3~4ms の走査時間でコードを入力している場合はどうでしょうか?おそらくこれが必要です。
|
||||
* `#define COMBO_COUNT 2`
|
||||
* [コンボ](ja/feature_combo.md)機能で使っているコンボの数にこれを設定します。
|
||||
* `#define COMBO_TERM 200`
|
||||
* コンボキーが検出されるまでの時間。定義されていない場合は、デフォルトは `TAPPING_TERM` です。
|
||||
* `#define TAP_CODE_DELAY 100`
|
||||
* 適切な登録に問題がある場合(VUSB ボードで珍しくない)、`register_code` と `unregister_code` の間の遅延を設定します。値はミリ秒です。
|
||||
* `#define TAP_HOLD_CAPS_DELAY 80`
|
||||
* MacOS で特別な処理が行われるため、`KC_CAPSLOCK` を使う時にタップホールドキー (`LT`, `MT`) に遅延を設定します。この値はミリ秒で、定義されていない場合はデフォルトは80msです。macOS については、これを200以上に設定すると良いでしょう。
|
||||
|
||||
## RGB ライト設定 :id=rgb-light-configuration
|
||||
|
||||
* `#define RGB_DI_PIN D7`
|
||||
* WS2812 の DI 端子につなぐピン
|
||||
* `#define RGBLIGHT_ANIMATIONS`
|
||||
* RGB アニメーションを実行します
|
||||
* `#define RGBLED_NUM 12`
|
||||
* LED の数
|
||||
* `#define RGBLIGHT_SPLIT`
|
||||
* 分割キーボードの左半分の RGB LED の出力を右半分の RGB LED の入力につなげるかわりに、それぞれの側で個別にコントローラの出力ピンが直接 RGB LED の入力に繋がっているときは、この定義が必要です。
|
||||
* `#define RGBLED_SPLIT { 6, 6 }`
|
||||
* 分割キーボードの各半分の `RGB_DI_PIN` に直接配線されている接続されているLEDの数
|
||||
* 最初の値は左半分の LED の数を示し、2番目の値は右半分です。
|
||||
* RGBLED_SPLIT が定義されている場合、RGBLIGHT_SPLIT は暗黙的に定義されます。
|
||||
* `#define RGBLIGHT_HUE_STEP 12`
|
||||
* 色相の増減時のステップ単位
|
||||
* `#define RGBLIGHT_SAT_STEP 25`
|
||||
* 彩度の増減時のステップ単位
|
||||
* `#define RGBLIGHT_VAL_STEP 12`
|
||||
* 値(明度)の増減時のステップ単位
|
||||
* `#define RGBW`
|
||||
* RGBW LED のサポートを有効にします
|
||||
|
||||
## マウスキーオプション
|
||||
|
||||
* `#define MOUSEKEY_INTERVAL 20`
|
||||
* `#define MOUSEKEY_DELAY 0`
|
||||
* `#define MOUSEKEY_TIME_TO_MAX 60`
|
||||
* `#define MOUSEKEY_MAX_SPEED 7`
|
||||
* `#define MOUSEKEY_WHEEL_DELAY 0`
|
||||
|
||||
## 分割キーボードオプション
|
||||
|
||||
分割キーボード固有のオプション。あなたの rules.mk に 'SPLIT_KEYBOARD = yes' が有ることを確認してください。
|
||||
|
||||
* `SPLIT_TRANSPORT = custom`
|
||||
* 標準の分割通信ルーチンをカスタムのものに置き換えることができます。現在、ARM ベースの分割キーボードはこれを使わなければなりません。
|
||||
|
||||
### 左右の設定
|
||||
|
||||
一つ覚えておかなければならないことは、USB ポートが接続されている側が常にマスター側であるということです。USB に接続されていない側はスレーブです。
|
||||
|
||||
分割キーボードの左右を設定するには、幾つかの異なる方法があります (優先度の順にリストされています):
|
||||
|
||||
1. `SPLIT_HAND_PIN` を設定します: 左右を決定するためにピンを読み込みます。ピンが high の場合、それが左側です。low であれば、その半分側が右側であると決定されます。
|
||||
2. `EE_HANDS` を設定し、各半分に `eeprom-lefthand.eep`/`eeprom-righthand.eep` を書き込みます
|
||||
* DFU ブートローダを搭載したボードでは、これらの EEPROM ファイルを書き込むために `:dfu-split-left`/`:dfu-split-right` を使うことができます
|
||||
* Caterina ブートローダを搭載したボード (標準的な Pro Micros など)では、`:avrdude-split-left`/`:avrdude-split-right` を使ってください
|
||||
* ARM DFU ブートローダを搭載したボード (Proton C など)では、`:dfu-util-split-left`/`:dfu-util-split-right` を使ってください
|
||||
3. `MASTER_RIGHT` を設定します: USBポートに差し込まれた側はマスター側で右側であると決定されます(デフォルトの逆)
|
||||
4. デフォルト: USB ポートに差し込まれている側がマスター側であり、左側であると見なされます。スレーブ側は右側です
|
||||
|
||||
#### 左右を定義します
|
||||
|
||||
* `#define SPLIT_HAND_PIN B7`
|
||||
* high/low ピンを使って左右を決定します。low = 右手、high = 左手。`B7` を使っているピンに置き換えます。これはオプションで、`SPLIT_HAND_PIN` が未定義のままである場合、EE_HANDS メソッドまたは標準の Let's Splitが使っている MASTER_LEFT / MASTER_RIGHT 定義をまだ使うことができます。
|
||||
|
||||
* `#define EE_HANDS` (`SPLIT_HAND_PIN` が定義されていない場合のみ動作します)
|
||||
* `eeprom-lefthand.eep`/`eeprom-righthand.eep` がそれぞれの半分に書き込まれた後で、EEPROM 内に格納されている左右の設定の値を読み込みます。
|
||||
|
||||
* `#define MASTER_RIGHT`
|
||||
* マスター側が右側と定義されます。
|
||||
|
||||
### 他のオプション
|
||||
|
||||
* `#define USE_I2C`
|
||||
* Serial の代わりに I2C を使う場合 (デフォルトは serial)
|
||||
|
||||
* `#define SOFT_SERIAL_PIN D0`
|
||||
* serial を使う場合、これを定義します。`D0` あるいは `D1`,`D2`,`D3`,`E6`。
|
||||
|
||||
* `#define MATRIX_ROW_PINS_RIGHT { <row pins> }`
|
||||
* `#define MATRIX_COL_PINS_RIGHT { <col pins> }`
|
||||
* 右半分に左半分と異なるピン配置を指定したい場合は、`MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT` を定義することができます。現在のところ、`MATRIX_ROW_PINS` のサイズは `MATRIX_ROW_PINS_RIGHT` と同じでなければならず、列の定義も同様です。
|
||||
|
||||
* `#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }`
|
||||
* 右半分に左半分と異なる直接ピン配置を指定したい場合は、`DIRECT_PINS_RIGHT` を定義することができます。現在のところ、`DIRECT_PINS` のサイズは `DIRECT_PINS_RIGHT` と同じでなければなりません。
|
||||
|
||||
* `#define RGBLED_SPLIT { 6, 6 }`
|
||||
* [RGB ライト設定](#rgb-light-configuration)を見てください。
|
||||
|
||||
* `#define SELECT_SOFT_SERIAL_SPEED <speed>` (デフォルトの速度は1です)
|
||||
* serial 通信を使う時のプロトコルの速度を設定します。
|
||||
* 速度:
|
||||
* 0: 約189kbps (実験目的のみ)
|
||||
* 1: 約 137kbps (デフォルト)
|
||||
* 2: 約 75kbps
|
||||
* 3: 約 39kbps
|
||||
* 4: 約 26kbps
|
||||
* 5: 約 20kbps
|
||||
|
||||
* `#define SPLIT_USB_DETECT`
|
||||
* マスタ/スレーブを委任する時に(タイムアウト付きで) USB 接続を検出します
|
||||
* ARM についてはデフォルトの挙動
|
||||
* AVR Teensy については必須
|
||||
|
||||
* `#define SPLIT_USB_TIMEOUT 2500`
|
||||
* `SPLIT_USB_DETECT` を使う時のマスタ/スレーブを検出する場合の最大タイムアウト
|
||||
|
||||
# `rules.mk` ファイル
|
||||
|
||||
これは、トップレベルの `Makefile` から include される [make](https://www.gnu.org/software/make/manual/make.html) ファイルです。これは特定の機能を有効または無効にするだけでなく、コンパイルする MCU に関する情報を設定するために使われます。
|
||||
|
||||
## ビルドオプション
|
||||
|
||||
* `DEFAULT_FOLDER`
|
||||
* キーボードに1つ以上のサブフォルダがある場合にデフォルトのフォルダを指定するために使われます。
|
||||
* `FIRMWARE_FORMAT`
|
||||
* ビルドの後でルート `qmk_firmware` フォルダにコピーされる形式 (bin, hex) を定義します。
|
||||
* `SRC`
|
||||
* コンパイル・リンクリストにファイルを追加するために使われます。
|
||||
* `LAYOUTS`
|
||||
* このキーボードがサポートする[レイアウト](ja/feature_layouts.md)のリスト
|
||||
|
||||
## AVR MCU オプション
|
||||
* `MCU = atmega32u4`
|
||||
* `F_CPU = 16000000`
|
||||
* `ARCH = AVR8`
|
||||
* `F_USB = $(F_CPU)`
|
||||
* `OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT`
|
||||
* `BOOTLOADER = atmel-dfu` と以下のオプション:
|
||||
* `atmel-dfu`
|
||||
* `lufa-dfu`
|
||||
* `qmk-dfu`
|
||||
* `halfkay`
|
||||
* `caterina`
|
||||
* `bootloadHID`
|
||||
* `USBasp`
|
||||
|
||||
## 機能オプション
|
||||
|
||||
これらを使って特定の機能のビルドを有効または無効にします。有効にすればするほどファームウェアが大きくなり、MCU には大きすぎるファームウェアを構築するリスクがあります。
|
||||
|
||||
* `BOOTMAGIC_ENABLE`
|
||||
* 仮想 DIP スイッチ設定
|
||||
* `MOUSEKEY_ENABLE`
|
||||
* マウスキー
|
||||
* `EXTRAKEY_ENABLE`
|
||||
* オーディオ制御とシステム制御
|
||||
* `CONSOLE_ENABLE`
|
||||
* デバッグ用コンソール
|
||||
* `COMMAND_ENABLE`
|
||||
* デバッグ及び設定用のコマンド
|
||||
* `COMBO_ENABLE`
|
||||
* キーコンボ機能
|
||||
* `NKRO_ENABLE`
|
||||
* USB N-キーロールオーバー - これが動作しない場合は、ここを見てください: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
* `AUDIO_ENABLE`
|
||||
* オーディオサブシステムを有効にします。
|
||||
* `RGBLIGHT_ENABLE`
|
||||
* キーボードアンダーライト機能を有効にします
|
||||
* `LEADER_ENABLE`
|
||||
* リーダーキーコードを有効にします
|
||||
* `MIDI_ENABLE`
|
||||
* MIDI 制御
|
||||
* `UNICODE_ENABLE`
|
||||
* Unicode
|
||||
* `BLUETOOTH_ENABLE`
|
||||
* Adafruit EZ-Key HID で Bluetooth を有効にするレガシーオプション。BLUETOOTH を見てください
|
||||
* `BLUETOOTH`
|
||||
* 現在のオプションは、AdafruitEzKey、AdafruitBLE、RN42
|
||||
* `SPLIT_KEYBOARD`
|
||||
* 分割キーボード (let's split や bakingpy のキーボードのようなデュアル MCU) のサポートを有効にし、quantum/split_common にある全ての必要なファイルをインクルードします
|
||||
* `CUSTOM_MATRIX`
|
||||
* 標準マトリックス走査ルーチンを独自のものに置き換えることができます。
|
||||
* `DEBOUNCE_TYPE`
|
||||
* 標準キーデバウンスルーチンを代替または独自のものに置き換えることができます。
|
||||
* `WAIT_FOR_USB`
|
||||
* キーボードが起動する前に、USB 接続が確立されるのをキーボードに待機させます
|
||||
* `NO_USB_STARTUP_CHECK`
|
||||
* キーボードの起動後の usb サスペンドチェックを無効にします。通常、キーボードはタスクが実行される前にホストがウェイク アップするのを待ちます。分割キーボードは半分はウェイクアップコールを取得できませんが、マスタにコマンドを送信する必要があるため、役に立ちます。
|
||||
* `LINK_TIME_OPTIMIZATION_ENABLE`
|
||||
* キーボードをコンパイルする時に、Link Time Optimization (`LTO`) を有効にします。これは処理に時間が掛かりますが、コンパイルされたサイズを大幅に減らします (そして、ファームウェアが小さいため、追加の時間は分からないくらいです)。ただし、`LTO` が有効な場合、古いマクロと関数の機能が壊れるため、自動的にこれらの機能を無効にします。これは `NO_ACTION_MACRO` と `NO_ACTION_FUNCTION` を自動的に定義することで行われます。
|
||||
* `LINK_TIME_OPTIMIZATION_ENABLE` の代わりに `LTO_ENABLE` を使うことができます。
|
||||
|
||||
## USB エンドポイントの制限
|
||||
|
||||
USB 経由でサービスを提供するために、QMK は USB エンドポイントを使う必要があります。
|
||||
これらは有限なリソースです: 各マイクロコントローラは特定の数しか持ちません。
|
||||
これは一緒に有効にできる機能を制限します。
|
||||
利用可能なエンドポイントを超えると、ビルドエラーをひきおこします。
|
||||
|
||||
以下の機能は個別のエンドポイントを必要とするかもしれません:
|
||||
|
||||
* `MOUSEKEY_ENABLE`
|
||||
* `EXTRAKEY_ENABLE`
|
||||
* `CONSOLE_ENABLE`
|
||||
* `NKRO_ENABLE`
|
||||
* `MIDI_ENABLE`
|
||||
* `RAW_ENABLE`
|
||||
* `VIRTSER_ENABLE`
|
||||
|
||||
エンドポイントの使用率を向上させるために、HID 機能を組み合わせて1つのエンドポイントを使うようにすることができます。
|
||||
デフォルトでは、`MOUSEKEY`、`EXTRAKEY` および `NKRO` が単一のエンドポイントに結合されます。
|
||||
|
||||
基本キーボード機能も、`KEYBOARD_SHARED_EP = yes` を設定することで同じエンドポイントに結合することができます。
|
||||
これによりもう1つのエンドポイントが解放されますが、一部の BIOS ではブートキーボードプロトコルの切り替えを実装しないため、キーボードが動作しなくなるかもしれません。
|
||||
|
||||
マウスの結合も、ブートマウス互換性を破壊します。
|
||||
この機能が必要な場合は、`MOUSE_SHARED_EP = no` を設定することで、マウスを結合しないようにすることができます。
|
173
docs/ja/contributing.md
Normal file
173
docs/ja/contributing.md
Normal file
@@ -0,0 +1,173 @@
|
||||
# 貢献方法
|
||||
|
||||
<!---
|
||||
original document: d598f01cb:contributing.md
|
||||
git diff d598f01cb HEAD contributing.md | cat
|
||||
-->
|
||||
|
||||
👍🎉 まず、これを読み貢献する時間を作ってくれてありがとうございます!🎉👍
|
||||
|
||||
サードパーティの貢献は、QMK の成長と改善に役立ちます。プルリクエストと貢献プロセスを貢献者とメンテナの両方にとって便利で簡単なものにしたいです。この目的のために、大きな変更をせずにプルリクエストが受け入れられるように貢献者向けのガイドラインをまとめました。
|
||||
|
||||
* [プロジェクトの概要](#project-overview)
|
||||
* [コーディング規約](#coding-conventions)
|
||||
* [一般的なガイドライン](#general-guidelines)
|
||||
* [行動規範は私にとって何を意味しますか?](#what-does-the-code-of-conduct-mean-for-me)
|
||||
|
||||
## この全てを読みたくはありません!単純に質問があります!
|
||||
|
||||
QMK について質問したい場合は、[OLKB Subreddit](https://reddit.com/r/olkb) あるいは [Discord](https://discord.gg/Uq7gcHh) ですることができます。
|
||||
|
||||
以下の事を覚えておいてください:
|
||||
|
||||
* 誰かがあなたの質問に答えるのに数時間掛かるかもしれません。しばらくお待ちください!
|
||||
* QMK に関わる全ての人が彼らの時間とエネルギーを提供しています。QMK に関する作業や質問への回答に対する報酬はありません。
|
||||
* できるだけ簡単に答えられるように質問してみてください。その方法が分からない場合は、以下に幾つかの良いガイドがあります:
|
||||
* https://opensource.com/life/16/10/how-ask-technical-questions
|
||||
* http://www.catb.org/esr/faqs/smart-questions.html
|
||||
|
||||
# プロジェクトの概要 :id=project-overview
|
||||
|
||||
QMK は主に C で書かれており、特定の機能と部品は C++ で書かれています。QMK は、キーボードの中の組み込みプロセッサ、特に AVR ([LUFA](http://www.fourwalledcubicle.com/LUFA.php)) と ARM ([ChibiOS](http://www.chibios.com)) を対象にしています。すでに Arduino プログラミングに精通している場合は、多くの概念と制限がおなじみのものです。QMK に貢献するには Arduino を使用した経験は必要ありません。
|
||||
|
||||
<!-- FIXME: We should include a list of resources for learning C here. -->
|
||||
|
||||
# どこで助けを得られますか?
|
||||
|
||||
助けが必要であれば、[issue を開く](https://github.com/qmk/qmk_firmware/issues) か [Discord で会話する](https://discord.gg/Uq7gcHh)ことができます。
|
||||
|
||||
# どうやって貢献することができますか?
|
||||
|
||||
以前にオープンソースに貢献したことはありませんか? QMK で貢献がどのように機能するかが疑問ですか? ここに簡単な説明があります!
|
||||
|
||||
0. [GitHub](https://github.com) アカウントにサインアップします。
|
||||
1. 貢献するためのキーマップをまとめるか、解決に興味がある[問題を見つける](https://github.com/qmk/qmk_firmware/issues)、あるいは追加したい[機能](https://github.com/qmk/qmk_firmware/issues?q=is%3Aopen+is%3Aissue+label%3Afeature)を見つけます。
|
||||
2. 問題に関連付けられているリポジトリをあなたの GitHub アカウントにフォークします。これは、`GitHub上のあなたのユーザー名/qmk_firmware` の下にリポジトリのコピーを持つことを意味します。
|
||||
3. `git clone https://github.com/GitHub上のあなたのユーザー名/repository-name.git` を使ってローカルマシンにリポジトリをクローンします。
|
||||
4. 新しい機能に取り組んでいる場合は、issue を開きこれから行う作業について話し合うことを検討してください。
|
||||
5. `git checkout -b branch-name-here` を使って修正用の新しいブランチを作成します。
|
||||
6. 解決しようとしている問題、あるいは追加したい機能について適切な変更を加えます。
|
||||
7. `git add insert-paths-of-changed-files-here` を使って変更されたファイルの内容を git がプロジェクトの状態を管理するために使用する "snapshot"、インデックスとしても知られている、に追加します。
|
||||
8. `git commit -m "Insert a short message of the changes made here"` を使って、説明的なメッセージとともにインデックスの内容を保存します。
|
||||
9. `git push origin branch-name-here` を使って GitHub 上のリポジトリに変更をプッシュします。
|
||||
10. プルリクエストを [QMK Firmware](https://github.com/qmk/qmk_firmware/pull/new/master) にサブミットします。
|
||||
11. 行われた変更の簡単な説明と、変更に関する問題またはバグ番号を使って、プルリクエストにタイトルを付けます。例えば、issue に "Added more log outputting to resolve #4352" のようなタイトルをつけることができます。
|
||||
12. プルリクエストの説明では、行った変更、行ったプルリクエストに存在すると思われる問題、およびメンテナに対する質問を説明します。プルリクエストが完ぺきではない場合(プルリクエストが無い場合)でも問題ありません。レビュワーが問題の修正と改善を手伝います。
|
||||
13. プルリクエストがメンテナによってレビューされるのを待ちます。
|
||||
14. レビューをしているメンテナが変更を推奨する場合は、プルリクエストに変更を加えます。
|
||||
15. プルリクエストがマージされた後で成功を祝います!
|
||||
|
||||
# コーディング規約 :id=coding-conventions
|
||||
|
||||
私たちのスタイルのほとんどは簡単に理解できます。C あるいは Python のいずれかに精通している場合は、ローカルスタイルにそれほど問題はないはずです。
|
||||
|
||||
* [コーディング規約 - C](ja/coding_conventions_c.md)
|
||||
* [コーディング規約 - Python](ja/coding_conventions_python.md)
|
||||
|
||||
# 一般的なガイドライン :id=general-guidelines
|
||||
|
||||
QMK には幾つかの異なるタイプの変更があり、それぞれ異なるレベルの厳密さが必要です。どのような種類の変更を行っても、次のガイドラインに留意してください。
|
||||
|
||||
* PR を論理単位に分割します。例えば、2つの個別の機能をカバーする1つの PR を送信するのではなく、代わりに機能ごとに個別の PR をサブミットします。
|
||||
* コミットする前に、`git diff --check` を使って不要な空白を確認します。
|
||||
* コードの変更が実際にコンパイルされることを確認してください。
|
||||
* キーマップ: `make keyboard:your_new_keymap` がエラーを返さないことを確認してください。
|
||||
* キーボード: `make keyboard:all` がエラーを返さないことを確認してください。
|
||||
* コア: `make all` がエラーを返さないことを確認してください。
|
||||
* コミットメッセージがそれ自体で理解できることを確認してください。最初の行に短い説明(70文字以内)を入れ、2行目は空にし、3行目以降では必要に応じてコミットを詳細に説明する必要があります。例:
|
||||
|
||||
```
|
||||
kerpleplork の fronzlebop を調整します
|
||||
|
||||
kerpleplork はエラーコード 23 で連続的に失敗していました。根本的な原因は fronzlebop 設定で、これにより kerpleplork はN回の繰り返しごとにアクティブになります。
|
||||
|
||||
私が使用できるデバイスの限られた実験では、kerpleplork の混乱を避けるために 7 は十分高い値であることを示していますが、念のため ARM デバイスを持つ人たちからフィードバックを得たいです。
|
||||
```
|
||||
|
||||
!> **重要:** デフォルト以外のキーマップ、ユーザスペースおよびレイアウトのようなユーザコードへのバグ修正あるいは改善に貢献したい場合は、PR にコードの元の提出者にタグをつけてください。Git と GitHub のスキルレベルに関係なく、多くのユーザは知らないうちにコードが変更されることに混乱したりイライラしたりするかもしれません。
|
||||
|
||||
## ドキュメント
|
||||
|
||||
ドキュメントは QMK への貢献を始める最も簡単な方法の1つです。ドキュメントが間違っているか不完全な場所を見つけ、これらを修正するのは簡単です!私たちもドキュメントを編集する人を非常に必要としています。編集するスキルがあるが、どこにどのように飛び乗ればいいのか分からない場合は、[助けをもとめて](#where-can-i-go-for-help)ください!
|
||||
|
||||
全てのドキュメントは `qmk_firmware/docs` ディレクトリの中にあります。あるいは web ベースのワークフローを使いたい場合は、http://docs.qmk.fm/ の各ページの上部にある "Suggest An Edit" をクリックすることができます。
|
||||
|
||||
ドキュメントの中にコードの例を提供する場合は、ドキュメント内の他の場所で使用されている命名規則を順守してください。例えば、一貫性を保つために、`my_layers` あるいは `my_keycodes` として列挙型を標準化します:
|
||||
|
||||
```c
|
||||
enum my_layers {
|
||||
_FIRST_LAYER,
|
||||
_SECOND_LAYER
|
||||
};
|
||||
|
||||
enum my_keycodes {
|
||||
FIRST_LAYER = SAFE_RANGE,
|
||||
SECOND_LAYER
|
||||
};
|
||||
```
|
||||
|
||||
### ドキュメントのプレビュー
|
||||
|
||||
開発環境をセットアップした場合は、プルリクエストを開く前に以下のコマンドを `qmk_firmware/` フォルダから実行することで、あなたの変更をプレビューすることができます:
|
||||
|
||||
./bin/qmk docs
|
||||
|
||||
または、Python 3 のみがインストールされている場合:
|
||||
|
||||
python3 -m http.server 8936
|
||||
|
||||
その後、ウェブブラウザで、`http://localhost:8936/` を表示します。
|
||||
|
||||
## キーマップ
|
||||
|
||||
ほとんどの初めての QMK 貢献者は、個人のキーマップから始めます。キーマップの標準はかなりカジュアルなものにしようとしています(キーマップは結局のところ作成者の性格を反映しています)が、他の人があなたのキーマップを簡単に見つけて学ぶことができるように、これらのガイドラインに従うようにお願いします。
|
||||
|
||||
* [the template](documentation_templates.md) を使って `readme.md` を書きます。
|
||||
* 全てのキーマップの PR は squash されるため、コミットがどのように squash されるかを気にする場合は、自分で行う必要があります。
|
||||
* キーマップの PR に機能をまとめないでください。最初に機能をサブミットし、次にキーマップのための2つ目の PR をサブミットします。
|
||||
* `Makefile` をキーマップフォルダに含めないでください(もう使われていません)。
|
||||
* ファイルヘッダの著作権を更新します (`%YOUR_NAME%` を探します)
|
||||
|
||||
## キーボード
|
||||
|
||||
キーボードは QMK の存在理由です。一部のキーボードはコミュニティによって管理されていますが、他のキーボードはそれぞれのキーボードを作成する責任者によって管理されています。`readme.md` を見るとそのキーボードを管理しているのが誰かが分かります。特定のキーボードに関する質問がある場合、[Issue を開いて](https://github.com/qmk/qmk_firmware/issues)質問にメンテナをタグ付けしてください。(訳注: タグ付け は [メンションする](https://help.github.com/ja/github/writing-on-github/basic-writing-and-formatting-syntax#mentioning-people-and-teams) という意味です。)
|
||||
|
||||
また以下のガイドラインに従うことをお願いします:
|
||||
|
||||
* [the template](ja/documentation_templates.md) を使って `readme.md` を書きます。
|
||||
* コミットの数を適切に保ってください。そうでなければあなたの PR を squash します。
|
||||
* コア機能を新しいキーボードにまとめないでください。最初に機能をサブミットし、次にキーボード用に別の PR をサブミットしてください。
|
||||
* `.c`/`.h` ファイルにすぐ上の親フォルダに従って名前を付けます。例えば、`/keyboards/<kb1>/<kb2>/<kb2>.[ch]`
|
||||
* `Makefile` をキーボードフォルダに含めないでください(もう使われていません)
|
||||
* ファイルヘッダの著作権を更新します (`%YOUR_NAME%` を探します)
|
||||
|
||||
## Quantum/TMK コア
|
||||
|
||||
新しい機能をビルドするために多くの作業を行う前に、最適な方法で実装していることを確認する必要があります。[QMK の理解](ja/understanding_qmk.md)を読むことで、QMK の基本的な理解を得ることができます。これはあなたを QMK のプログラムフローのツアーに連れて行きます。ここから、あなたのアイデアを実装するための最良の方法の感覚をつかむために、私たちと話す必要があります。これを行うには主に2つの方法があります:
|
||||
|
||||
* [Discord でのチャット](https://discord.gg/Uq7gcHh)
|
||||
* [Issue を開く](https://github.com/qmk/qmk_firmware/issues/new)
|
||||
|
||||
機能とバグ修正の PR は全てのキーボードに影響します。また、私たちは QMK の再編も進めています。このため、実装が行われる前に特に重要な変更について議論することが特に重要です。最初に私たちと話をせずに PR を開いた場合、あなたの選択が私たちの計画した方向とうまく合わない場合は幾つかの大きな再作業を行う覚悟をしてください。
|
||||
|
||||
機能やバグの修正に取り組む時に留意すべき幾つかの事があります。
|
||||
|
||||
* **デフォルトで無効** - QMK がサポートするほとんどのチップでメモリがかなり制限されており、現在のキーマップが壊れていないことが重要です。ですので、あなたの機能をオフにするのではなく**オン**にするようにしてください。デフォルトでオンにすべき場合、あるいはコードのサイズを小さくする必要がある場合は、相談してください。
|
||||
* **サブミットする前にローカルでコンパイル** - これが明白であることを願っていますが、コンパイルする必要があります。私たちの Travis システムは全ての問題をキャッチしますが、結果が返ってくるのを待つ代わりに幾つかのキーボードをローカルでコンパイルする方が一般的に速いです。
|
||||
* **リビジョンと異なるチップベースを考慮** - 僅かに異なる設定、さらには異なるチップベースを可能にするリビジョンを持つキーボードが幾つかあります。ARM および AVR でサポートされる機能を作成する、あるいは動作しないプラットフォームでは自動的に無効化するようにしてください。
|
||||
* **機能の説明** - 新しいファイルあるいは既存のファイルの一部として、`docs/` の中に文章化します。文章化しないと、他の人はあなたの苦労から利益を得ることができません。
|
||||
|
||||
また以下のガイドラインに従うことをお願いします:
|
||||
|
||||
* コミットの数を適切に保ってください。そうでなければあなたの PR を squash します。
|
||||
* キーボードあるいはキーマップをコアの変更にまとめないでください。コアの変更を最初にサブミットしてください。
|
||||
* 機能のための[ユニット テスト](ja/unit_testing.md)を書いてください。
|
||||
* 編集しているファイルのスタイルに従ってください。スタイルが明確でないか、スタイルが混在している場合は、上記の[コーディング規約](#coding-conventions)に準拠する必要があります。
|
||||
|
||||
## リファクタリング
|
||||
|
||||
QMK で物事がどのようにレイアウトされるかについて明確なビジョンを維持するために、私たちはリファクタリングを詳細に計画し、変更をする協力者がいます。リファクタリングのアイデアあるいは提案がある場合は、[issue を開いてください](https://github.com/qmk/qmk_firmware/issues)。QMK を改善する方法についてお話ししたいと思います。
|
||||
|
||||
# 行動規範は私にとって何を意味しますか? :id=what-does-the-code-of-conduct-mean-for-me
|
||||
|
||||
私たちの[行動規範](https://github.com/qmk/qmk_firmware/blob/master/CODE_OF_CONDUCT.md)は、身元に関係なくあなたがプロジェクトの全員を敬意と礼儀を持って扱う責任があることを意味します。あなたが行動規範に記載されている不適切な行動やコメントの被害者である場合は、私たちはあなたのためにここにおり、私たちのコードに従って虐待者が適切に懲戒されるように最善を尽くします。
|
20
docs/ja/getting_started_getting_help.md
Normal file
20
docs/ja/getting_started_getting_help.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# 助けを得る
|
||||
|
||||
<!---
|
||||
original document: d598f01cb:getting_started_getting_help.md
|
||||
git diff d598f01cb HEAD getting_started_getting_help.md | cat
|
||||
-->
|
||||
|
||||
QMK に関して助けを得るための多くのリソースがあります。
|
||||
|
||||
## リアルタイム チャット
|
||||
|
||||
メインの [Discord server](https://discord.gg/Uq7gcHh) で QMK の開発者とユーザを見つけることができます。サーバには、ファームウェア、Toolbox、ハードウェアおよび Configurator についてチャットするための特定のチャンネルがあります。
|
||||
|
||||
## OLKB Subreddit
|
||||
|
||||
公式の QMK フォーラムは [reddit.com](https://reddit.com) の [/r/olkb](https://reddit.com/r/olkb) です。
|
||||
|
||||
## Github Issues
|
||||
|
||||
[GitHub で issue](https://github.com/qmk/qmk_firmware/issues) を開くことができます。issue が長期的な議論あるいはデバッグを必要とする場合は、特に便利です。
|
64
docs/ja/getting_started_github.md
Normal file
64
docs/ja/getting_started_github.md
Normal file
@@ -0,0 +1,64 @@
|
||||
# QMK で Github を使う方法
|
||||
|
||||
<!---
|
||||
original document: d598f01cb:getting_started_github.md
|
||||
git diff d598f01cb HEAD getting_started_github.md | cat
|
||||
-->
|
||||
|
||||
Github は慣れていない人には少し注意が必要です - このガイドは、QMK におけるフォーク、クローン、プルリクエストのサブミットの各ステップについて説明します。
|
||||
|
||||
?> このガイドでは、あなたがコマンドラインでの実行にある程度慣れており、システムに git がインストールされていることを前提にしています。
|
||||
|
||||
[QMK Github ページ](https://github.com/qmk/qmk_firmware)を開くと、右上に "Fork" というボタンが見えます:
|
||||
|
||||

|
||||
|
||||
あなたが組織の一員である場合は、どのアカウントにフォークするかを選択する必要があります。ほとんどの場合、あなたの個人のアカウントにフォークしたいでしょう。フォークが完了したら(しばらく時間が掛かる場合があります)、"Clone or Download" ボタンをクリックします:
|
||||
|
||||

|
||||
|
||||
必ず "HTTPS" を選択し、リンクを選択してコピーします:
|
||||
|
||||

|
||||
|
||||
ここから、`git clone` をコマンドラインに入力し、リンクを貼り付けます:
|
||||
|
||||
```
|
||||
user@computer:~$ git clone --recurse-submodules https://github.com/whoeveryouare/qmk_firmware.git
|
||||
Cloning into 'qmk_firmware'...
|
||||
remote: Counting objects: 46625, done.
|
||||
remote: Compressing objects: 100% (2/2), done.
|
||||
remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623
|
||||
Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done.
|
||||
Resolving deltas: 100% (29362/29362), done.
|
||||
Checking out files: 100% (2799/2799), done.
|
||||
```
|
||||
|
||||
ローカルマシンに QMK のフォークができるので、キーマップの追加、コンパイル、キーボードへの書き込みができます。変更に満足したら、以下のようにそれらをフォークへ追加、コミットおよびプッシュすることができます:
|
||||
|
||||
```
|
||||
user@computer:~$ git add .
|
||||
user@computer:~$ git commit -m "adding my keymap"
|
||||
[master cccb1608] adding my keymap
|
||||
1 file changed, 1 insertion(+)
|
||||
create mode 100644 keyboards/planck/keymaps/mine/keymap.c
|
||||
user@computer:~$ git push
|
||||
Counting objects: 1, done.
|
||||
Delta compression using up to 4 threads.
|
||||
Compressing objects: 100% (1/1), done.
|
||||
Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done.
|
||||
Total 1 (delta 1), reused 0 (delta 0)
|
||||
remote: Resolving deltas: 100% (1/1), completed with 1 local objects.
|
||||
To https://github.com/whoeveryouare/qmk_firmware.git
|
||||
+ 20043e64...7da94ac5 master -> master
|
||||
```
|
||||
|
||||
あなたの変更は今では Github 上のフォークにあります - フォーク (`https://github.com/<whoeveryouare>/qmk_firmware`)に戻ると、"New Pull Request" ボタンをクリックすることで新しいプルリクエストを作成することができます:
|
||||
|
||||

|
||||
|
||||
ここでは、コミットした内容を正確に確認することができます - 全て良いように見える場合は、"Create Pull Request" をクリックすることで最終的に承認することができます:
|
||||
|
||||

|
||||
|
||||
サブミットの後で、私たちはあなたの変更について話し、変更を依頼し、最終的にそれを受け入れるでしょう!QMK に貢献してくれてありがとう :)
|
65
docs/ja/getting_started_introduction.md
Normal file
65
docs/ja/getting_started_introduction.md
Normal file
@@ -0,0 +1,65 @@
|
||||
# はじめに
|
||||
|
||||
<!---
|
||||
original document: d598f01cb:getting_started_introduction.md
|
||||
git diff d598f01cb HEAD getting_started_introduction.md | cat
|
||||
-->
|
||||
|
||||
このページでは、QMK プロジェクトで作業するために知っておくべき基本的な情報について説明しようと思います。Unix シェルの操作に精通していることを前提としていますが、C について、または make を使ったコンパイルについて精通しているとは想定していません。
|
||||
|
||||
## 基本的な QMK の構造
|
||||
|
||||
QMK は [Jun Wako](https://github.com/tmk) の [tmk_keyboard](https://github.com/tmk/tmk_keyboard) プロジェクトのフォークです。変更された元の TMK コードは、`tmk_core` フォルダで見つけることができます。プロジェクトへの QMK の追加は、`quantum` フォルダで見つけることができます。キーボードプロジェクトは `handwired` および `keyboard` フォルダで見つけることができます。
|
||||
|
||||
### ユーザスペースの構造
|
||||
|
||||
`users` フォルダ内は各ユーザのためのディレクトリです。これはユーザがキーボード間で使うかもしれないコードを置くためのフォルダです。詳細は[ユーザスペース機能](ja/feature_userspace.md) のドキュメントを見てください。
|
||||
|
||||
### キーボードプロジェクトの構造
|
||||
|
||||
`keyboards` フォルダ、そのサブフォルダ `handwired`、ベンダと製品のサブディレクトリ (例えば、`clueboard`) の中には、各キーボードプロジェクトのためのディレクトリ (例えば `qmk_firmware/keyboards/clueboard/2x1800`) があります。その中には、以下の構造があります:
|
||||
|
||||
* `keymaps/`: ビルドできる様々なキーマップ
|
||||
* `rules.mk`: デフォルトの "make" オプションを設定するファイル。このファイルを直接編集しないでください。代わりにキーマップ固有の `rules.mk` を使ってください。
|
||||
* `config.h`: デフォルトのコンパイル時のオプションを設定するファイル。このファイルを直接編集しないでください。代わりにキーマップ固有の `config.h` を使ってください。
|
||||
* `info.json`: QMK Configurator のためのレイアウトの設定に使われるファイル。詳細は [Configurator サポート](ja/reference_configurator_support.md)を見てください。
|
||||
* `readme.md`: キーボードの簡単な概要
|
||||
* `<keyboardName>.h`: このファイルは、キーボードのスイッチマトリックスに対してキーボードレイアウトが定義されるファイルです。
|
||||
* `<keyboardName>.c`: このファイルには、キーボードのためのカスタムコードがあります。
|
||||
|
||||
プロジェクトの構造についての詳細は、[QMK キーボードガイドライン](ja/hardware_keyboard_guidelines.md)を見てください。
|
||||
|
||||
### キーマップ構造
|
||||
|
||||
全てのキーマップフォルダには、以下のファイルがあります。`keymap.c` だけが必須で、残りのファイルが見つからない場合は、デフォルトのオプションが選択されます。
|
||||
|
||||
* `config.h`: キーマップを設定するためのオプション
|
||||
* `keymap.c`: 全てのキーマップコード。必須
|
||||
* `rules.mk`: 有効になっている QMK の機能
|
||||
* `readme.md`: キーマップの説明。他の人が使う方法および機能の説明。imgur のようなサービスに画像をアップロードしてください。
|
||||
|
||||
# `config.h` ファイル
|
||||
|
||||
3つの `config.h` の場所が考えられます:
|
||||
|
||||
* キーボード (`/keyboards/<keyboard>/config.h`)
|
||||
* ユーザスペース (`/users/<user>/config.h`)
|
||||
* キーマップ (`/keyboards/<keyboard>/keymaps/<keymap>/config.h`)
|
||||
|
||||
ビルドシステムは自動的に上の順に config ファイルを取得します。前の `config.h` で設定された設定を上書きしたい場合は、変更したい設定の準備のために最初に定型コードを置く必要があります。
|
||||
|
||||
```
|
||||
#pragma once
|
||||
```
|
||||
|
||||
次に、前の `config.h` ファイルの設定を上書きするために、設定を `#undef` し再び `#define` する必要があります。
|
||||
|
||||
定型コードと設定は、以下のようになります:
|
||||
|
||||
```
|
||||
#pragma once
|
||||
|
||||
// ここに上書きします!
|
||||
#undef MY_SETTING
|
||||
#define MY_SETTING 4
|
||||
```
|
@@ -257,37 +257,37 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|
||||
## [Bootmagic](feature_bootmagic.md)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------------------------------|---------|-------------------------------------------|
|
||||
|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Caps Lock and Left Control |
|
||||
|`MAGIC_CAPSLOCK_TO_CONTROL` | |Treat Caps Lock as Control |
|
||||
|`MAGIC_SWAP_LCTL_LGUI` | |Swap Left Control and GUI |
|
||||
|`MAGIC_SWAP_RCTL_RGUI` | |Swap Right Control and GUI |
|
||||
|`MAGIC_SWAP_LALT_LGUI` | |Swap Left Alt and GUI |
|
||||
|`MAGIC_SWAP_RALT_RGUI` | |Swap Right Alt and GUI |
|
||||
|`MAGIC_NO_GUI` | |Disable the GUI key |
|
||||
|`MAGIC_SWAP_GRAVE_ESC` | |Swap <code>`</code> and Escape |
|
||||
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap `\` and Backspace |
|
||||
|`MAGIC_HOST_NKRO` | |Force NKRO on |
|
||||
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides |
|
||||
|`MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Ctrl and GUI on both sides (for macOS)|
|
||||
|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` | |Unswap Caps Lock and Left Control |
|
||||
|`MAGIC_UNCAPSLOCK_TO_CONTROL` | |Stop treating Caps Lock as Control |
|
||||
|`MAGIC_UNSWAP_LCTL_LGUI` | |Unswap Left Control and GUI |
|
||||
|`MAGIC_UNSWAP_RCTL_RGUI` | |Unswap Right Control and GUI |
|
||||
|`MAGIC_UNSWAP_LALT_LGUI` | |Unswap Left Alt and GUI |
|
||||
|`MAGIC_UNSWAP_RALT_RGUI` | |Unswap Right Alt and GUI |
|
||||
|`MAGIC_UNNO_GUI` | |Enable the GUI key |
|
||||
|`MAGIC_UNSWAP_GRAVE_ESC` | |Unswap <code>`</code> and Escape |
|
||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap `\` and Backspace |
|
||||
|`MAGIC_UNHOST_NKRO` | |Force NKRO off |
|
||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides |
|
||||
|`MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Ctrl and GUI on both sides |
|
||||
|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides |
|
||||
|`MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Ctrl and GUI swap on both sides |
|
||||
|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off |
|
||||
|`MAGIC_EE_HANDS_LEFT` | |Set "Left Hand" for EE_HANDS handedness |
|
||||
|`MAGIC_EE_HANDS_RIGHT` | |Set "Right Hand" for EE_HANDS handedness |
|
||||
|Key |Aliases |Description |
|
||||
|----------------------------------|---------|--------------------------------------------------------------------------|
|
||||
|`MAGIC_SWAP_CONTROL_CAPSLOCK` |`CL_SWAP`|Swap Caps Lock and Left Control |
|
||||
|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` |`CL_NORM`|Unswap Caps Lock and Left Control |
|
||||
|`MAGIC_CAPSLOCK_TO_CONTROL` |`CL_CTRL`|Treat Caps Lock as Control |
|
||||
|`MAGIC_UNCAPSLOCK_TO_CONTROL` |`CL_CAPS`|Stop treating Caps Lock as Control |
|
||||
|`MAGIC_SWAP_LCTL_LGUI` |`LCG_SWP`|Swap Left Control and GUI |
|
||||
|`MAGIC_UNSWAP_LCTL_LGUI` |`LCG_NRM`|Unswap Left Control and GUI |
|
||||
|`MAGIC_SWAP_RCTL_RGUI` |`RCG_SWP`|Swap Right Control and GUI |
|
||||
|`MAGIC_UNSWAP_RCTL_RGUI` |`RCG_NRM`|Unswap Right Control and GUI |
|
||||
|`MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Control and GUI on both sides |
|
||||
|`MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Control and GUI on both sides |
|
||||
|`MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Control and GUI swap on both sides |
|
||||
|`MAGIC_SWAP_LALT_LGUI` |`LAG_SWP`|Swap Left Alt and GUI |
|
||||
|`MAGIC_UNSWAP_LALT_LGUI` |`LAG_NRM`|Unswap Left Alt and GUI |
|
||||
|`MAGIC_SWAP_RALT_RGUI` |`RAG_SWP`|Swap Right Alt and GUI |
|
||||
|`MAGIC_UNSWAP_RALT_RGUI` |`RAG_NRM`|Unswap Right Alt and GUI |
|
||||
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides |
|
||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides |
|
||||
|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides |
|
||||
|`MAGIC_NO_GUI` |`GUI_OFF`|Disable the GUI keys |
|
||||
|`MAGIC_UNNO_GUI` |`GUI_ON` |Enable the GUI keys |
|
||||
|`MAGIC_SWAP_GRAVE_ESC` |`GE_SWAP`|Swap <code>`</code> and Escape |
|
||||
|`MAGIC_UNSWAP_GRAVE_ESC` |`GE_NORM`|Unswap <code>`</code> and Escape |
|
||||
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` |`BS_SWAP`|Swap `\` and Backspace |
|
||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|`BS_NORM`|Unswap `\` and Backspace |
|
||||
|`MAGIC_HOST_NKRO` |`NK_ON` |Enable N-key rollover |
|
||||
|`MAGIC_UNHOST_NKRO` |`NK_OFF` |Disable N-key rollover |
|
||||
|`MAGIC_TOGGLE_NKRO` |`NK_TOGG`|Toggle N-key rollover |
|
||||
|`MAGIC_EE_HANDS_LEFT` |`EH_LEFT`|Set the master half of a split keyboard as the left hand (for `EE_HANDS`) |
|
||||
|`MAGIC_EE_HANDS_RIGHT` |`EH_RGHT`|Set the master half of a split keyboard as the right hand (for `EE_HANDS`)|
|
||||
|
||||
## [Bluetooth](feature_bluetooth.md)
|
||||
|
||||
|
@@ -13,7 +13,7 @@ There are 7 main sections to this guide:
|
||||
* [Building Your First Firmware using the online GUI](newbs_building_firmware_configurator.md)
|
||||
* [Flashing Firmware](newbs_flashing.md)
|
||||
* [Testing and Debugging](newbs_testing_debugging.md)
|
||||
* [Git Best Practices](newbs_best_practices.md)
|
||||
* [Best Git Practices](newbs_git_best_practices.md)
|
||||
* [Learn More with these Resources](newbs_learn_more_resources.md)
|
||||
|
||||
This guide is focused on helping someone who has never compiled software before. It makes choices and recommendations based on that viewpoint. There are alternative methods for many of these procedures, and we support most of those alternatives. If you have any doubt about how to accomplish a task you can [ask us for guidance](getting_started_getting_help.md).
|
||||
|
@@ -1,163 +0,0 @@
|
||||
# Best Practices
|
||||
|
||||
## Or, "How I Learned to Stop Worrying and Love Git."
|
||||
|
||||
This document aims to instruct novices in the best ways to have a smooth experience in contributing to QMK. We will walk through the process of contributing to QMK, detailing some ways to make this task easier, and then later we'll break some things in order to teach you how to fix them.
|
||||
|
||||
This document assumes a few things:
|
||||
|
||||
1. You have a GitHub account, and have [forked the qmk_firmware repository](getting_started_github.md) to your account.
|
||||
2. You've [set up your build environment](newbs_getting_started.md#set-up-your-environment).
|
||||
|
||||
|
||||
## Your fork's master: Update Often, Commit Never
|
||||
|
||||
It is highly recommended for QMK development, regardless of what is being done or where, to keep your `master` branch updated, but ***never*** commit to it. Instead, do all your changes in a development branch and issue pull requests from your branches when you're developing.
|
||||
|
||||
To reduce the chances of merge conflicts — instances where two or more users have edited the same part of a file concurrently — keep your `master` branch relatively up-to-date, and start any new developments by creating a new branch.
|
||||
|
||||
### Updating your master branch
|
||||
|
||||
To keep your `master` branch updated, it is recommended to add the QMK Firmware repository ("repo") as a remote repository in git. To do this, open your Git command line interface and enter:
|
||||
|
||||
```
|
||||
git remote add upstream https://github.com/qmk/qmk_firmware.git
|
||||
```
|
||||
|
||||
To verify that the repository has been added, run `git remote -v`, which should return the following:
|
||||
|
||||
```
|
||||
$ git remote -v
|
||||
origin https://github.com/<your_username>/qmk_firmware.git (fetch)
|
||||
origin https://github.com/<your_username>/qmk_firmware.git (push)
|
||||
upstream https://github.com/qmk/qmk_firmware.git (fetch)
|
||||
upstream https://github.com/qmk/qmk_firmware.git (push)
|
||||
```
|
||||
|
||||
Now that this is done, you can check for updates to the repo by running `git fetch upstream`. This retrieves the branches and tags — collectively referred to as "refs" — from the QMK repo, which now has the nickname `upstream`. We can now compare the data on our fork `origin` to that held by QMK.
|
||||
|
||||
To update your fork's master, run the following, hitting the Enter key after each line:
|
||||
|
||||
```
|
||||
git checkout master
|
||||
git fetch upstream
|
||||
git pull upstream master
|
||||
git push origin master
|
||||
```
|
||||
|
||||
This switches you to your `master` branch, retrieves the refs from the QMK repo, downloads the current QMK `master` branch to your computer, and then uploads it to your fork.
|
||||
|
||||
### Making Changes
|
||||
|
||||
To make changes, create a new branch by entering:
|
||||
|
||||
```
|
||||
git checkout -b dev_branch
|
||||
git push --set-upstream origin dev_branch
|
||||
```
|
||||
|
||||
This creates a new branch named `dev_branch`, checks it out, and then saves the new branch to your fork. The `--set-upstream` argument tells git to use your fork and the `dev_branch` branch every time you use `git push` or `git pull` from this branch. It only needs to be used on the first push; after that, you can safely use `git push` or `git pull`, without the rest of the arguments.
|
||||
|
||||
!> With `git push`, you can use `-u` in place of `--set-upstream` — `-u` is an alias for `--set-upstream`.
|
||||
|
||||
You can name your branch nearly anything you want, though it is recommended to name it something related to the changes you are going to make.
|
||||
|
||||
By default `git checkout -b` will base your new branch on the branch that is checked out. You can base your new branch on an existing branch that is not checked out by adding the name of the existing branch to the command:
|
||||
|
||||
```
|
||||
git checkout -b dev_branch master
|
||||
```
|
||||
|
||||
Now that you have a development branch, open your text editor and make whatever changes you need to make. It is recommended to make many small commits to your branch; that way, any change that causes issues can be more easily traced and undone if needed. To make your changes, edit and save any files that need to be updated, add them to Git's *staging area*, and then commit them to your branch:
|
||||
|
||||
```
|
||||
git add path/to/updated_file
|
||||
git commit -m "My commit message."
|
||||
```
|
||||
|
||||
`git add` adds files that have been changed to Git's *staging area*, which is Git's "loading zone." This contains the changes that are going to be *committed* by `git commit`, which saves the changes to the repo. Use descriptive commit messages so you can know what was changed at a glance.
|
||||
|
||||
!> If you've changed a lot of files, but all the files are part of the same change, you can use `git add .` to add all the changed files that are in your current directory, rather than having to add each file individually.
|
||||
|
||||
### Publishing Your Changes
|
||||
|
||||
The last step is to push your changes to your fork. To do this, enter `git push`. Git now publishes the current state of `dev_branch` to your fork.
|
||||
|
||||
|
||||
## Resolving Merge Conflicts
|
||||
|
||||
Sometimes when your work in a branch takes a long time to complete, changes that have been made by others conflict with changes you have made to your branch when you open a pull request. This is called a *merge conflict*, and is what happens when multiple people edit the same parts of the same files.
|
||||
|
||||
### Rebasing Your Changes
|
||||
|
||||
A *rebase* is Git's way of taking changes that were applied at one point, reversing them, and then applying the same changes to another point. In the case of a merge conflict, you can rebase your branch to grab the changes that were made between when you created your branch and the present time.
|
||||
|
||||
To start, run the following:
|
||||
|
||||
```
|
||||
git fetch upstream
|
||||
git rev-list --left-right --count HEAD...upstream/master
|
||||
```
|
||||
|
||||
The `git rev-list` command entered here returns the number of commits that differ between the current branch and QMK's master branch. We run `git fetch` first to make sure we have the refs that represent the current state of the upstream repo. The output of the `git rev-list` command entered returns two numbers:
|
||||
|
||||
```
|
||||
$ git rev-list --left-right --count HEAD...upstream/master
|
||||
7 35
|
||||
```
|
||||
|
||||
The first number represents the number of commits on the current branch since it was created, and the second number is the number of commits made to `upstream/master` since the current branch was created, and thus, the changes that are not recorded in the current branch.
|
||||
|
||||
Now that the current states of both the current branch and the upstream repo are known, we can start a rebase operation:
|
||||
|
||||
```
|
||||
git rebase upstream/master
|
||||
```
|
||||
|
||||
This tells Git to undo the commits on the current branch, and then reapply them against QMK's master branch.
|
||||
|
||||
```
|
||||
$ git rebase upstream/master
|
||||
First, rewinding head to replay your work on top of it...
|
||||
Applying: Commit #1
|
||||
Using index info to reconstruct a base tree...
|
||||
M conflicting_file_1.txt
|
||||
Falling back to patching base and 3-way merge...
|
||||
Auto-merging conflicting_file_1.txt
|
||||
CONFLICT (content): Merge conflict in conflicting_file_1.txt
|
||||
error: Failed to merge in the changes.
|
||||
hint: Use 'git am --show-current-patch' to see the failed patch
|
||||
Patch failed at 0001 Commit #1
|
||||
|
||||
Resolve all conflicts manually, mark them as resolved with
|
||||
"git add/rm <conflicted_files>", then run "git rebase --continue".
|
||||
You can instead skip this commit: run "git rebase --skip".
|
||||
To abort and get back to the state before "git rebase", run "git rebase --abort".
|
||||
```
|
||||
|
||||
This tells us that we have a merge conflict, and gives the name of the file with the conflict. Open the conflicting file in your text editor, and somewhere in the file, you'll find something like this:
|
||||
|
||||
```
|
||||
<<<<<<< HEAD
|
||||
<p>For help with any issues, email us at support@webhost.us.</p>
|
||||
=======
|
||||
<p>Need help? Email support@webhost.us.</p>
|
||||
>>>>>>> Commit #1
|
||||
```
|
||||
|
||||
The line `<<<<<<< HEAD` marks the beginning of a merge conflict, and the `>>>>>>> Commit #1` line marks the end, with the conflicting sections separated by `=======`. The part on the `HEAD` side is from the QMK master version of the file, and the part marked with the commit message is from the current branch and commit.
|
||||
|
||||
Because Git tracks *changes to files* rather than the contents of the files directly, if Git can't find the text that was in the file previous to the commit that was made, it won't know how to edit the file. Re-editing the file will solve the conflict. Make your changes, and then save the file.
|
||||
|
||||
```
|
||||
<p>Need help? Email support@webhost.us.</p>
|
||||
```
|
||||
|
||||
Now run:
|
||||
|
||||
```
|
||||
git add conflicting_file_1.txt
|
||||
git rebase --continue
|
||||
```
|
||||
|
||||
Git logs the changes to the conflicting file, and continues applying the commits from our branch until it reaches the end.
|
16
docs/newbs_git_best_practices.md
Normal file
16
docs/newbs_git_best_practices.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Best Git Practices for Working with QMK
|
||||
|
||||
## Or, "How I Learned to Stop Worrying and Love Git."
|
||||
|
||||
This section aims to instruct novices in the best ways to have a smooth experience in contributing to QMK. We will walk through the process of contributing to QMK, detailing some ways to make this task easier, and then later we'll break some things in order to teach you how to fix them.
|
||||
|
||||
This section assumes a few things:
|
||||
|
||||
1. You have a GitHub account, and have [forked the qmk_firmware repository](getting_started_github.md) to your account.
|
||||
2. You've set up both [your build environment](newbs_getting_started.md#set-up-your-environment) and [QMK](newbs_getting_started.md#set-up-qmk).
|
||||
|
||||
---
|
||||
|
||||
- Part 1: [Your Fork's Master: Update Often, Commit Never](newbs_git_using_your_master_branch.md)
|
||||
- Part 2: [Resolving Merge Conflicts](newbs_git_resolving_merge_conflicts.md)
|
||||
- Part 3: [Resynchronizing an Out-of-Sync Git Branch](newbs_git_resynchronize_a_branch.md)
|
79
docs/newbs_git_resolving_merge_conflicts.md
Normal file
79
docs/newbs_git_resolving_merge_conflicts.md
Normal file
@@ -0,0 +1,79 @@
|
||||
# Resolving Merge Conflicts
|
||||
|
||||
Sometimes when your work in a branch takes a long time to complete, changes that have been made by others conflict with changes you have made to your branch when you open a pull request. This is called a *merge conflict*, and is what happens when multiple people edit the same parts of the same files.
|
||||
|
||||
?> This document builds upon the concepts detailed in [Your Fork's Master: Update Often, Commit Never](newbs_git_using_your_master_branch.md). If you are not familiar with that document, please read it first, then return here.
|
||||
|
||||
## Rebasing Your Changes
|
||||
|
||||
A *rebase* is Git's way of taking changes that were applied at one point in the commit history, reversing them, and then applying the same changes at another point. In the case of a merge conflict, you can rebase your branch to grab the changes that were made between when you created your branch and the present time.
|
||||
|
||||
To start, run the following:
|
||||
|
||||
```
|
||||
git fetch upstream
|
||||
git rev-list --left-right --count HEAD...upstream/master
|
||||
```
|
||||
|
||||
The `git rev-list` command entered here returns the number of commits that differ between the current branch and QMK's master branch. We run `git fetch` first to make sure we have the refs that represent the current state of the upstream repo. The output of the `git rev-list` command entered returns two numbers:
|
||||
|
||||
```
|
||||
$ git rev-list --left-right --count HEAD...upstream/master
|
||||
7 35
|
||||
```
|
||||
|
||||
The first number represents the number of commits on the current branch since it was created, and the second number is the number of commits made to `upstream/master` since the current branch was created, and thus, the changes that are not recorded in the current branch.
|
||||
|
||||
Now that the current states of both the current branch and the upstream repo are known, we can start a rebase operation:
|
||||
|
||||
```
|
||||
git rebase upstream/master
|
||||
```
|
||||
|
||||
This tells Git to undo the commits on the current branch, and then reapply them against QMK's master branch.
|
||||
|
||||
```
|
||||
$ git rebase upstream/master
|
||||
First, rewinding head to replay your work on top of it...
|
||||
Applying: Commit #1
|
||||
Using index info to reconstruct a base tree...
|
||||
M conflicting_file_1.txt
|
||||
Falling back to patching base and 3-way merge...
|
||||
Auto-merging conflicting_file_1.txt
|
||||
CONFLICT (content): Merge conflict in conflicting_file_1.txt
|
||||
error: Failed to merge in the changes.
|
||||
hint: Use 'git am --show-current-patch' to see the failed patch
|
||||
Patch failed at 0001 Commit #1
|
||||
|
||||
Resolve all conflicts manually, mark them as resolved with
|
||||
"git add/rm <conflicted_files>", then run "git rebase --continue".
|
||||
You can instead skip this commit: run "git rebase --skip".
|
||||
To abort and get back to the state before "git rebase", run "git rebase --abort".
|
||||
```
|
||||
|
||||
This tells us that we have a merge conflict, and gives the name of the file with the conflict. Open the conflicting file in your text editor, and somewhere in the file, you'll find something like this:
|
||||
|
||||
```
|
||||
<<<<<<< HEAD
|
||||
<p>For help with any issues, email us at support@webhost.us.</p>
|
||||
=======
|
||||
<p>Need help? Email support@webhost.us.</p>
|
||||
>>>>>>> Commit #1
|
||||
```
|
||||
|
||||
The line `<<<<<<< HEAD` marks the beginning of a merge conflict, and the `>>>>>>> Commit #1` line marks the end, with the conflicting sections separated by `=======`. The part on the `HEAD` side is from the QMK master version of the file, and the part marked with the commit message is from the current branch and commit.
|
||||
|
||||
Because Git tracks *changes to files* rather than the contents of the files directly, if Git can't find the text that was in the file previous to the commit that was made, it won't know how to edit the file. Re-editing the file will solve the conflict. Make your changes, and then save the file.
|
||||
|
||||
```
|
||||
<p>Need help? Email support@webhost.us.</p>
|
||||
```
|
||||
|
||||
Now run:
|
||||
|
||||
```
|
||||
git add conflicting_file_1.txt
|
||||
git rebase --continue
|
||||
```
|
||||
|
||||
Git logs the changes to the conflicting file, and continues applying the commits from our branch until it reaches the end.
|
71
docs/newbs_git_resynchronize_a_branch.md
Normal file
71
docs/newbs_git_resynchronize_a_branch.md
Normal file
@@ -0,0 +1,71 @@
|
||||
# Resynchronizing an Out-of-Sync Git Branch
|
||||
|
||||
Suppose you have committed to your `master` branch, and now need to update your QMK repository. You could `git pull` QMK's `master` branch into your own, but GitHub will tell you that your commit is a number of commits ahead of `qmk:master`, which can create issues if you want to make a pull request to QMK.
|
||||
|
||||
?> This document builds upon the concepts detailed in [Your Fork's Master: Update Often, Commit Never](newbs_git_using_your_master_branch.md). If you are not familiar with that document, please read it first, then return here.
|
||||
|
||||
## Backing Up the Changes on Your Own Master Branch (Optional)
|
||||
|
||||
No one wants to lose work if it can be helped. If you want to save the changes you've already made to your `master` branch, the simplest way to do so is to simply create a duplicate of your "dirty" `master` branch:
|
||||
|
||||
```sh
|
||||
git branch old_master master
|
||||
```
|
||||
|
||||
Now you have a branch named `old_master` that is a duplicate of your `master` branch.
|
||||
|
||||
## Resynchronizing Your Branch
|
||||
|
||||
Now it's time to resynchronize your `master` branch. For this step, you'll want to have QMK's repository configured as a remote in Git. To check your configured remotes, run `git remote -v`, which should return something similar to:
|
||||
|
||||
```sh
|
||||
QMKuser ~/qmk_firmware (master)
|
||||
$ git remote -v
|
||||
origin https://github.com/<your_username>/qmk_firmware.git (fetch)
|
||||
origin https://github.com/<your_username>/qmk_firmware.git (push)
|
||||
upstream https://github.com/qmk/qmk_firmware.git (fetch)
|
||||
upstream https://github.com/qmk/qmk_firmware.git (push)
|
||||
```
|
||||
|
||||
If you only see one fork referenced:
|
||||
|
||||
```sh
|
||||
QMKuser ~/qmk_firmware (master)
|
||||
$ git remote -v
|
||||
origin https://github.com/qmk/qmk_firmware.git (fetch)
|
||||
origin https://github.com/qmk/qmk_firmware.git (push)
|
||||
```
|
||||
|
||||
add a new remote with:
|
||||
|
||||
```sh
|
||||
git remote add upstream https://github.com/qmk/qmk_firmware.git
|
||||
```
|
||||
|
||||
Then, redirect the `origin` remote to your own fork with:
|
||||
|
||||
```sh
|
||||
git remote set-url origin https://github.com/<your_username>/qmk_firmware.git
|
||||
```
|
||||
|
||||
Now that you have both remotes configured, you need to update the references for the upstream repository, which is QMK's, by running:
|
||||
|
||||
```sh
|
||||
git fetch upstream
|
||||
```
|
||||
|
||||
At this point, resynchronize your branch to QMK's by running:
|
||||
|
||||
```sh
|
||||
git reset --hard upstream/master
|
||||
```
|
||||
|
||||
These steps will update the repository on your computer, but your GitHub fork will still be out of sync. To resynchronize your fork on GitHub, you need to push to your fork, instructing Git to override any remote changes that are not reflected in your local repository. To do this, run:
|
||||
|
||||
```sh
|
||||
git push --force-with-lease
|
||||
```
|
||||
|
||||
!> **DO NOT** run `git push --force-with-lease` on a fork to which other users post commits. This will erase their commits.
|
||||
|
||||
Now your GitHub fork, your local files, and QMK's repository are all the same. From here you can make further needed changes ([use a branch!](newbs_git_using_your_master_branch.md#making-changes)) and post them as normal.
|
74
docs/newbs_git_using_your_master_branch.md
Normal file
74
docs/newbs_git_using_your_master_branch.md
Normal file
@@ -0,0 +1,74 @@
|
||||
# Your Fork's Master: Update Often, Commit Never
|
||||
|
||||
It is highly recommended for QMK development, regardless of what is being done or where, to keep your `master` branch updated, but ***never*** commit to it. Instead, do all your changes in a development branch and issue pull requests from your branches when you're developing.
|
||||
|
||||
To reduce the chances of merge conflicts — instances where two or more users have edited the same part of a file concurrently — keep your `master` branch relatively up-to-date, and start any new developments by creating a new branch.
|
||||
|
||||
## Updating your master branch
|
||||
|
||||
To keep your `master` branch updated, it is recommended to add the QMK Firmware repository ("repo") as a remote repository in git. To do this, open your Git command line interface and enter:
|
||||
|
||||
```
|
||||
git remote add upstream https://github.com/qmk/qmk_firmware.git
|
||||
```
|
||||
|
||||
?> The name `upstream` is arbitrary, but a common convention; you can give the QMK remote any name that suits you. Git's `remote` command uses the syntax `git remote add <name> <url>`, `<name>` being shorthand for the remote repo. This name can be used with many Git commands, including but not limited to `fetch`, `pull` and `push`, to specify the remote repo on which to act.
|
||||
|
||||
To verify that the repository has been added, run `git remote -v`, which should return the following:
|
||||
|
||||
```
|
||||
$ git remote -v
|
||||
origin https://github.com/<your_username>/qmk_firmware.git (fetch)
|
||||
origin https://github.com/<your_username>/qmk_firmware.git (push)
|
||||
upstream https://github.com/qmk/qmk_firmware.git (fetch)
|
||||
upstream https://github.com/qmk/qmk_firmware.git (push)
|
||||
```
|
||||
|
||||
Now that this is done, you can check for updates to the repo by running `git fetch upstream`. This retrieves the branches and tags — collectively referred to as "refs" — from the QMK repo, which now has the nickname `upstream`. We can now compare the data on our fork `origin` to that held by QMK.
|
||||
|
||||
To update your fork's master, run the following, hitting the Enter key after each line:
|
||||
|
||||
```
|
||||
git checkout master
|
||||
git fetch upstream
|
||||
git pull upstream master
|
||||
git push origin master
|
||||
```
|
||||
|
||||
This switches you to your `master` branch, retrieves the refs from the QMK repo, downloads the current QMK `master` branch to your computer, and then uploads it to your fork.
|
||||
|
||||
## Making Changes
|
||||
|
||||
To make changes, create a new branch by entering:
|
||||
|
||||
```
|
||||
git checkout -b dev_branch
|
||||
git push --set-upstream origin dev_branch
|
||||
```
|
||||
|
||||
This creates a new branch named `dev_branch`, checks it out, and then saves the new branch to your fork. The `--set-upstream` argument tells git to use your fork and the `dev_branch` branch every time you use `git push` or `git pull` from this branch. It only needs to be used on the first push; after that, you can safely use `git push` or `git pull`, without the rest of the arguments.
|
||||
|
||||
?> With `git push`, you can use `-u` in place of `--set-upstream` — `-u` is an alias for `--set-upstream`.
|
||||
|
||||
You can name your branch nearly anything you want, though it is recommended to name it something related to the changes you are going to make.
|
||||
|
||||
By default `git checkout -b` will base your new branch on the branch that is currently checked out. You can base your new branch on an existing branch that is not checked out by adding the name of the existing branch to the command:
|
||||
|
||||
```
|
||||
git checkout -b dev_branch master
|
||||
```
|
||||
|
||||
Now that you have a development branch, open your text editor and make whatever changes you need to make. It is recommended to make many small commits to your branch; that way, any change that causes issues can be more easily traced and undone if needed. To make your changes, edit and save any files that need to be updated, add them to Git's *staging area*, and then commit them to your branch:
|
||||
|
||||
```
|
||||
git add path/to/updated_file
|
||||
git commit -m "My commit message."
|
||||
```
|
||||
|
||||
`git add` adds files that have been changed to Git's *staging area*, which is Git's "loading zone." This contains the changes that are going to be *committed* by `git commit`, which saves the changes to the repo. Use descriptive commit messages so you can know what was changed at a glance.
|
||||
|
||||
?> If you've changed multiple files, you can use `git add -- path/to/file1 path/to/file2 ...` to add all your desired files.
|
||||
|
||||
## Publishing Your Changes
|
||||
|
||||
The last step is to push your changes to your fork. To do this, enter `git push`. Git will then publish the current state of `dev_branch` to your fork.
|
@@ -29,3 +29,5 @@ These are defaults based on what has been implemented for ARM boards.
|
||||
| [Audio](feature_audio.md) | Enabled |
|
||||
| [RGB Lighting](feature_rgblight.md) | Disabled |
|
||||
| [Backlight](feature_backlight.md) | Forces [task driven PWM](feature_backlight.md#software-pwm-driver) until ARM can provide automatic configuration |
|
||||
| USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) |
|
||||
| [Split keyboards](feature_split_keyboard.md) | Not supported yet |
|
||||
|
31
docs/pt-br/README.md
Normal file
31
docs/pt-br/README.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Quantum Mechanical Keyboard Firmware
|
||||
|
||||
[](https://github.com/qmk/qmk_firmware/tags)
|
||||
[](https://travis-ci.org/qmk/qmk_firmware)
|
||||
[](https://discord.gg/Uq7gcHh)
|
||||
[](https://docs.qmk.fm)
|
||||
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
||||
[](https://github.com/qmk/qmk_firmware/)
|
||||
|
||||
## O que é o firmware QMK?
|
||||
QMK (*Quantum Mechanical Keyboard*) é uma comunidade de código aberto que mantém o QMK Firmware, o QMK Toolbox, qmk.fm e suas documentações. O QMK Firmware é um software embarcado ("firmware") de teclado baseado no [tmk\_keyboard](http://github.com/tmk/tmk_keyboard) com alguns recursos úteis para os controladores Atmel AVR e, mais especificamente, na [linha de produtos OLKB](http://olkb.com), o teclado [ErgoDox EZ](http://www.ergodox-ez.com) e a [linha de produtos Clueboard](http://clueboard.co/). Também foi portado para chips ARM usando o ChibiOS. Você pode usá-lo no seu próprio teclado com fio ou personalizado.
|
||||
|
||||
## Como obter e usar o QMK
|
||||
|
||||
Se você planeja contribuir com um _keymap_ ("mapa de teclas"), teclado ou recursos para o QMK, o jeito mais fácil é [percorrer o repositório através do Github](https://github.com/qmk/qmk_firmware#fork-destination-box) e clonar seu repositório localmente para fazer suas alterações, dê um _push_ nelas e abra uma [_Pull request_](https://github.com/qmk/qmk_firmware/pulls) no seu fork.
|
||||
|
||||
Caso contrário, você pode cloná-lo diretamente com `git clone https://github.com/qmk/qmk_firmware`. Não faça o download dos arquivos zip ou tar; é necessário um repositório git para baixar os submódulos para compilar.
|
||||
|
||||
## Como compilar
|
||||
|
||||
Antes de compilar, você precisará [instalar um ambiente específico](getting_started_build_tools.md) para o desenvolvimento em plataforma AVR e/ou ARM; vez que isto for feito, você usará o comando `make` para criar um teclado e um mapa de teclas com a seguinte notação:
|
||||
|
||||
make planck/rev4:default
|
||||
|
||||
Isso compilaria a revisão `rev4` do teclado ` planck` com o mapa de teclas `default`. Nem todos os teclados têm revisões (também chamadas de _subprojects_ ou _folders_); nesse caso, a revisão pode ser omitida:
|
||||
|
||||
make preonic:default
|
||||
|
||||
## Como personalizar
|
||||
|
||||
O QMK tem muitos [recursos](features.md) para explorar e uma boa quantidade de [documentação de referência](http://docs.qmk.fm) para explorar. A maioria dos recursos é aproveitada modificando seu [keymap](keymap.md) e alterando os [keycodes](keycodes.md).
|
121
docs/pt-br/_summary.md
Normal file
121
docs/pt-br/_summary.md
Normal file
@@ -0,0 +1,121 @@
|
||||
* [Complete Newbs Guide](pt-br/newbs.md)
|
||||
* [Getting Started](pt-br/newbs_getting_started.md)
|
||||
* [Building Your First Firmware](pt-br/newbs_building_firmware.md)
|
||||
* [Flashing Firmware](pt-br/newbs_flashing.md)
|
||||
* [Testing and Debugging](pt-br/newbs_testing_debugging.md)
|
||||
* [Git Best Practices](pt-br/newbs_best_practices.md)
|
||||
* [Learning Resources](pt-br/newbs_learn_more_resources.md)
|
||||
|
||||
* [QMK Basics](pt-br/README.md)
|
||||
* [QMK Introduction](pt-br/getting_started_introduction.md)
|
||||
* [QMK CLI](pt-br/cli.md)
|
||||
* [QMK CLI Config](pt-br/cli_configuration.md)
|
||||
* [Contributing to QMK](pt-br/contributing.md)
|
||||
* [How to Use Github](pt-br/getting_started_github.md)
|
||||
* [Getting Help](pt-br/getting_started_getting_help.md)
|
||||
|
||||
* [Breaking Changes](pt-br/breaking_changes.md)
|
||||
* [2019 Aug 30](pt-br/ChangeLog/20190830.md)
|
||||
|
||||
* [FAQ](faq.md)
|
||||
* [General FAQ](pt-br/faq_general.md)
|
||||
* [Build/Compile QMK](pt-br/faq_build.md)
|
||||
* [Debugging/Troubleshooting QMK](pt-br/faq_debug.md)
|
||||
* [Keymap](pt-br/faq_keymap.md)
|
||||
* [Driver Installation with Zadig](pt-br/driver_installation_zadig.md)
|
||||
|
||||
* Detailed Guides
|
||||
* [Install Build Tools](pt-br/getting_started_build_tools.md)
|
||||
* [Vagrant Guide](pt-br/getting_started_vagrant.md)
|
||||
* [Build/Compile Instructions](pt-br/getting_started_make_guide.md)
|
||||
* [Flashing Firmware](pt-br/flashing.md)
|
||||
* [Customizing Functionality](pt-br/custom_quantum_functions.md)
|
||||
* [Keymap Overview](pt-br/keymap.md)
|
||||
|
||||
* [Hardware](hardware.md)
|
||||
* [AVR Processors](pt-br/hardware_avr.md)
|
||||
* [Drivers](pt-br/hardware_drivers.md)
|
||||
|
||||
* Reference
|
||||
* [Keyboard Guidelines](pt-br/hardware_keyboard_guidelines.md)
|
||||
* [Config Options](pt-br/config_options.md)
|
||||
* [Keycodes](pt-br/keycodes.md)
|
||||
* [Coding Conventions - C](pt-br/coding_conventions_c.md)
|
||||
* [Coding Conventions - Python](pt-br/coding_conventions_python.md)
|
||||
* [Documentation Best Practices](pt-br/documentation_best_practices.md)
|
||||
* [Documentation Templates](pt-br/documentation_templates.md)
|
||||
* [Glossary](pt-br/reference_glossary.md)
|
||||
* [Unit Testing](pt-br/unit_testing.md)
|
||||
* [Useful Functions](pt-br/ref_functions.md)
|
||||
* [Configurator Support](pt-br/reference_configurator_support.md)
|
||||
* [info.json Format](pt-br/reference_info_json.md)
|
||||
* [Python CLI Development](pt-br/cli_development.md)
|
||||
|
||||
* [Features](pt-br/features.md)
|
||||
* [Basic Keycodes](pt-br/keycodes_basic.md)
|
||||
* [US ANSI Shifted Keys](pt-br/keycodes_us_ansi_shifted.md)
|
||||
* [Quantum Keycodes](pt-br/quantum_keycodes.md)
|
||||
* [Advanced Keycodes](pt-br/feature_advanced_keycodes.md)
|
||||
* [Audio](pt-br/feature_audio.md)
|
||||
* [Auto Shift](pt-br/feature_auto_shift.md)
|
||||
* [Backlight](pt-br/feature_backlight.md)
|
||||
* [Bluetooth](pt-br/feature_bluetooth.md)
|
||||
* [Bootmagic](pt-br/feature_bootmagic.md)
|
||||
* [Combos](pt-br/feature_combo.md)
|
||||
* [Command](pt-br/feature_command.md)
|
||||
* [Debounce API](pt-br/feature_debounce_type.md)
|
||||
* [DIP Switch](pt-br/feature_dip_switch.md)
|
||||
* [Dynamic Macros](pt-br/feature_dynamic_macros.md)
|
||||
* [Encoders](pt-br/feature_encoders.md)
|
||||
* [Grave Escape](pt-br/feature_grave_esc.md)
|
||||
* [Haptic Feedback](pt-br/feature_haptic_feedback.md)
|
||||
* [HD44780 LCD Controller](pt-br/feature_hd44780.md)
|
||||
* [Key Lock](pt-br/feature_key_lock.md)
|
||||
* [Layouts](pt-br/feature_layouts.md)
|
||||
* [Leader Key](pt-br/feature_leader_key.md)
|
||||
* [LED Matrix](pt-br/feature_led_matrix.md)
|
||||
* [Macros](pt-br/feature_macros.md)
|
||||
* [Mouse Keys](pt-br/feature_mouse_keys.md)
|
||||
* [OLED Driver](pt-br/feature_oled_driver.md)
|
||||
* [One Shot Keys](pt-br/feature_advanced_keycodes.md#one-shot-keys)
|
||||
* [Pointing Device](pt-br/feature_pointing_device.md)
|
||||
* [PS/2 Mouse](pt-br/feature_ps2_mouse.md)
|
||||
* [RGB Lighting](pt-br/feature_rgblight.md)
|
||||
* [RGB Matrix](pt-br/feature_rgb_matrix.md)
|
||||
* [Space Cadet](pt-br/feature_space_cadet.md)
|
||||
* [Split Keyboard](pt-br/feature_split_keyboard.md)
|
||||
* [Stenography](pt-br/feature_stenography.md)
|
||||
* [Swap Hands](pt-br/feature_swap_hands.md)
|
||||
* [Tap Dance](pt-br/feature_tap_dance.md)
|
||||
* [Terminal](pt-br/feature_terminal.md)
|
||||
* [Thermal Printer](pt-br/feature_thermal_printer.md)
|
||||
* [Unicode](pt-br/feature_unicode.md)
|
||||
* [Userspace](pt-br/feature_userspace.md)
|
||||
* [Velocikey](pt-br/feature_velocikey.md)
|
||||
|
||||
* For Makers and Modders
|
||||
* [Hand Wiring Guide](pt-br/hand_wire.md)
|
||||
* [ISP Flashing Guide](pt-br/isp_flashing_guide.md)
|
||||
* [ARM Debugging Guide](pt-br/arm_debugging.md)
|
||||
* [I2C Driver](pt-br/i2c_driver.md)
|
||||
* [GPIO Controls](pt-br/internals_gpio_control.md)
|
||||
* [Proton C Conversion](pt-br/proton_c_conversion.md)
|
||||
|
||||
* For a Deeper Understanding
|
||||
* [How Keyboards Work](pt-br/how_keyboards_work.md)
|
||||
* [Understanding QMK](pt-br/understanding_qmk.md)
|
||||
|
||||
* Other Topics
|
||||
* [Using Eclipse with QMK](pt-br/other_eclipse.md)
|
||||
* [Using VSCode with QMK](pt-br/other_vscode.md)
|
||||
* [Support](pt-br/support.md)
|
||||
* [How to add translations](pt-br/translating.md)
|
||||
|
||||
* QMK Internals (In Progress)
|
||||
* [Defines](pt-br/internals_defines.md)
|
||||
* [Input Callback Reg](pt-br/internals_input_callback_reg.md)
|
||||
* [Midi Device](pt-br/internals_midi_device.md)
|
||||
* [Midi Device Setup Process](pt-br/internals_midi_device_setup_process.md)
|
||||
* [Midi Util](pt-br/internals_midi_util.md)
|
||||
* [Send Functions](pt-br/internals_send_functions.md)
|
||||
* [Sysex Tools](pt-br/internals_sysex_tools.md)
|
123
docs/ru-ru/_summary.md
Normal file
123
docs/ru-ru/_summary.md
Normal file
@@ -0,0 +1,123 @@
|
||||
* [Complete Newbs Guide](ru-ru/newbs.md)
|
||||
* [Getting Started](ru-ru/newbs_getting_started.md)
|
||||
* [Building Your First Firmware](ru-ru/newbs_building_firmware.md)
|
||||
* [Flashing Firmware](ru-ru/newbs_flashing.md)
|
||||
* [Testing and Debugging](ru-ru/newbs_testing_debugging.md)
|
||||
* [Git Best Practices](ru-ru/newbs_best_practices.md)
|
||||
* [Learning Resources](ru-ru/newbs_learn_more_resources.md)
|
||||
|
||||
* [QMK Basics](ru-ru/README.md)
|
||||
* [QMK Introduction](ru-ru/getting_started_introduction.md)
|
||||
* [QMK CLI](ru-ru/cli.md)
|
||||
* [QMK CLI Config](ru-ru/cli_configuration.md)
|
||||
* [Contributing to QMK](ru-ru/contributing.md)
|
||||
* [How to Use Github](ru-ru/getting_started_github.md)
|
||||
* [Getting Help](ru-ru/getting_started_getting_help.md)
|
||||
|
||||
* [Breaking Changes](ru-ru/breaking_changes.md)
|
||||
* [2019 Aug 30](ru-ru/ChangeLog/20190830.md)
|
||||
|
||||
* [FAQ](ru-ru/faq.md)
|
||||
* [General FAQ](ru-ru/faq_general.md)
|
||||
* [Build/Compile QMK](ru-ru/faq_build.md)
|
||||
* [Debugging/Troubleshooting QMK](ru-ru/faq_debug.md)
|
||||
* [Keymap](ru-ru/faq_keymap.md)
|
||||
* [Driver Installation with Zadig](ru-ru/driver_installation_zadig.md)
|
||||
|
||||
* Detailed Guides
|
||||
* [Install Build Tools](ru-ru/getting_started_build_tools.md)
|
||||
* [Vagrant Guide](ru-ru/getting_started_vagrant.md)
|
||||
* [Build/Compile Instructions](ru-ru/getting_started_make_guide.md)
|
||||
* [Flashing Firmware](ru-ru/flashing.md)
|
||||
* [Customizing Functionality](ru-ru/custom_quantum_functions.md)
|
||||
* [Keymap Overview](ru-ru/keymap.md)
|
||||
|
||||
* [Hardware](ru-ru/hardware.md)
|
||||
* [Compatible Microcontrollers](ru-ru/compatible_microcontrollers.md)
|
||||
* [AVR Processors](ru-ru/hardware_avr.md)
|
||||
* [Drivers](ru-ru/hardware_drivers.md)
|
||||
|
||||
* Reference
|
||||
* [Keyboard Guidelines](ru-ru/hardware_keyboard_guidelines.md)
|
||||
* [Config Options](ru-ru/config_options.md)
|
||||
* [Keycodes](ru-ru/keycodes.md)
|
||||
* [Coding Conventions - C](ru-ru/coding_conventions_c.md)
|
||||
* [Coding Conventions - Python](ru-ru/coding_conventions_python.md)
|
||||
* [Documentation Best Practices](ru-ru/documentation_best_practices.md)
|
||||
* [Documentation Templates](ru-ru/documentation_templates.md)
|
||||
* [Glossary](ru-ru/reference_glossary.md)
|
||||
* [Unit Testing](ru-ru/unit_testing.md)
|
||||
* [Useful Functions](ru-ru/ref_functions.md)
|
||||
* [Configurator Support](ru-ru/reference_configurator_support.md)
|
||||
* [info.json Format](ru-ru/reference_info_json.md)
|
||||
* [Python CLI Development](ru-ru/cli_development.md)
|
||||
|
||||
* [Features](ru-ru/features.md)
|
||||
* [Basic Keycodes](ru-ru/keycodes_basic.md)
|
||||
* [US ANSI Shifted Keys](ru-ru/keycodes_us_ansi_shifted.md)
|
||||
* [Quantum Keycodes](ru-ru/quantum_keycodes.md)
|
||||
* [Advanced Keycodes](ru-ru/feature_advanced_keycodes.md)
|
||||
* [Audio](ru-ru/feature_audio.md)
|
||||
* [Auto Shift](ru-ru/feature_auto_shift.md)
|
||||
* [Backlight](ru-ru/feature_backlight.md)
|
||||
* [Bluetooth](ru-ru/feature_bluetooth.md)
|
||||
* [Bootmagic](ru-ru/feature_bootmagic.md)
|
||||
* [Combos](ru-ru/feature_combo.md)
|
||||
* [Command](ru-ru/feature_command.md)
|
||||
* [Debounce API](ru-ru/feature_debounce_type.md)
|
||||
* [DIP Switch](ru-ru/feature_dip_switch.md)
|
||||
* [Dynamic Macros](ru-ru/feature_dynamic_macros.md)
|
||||
* [Encoders](ru-ru/feature_encoders.md)
|
||||
* [Grave Escape](ru-ru/feature_grave_esc.md)
|
||||
* [Haptic Feedback](ru-ru/feature_haptic_feedback.md)
|
||||
* [HD44780 LCD Controller](ru-ru/feature_hd44780.md)
|
||||
* [Key Lock](ru-ru/feature_key_lock.md)
|
||||
* [Layouts](ru-ru/feature_layouts.md)
|
||||
* [Leader Key](ru-ru/feature_leader_key.md)
|
||||
* [LED Matrix](ru-ru/feature_led_matrix.md)
|
||||
* [Macros](ru-ru/feature_macros.md)
|
||||
* [Mouse Keys](ru-ru/feature_mouse_keys.md)
|
||||
* [OLED Driver](ru-ru/feature_oled_driver.md)
|
||||
* [One Shot Keys](ru-ru/feature_advanced_keycodes.md#one-shot-keys)
|
||||
* [Pointing Device](ru-ru/feature_pointing_device.md)
|
||||
* [PS/2 Mouse](ru-ru/feature_ps2_mouse.md)
|
||||
* [RGB Lighting](ru-ru/feature_rgblight.md)
|
||||
* [RGB Matrix](ru-ru/feature_rgb_matrix.md)
|
||||
* [Space Cadet](ru-ru/feature_space_cadet.md)
|
||||
* [Split Keyboard](ru-ru/feature_split_keyboard.md)
|
||||
* [Stenography](ru-ru/feature_stenography.md)
|
||||
* [Swap Hands](ru-ru/feature_swap_hands.md)
|
||||
* [Tap Dance](ru-ru/feature_tap_dance.md)
|
||||
* [Terminal](ru-ru/feature_terminal.md)
|
||||
* [Thermal Printer](ru-ru/feature_thermal_printer.md)
|
||||
* [Unicode](ru-ru/feature_unicode.md)
|
||||
* [Userspace](ru-ru/feature_userspace.md)
|
||||
* [Velocikey](ru-ru/feature_velocikey.md)
|
||||
|
||||
* For Makers and Modders
|
||||
* [Hand Wiring Guide](ru-ru/hand_wire.md)
|
||||
* [ISP Flashing Guide](ru-ru/isp_flashing_guide.md)
|
||||
* [ARM Debugging Guide](ru-ru/arm_debugging.md)
|
||||
* [I2C Driver](ru-ru/i2c_driver.md)
|
||||
* [WS2812 Driver](ru-ru/ws2812_driver.md)
|
||||
* [GPIO Controls](ru-ru/internals_gpio_control.md)
|
||||
* [Proton C Conversion](ru-ru/proton_c_conversion.md)
|
||||
|
||||
* For a Deeper Understanding
|
||||
* [How Keyboards Work](ru-ru/how_keyboards_work.md)
|
||||
* [Understanding QMK](ru-ru/understanding_qmk.md)
|
||||
|
||||
* Other Topics
|
||||
* [Using Eclipse with QMK](ru-ru/other_eclipse.md)
|
||||
* [Using VSCode with QMK](ru-ru/other_vscode.md)
|
||||
* [Support](ru-ru/support.md)
|
||||
* [Translating the QMK Docs](ru-ru/translating.md)
|
||||
|
||||
* QMK Internals (In Progress)
|
||||
* [Defines](ru-ru/internals_defines.md)
|
||||
* [Input Callback Reg](ru-ru/internals_input_callback_reg.md)
|
||||
* [Midi Device](ru-ru/internals_midi_device.md)
|
||||
* [Midi Device Setup Process](ru-ru/internals_midi_device_setup_process.md)
|
||||
* [Midi Util](ru-ru/internals_midi_util.md)
|
||||
* [Send Functions](ru-ru/internals_send_functions.md)
|
||||
* [Sysex Tools](ru-ru/internals_sysex_tools.md)
|
9
docs/ru-ru/becoming_a_qmk_collaborator.md
Normal file
9
docs/ru-ru/becoming_a_qmk_collaborator.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Стать соавтором QMK
|
||||
|
||||
Соавтор QMK - это производитель или разработчик клавиатуры, который заинтересован в том, чтобы помочь QMK вырасти. Для этого он полностью поддерживает свои клавиатуры, поощряет пользователей и клиентов создавать новый функционал, идеи и раскладки клавиатур. Мы всегда стремимся добавлять больше клавиатур и соавторов, но нам важно, чтобы они соответствовали следующим требованиям:
|
||||
|
||||
* **Иметь печатную плату на продажу.** К сожалению, у собранных вручную клавиатур слишком много вариаций и сложностей.
|
||||
* **Поддерживать вашу клавиатуру в QMK.** Это может потребовать просто начальной настройки, чтобы ваша клавиатура заработала. Но поддержка также может заключаться в адаптации изменений ядра QMK, которые способны сломать или сделать избыточным любой пользовательский код.
|
||||
* **Одобрять и производить слияние пулреквестов для вашей клавиатуры.** Мы призываем пользователей делиться своими раскладками клавиатур, чтобы другие могли их видеть и опираться на них при создании своих собственных.
|
||||
|
||||
Если вы чувствуете, что удовлетворяете этим требованиям, напишите нам письмо по адресу hello@qmk.fm с кратким описанием и ссылками на вашу клавиатуру!
|
58
docs/ru-ru/getting_started_introduction.md
Normal file
58
docs/ru-ru/getting_started_introduction.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# Введение
|
||||
|
||||
Эта страница пытается объяснить основную информацию, которую вы должны знать, чтобы работать с проектом QMK. Предполагается, что вы знакомы с навигацией в оболочке Unix, но не предполагается, что вы знакомы с C или с компиляцией с использованием make.
|
||||
|
||||
## Базовая структура QMK
|
||||
|
||||
QMK - это форк [Джуна Вако (Jun Wako)](https://github.com/tmk) проекта [tmk_keyboard](https://github.com/tmk/tmk_keyboard). Оригинальный код TMK с изменениями можно найти в папке `tmk`. Дополнения QMK к проекту можно найти в папке `quantum`. Проекты клавиатур можно найти в папках `handwired` и `keyboard`.
|
||||
|
||||
### Структура пространства пользователя
|
||||
|
||||
Внутри папки `users` находится каталог для каждого пользователя. Это место для пользователей, куда они могут поместить код, чтобы использовать его с разными клавиатурами. Для получения дополнительной информации обратитесь к документации по [функциям пользовательского пространства](ru-ru/feature_userspace.md).
|
||||
|
||||
### Структура проекта клавиатуры
|
||||
|
||||
Внутри папки `keyboards` есть подпапки `handwired` и есть подкаталоги поставщиков и производителей, для примера, `clueboard` - это каталог для каждого проекта клавиатуры, например, `qmk_firmware/keyboards/clueboard/2x1800`. В нем вы найдете следующую структуру:
|
||||
* `keymaps/`: Различные раскладки клавиш, которые можно собрать.
|
||||
* `rules.mk`: Файл, который устанавливает параметры по умолчанию для команды "make". Не редактируйте этот файл напрямую, вместо этого используйте `rules.mk`, относящийся к конкретной раскладке.
|
||||
* `config.h`: Файл, который устанавливает параметры времени компиляции по умолчанию. Не редактируйте этот файл напрямую, вместо этого используйте `config.h`, относящийся к конкретной раскладке.
|
||||
* `info.json`: Файл настройки раскладки для QMK Configurator. Посмотрите [Поддержку конфигуратора](ru-ru/reference_configurator_support.md) для дополнительной информации.
|
||||
* `readme.md`: Краткий обзор клавиатуры.
|
||||
* `<keyboardName>.h`: В этом файле определяется раскладка клавиатуры по матрице переключателей клавиатуры.
|
||||
* `<keyboardName>.c`: В этом файле вы можете найти пользовательский код для клавиатуры.
|
||||
|
||||
Для получения дополнительной информации о структуре проекта обратитесь к [Руководству QMK по клавиатуре](ru-ru/hardware_keyboard_guidelines.md).
|
||||
|
||||
### Структура раскладки клавиатуры
|
||||
|
||||
В каждой папке раскладки клавиатуры могут быть найдены следующие файлы. Обязательным является только файл `keymap.c`, и если остальные файлы не найдены, то будут выбраны параметры по умолчанию.
|
||||
|
||||
* `config.h`: настройки вашей раскладки клавиатуры.
|
||||
* `keymap.c`: весь код вашей раскладки клавиатуры (обязателен).
|
||||
* `rules.mk`: активированные функции QMK.
|
||||
* `readme.md`: описание вашей раскладки клавиш, как ее могут использовать другие, и объяснения функций. Пожалуйста, загрузите изображения на сервис, такой как imgur.
|
||||
|
||||
# Файл `config.h`
|
||||
|
||||
Существует 3 возможных местоположения `config.h`:
|
||||
|
||||
* клавиатура (`/keyboards/<keyboard>/config.h`)
|
||||
* пространство пользователя (`/users/<user>/config.h`)
|
||||
* раскладка клавиш (`/keyboards/<keyboard>/keymaps/<keymap>/config.h`)
|
||||
|
||||
Система сборки автоматически загружает файлы конфигурации в указанном выше порядке. Если вы хотите переопределить любую настройку, заданную предыдущим `config.h`, вам сначала нужно будет включить некоторый шаблонный код для настроек, которые вы хотите изменить.
|
||||
|
||||
```
|
||||
#pragma once
|
||||
```
|
||||
|
||||
Затем, чтобы переопределить настройку из предыдущего файла `config.h`, вы должны сделать `#undef` и `#define` для неё снова.
|
||||
|
||||
Код и настройка шаблона вместе выглядят так:
|
||||
```
|
||||
#pragma once
|
||||
|
||||
// Переопределения производятся здесь!
|
||||
#undef MY_SETTING
|
||||
#define MY_SETTING 4
|
||||
```
|
@@ -56,11 +56,6 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666"
|
||||
?> 事实上没有一个驱动的最佳选择,有些选项就是和某些系统相辅相成。但libUSB和WinUSB似乎也算是这里的最佳选择了。
|
||||
如果bootloader在设备列表中没有显示,你可能要使能 "List all devices"选项在选项菜单中`Options`,然后找到有问题的bootloader设备。(译者注:在win10中可能为 查看-显示隐藏的设备)
|
||||
|
||||
|
||||
## WINAVR已淘汰
|
||||
不再推荐使用WINAVR,使用可能会导致问题
|
||||
详情请见[TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99).
|
||||
|
||||
## USB VID 和 PID
|
||||
你可以在编辑`config.h`时使用任何你想用的ID值。实际上,使用任何可能未使用的ID都没有问题,除了有极低的与其他产品发生冲突的可能性。
|
||||
|
||||
@@ -73,29 +68,6 @@ https://github.com/tmk/tmk_keyboard/issues/150
|
||||
- http://www.obdev.at/products/vusb/license.html
|
||||
- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1
|
||||
|
||||
## Cortex: `cstddef: No such file or directory`
|
||||
在Ubuntu 14.04上的GCC 4.8 会出现这种问题需要用这个PPA升级到4.9。
|
||||
https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded
|
||||
|
||||
https://github.com/tmk/tmk_keyboard/issues/212
|
||||
https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstddef
|
||||
https://developer.mbed.org/forum/mbed/topic/5205/
|
||||
|
||||
## `clock_prescale_set` and `clock_div_1` Not Available
|
||||
你的工具链太旧了不支持MCU。比如WinAVR 20100110就不支持ATMega32u2.
|
||||
|
||||
```
|
||||
Compiling C: ../../tmk_core/protocol/lufa/lufa.c
|
||||
avr-gcc -c -mmcu=atmega32u2 -gdwarf-2 -DF_CPU=16000000UL -DINTERRUPT_CONTROL_ENDPOINT -DBOOTLOADER_SIZE=4096 -DF_USB=16000000UL -DARCH=ARCH_AVR8 -DUSB_DEVICE_ONLY -DUSE_FLASH_DESCRIPTORS -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -DFIXED_CONTROL_ENDPOINT_SIZE=8 -DFIXED_NUM_CONFIGURATIONS=1 -DPROTOCOL_LUFA -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DVERSION=unknown -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=obj_alps64/protocol/lufa/lufa.lst -I. -I../../tmk_core -I../../tmk_core/protocol/lufa -I../../tmk_core/protocol/lufa/LUFA-git -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_alps64_protocol_lufa_lufa.o.d ../../tmk_core/protocol/lufa/lufa.c -o obj_alps64/protocol/lufa/lufa.o
|
||||
../../tmk_core/protocol/lufa/lufa.c: In function 'setup_mcu':
|
||||
../../tmk_core/protocol/lufa/lufa.c:575: warning: implicit declaration of function 'clock_prescale_set'
|
||||
../../tmk_core/protocol/lufa/lufa.c:575: error: 'clock_div_1' undeclared (first use in this function)
|
||||
../../tmk_core/protocol/lufa/lufa.c:575: error: (Each undeclared identifier is reported only once
|
||||
../../tmk_core/protocol/lufa/lufa.c:575: error: for each function it appears in.)
|
||||
make: *** [obj_alps64/protocol/lufa/lufa.o] Error 1
|
||||
```
|
||||
|
||||
|
||||
## AVR的BOOTLOADER_SIZE
|
||||
注意Teensy2.0++ bootloader的大小是2048字节。有些Makefile注释错了。
|
||||
|
||||
|
@@ -101,56 +101,6 @@ https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switc
|
||||
|
||||
http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
|
||||
|
||||
|
||||
## Bootloader跳转不好用
|
||||
在**Makefile**中正确配置**Makefile**大小。如果分区大小不正确,引导加载程序可能无法从**Magic command**和**Boot Magic**加载。
|
||||
```
|
||||
# bootloader字节数:
|
||||
# Atmel DFU loader(ATmega32U4) 4096
|
||||
# Atmel DFU loader(AT90USB128) 8192
|
||||
# LUFA bootloader(ATmega32U4) 4096
|
||||
# Arduino Caterina(ATmega32U4) 4096
|
||||
# USBaspLoader(ATmega***) 2048
|
||||
# Teensy halfKay(ATmega32U4) 512
|
||||
# Teensy++ halfKay(AT90USB128) 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
```
|
||||
AVR引导大小是通过**BOOTSZ**熔丝位来设置的。查阅你单片机的datasheet。
|
||||
记住,datasheet用的是**Word**(2字节)表示大小和地址,TMK用的是**Byte**。
|
||||
|
||||
AVR引导部分位于闪存的末尾,如下所示(Application是应用区,Bootloader是引导区)。
|
||||
```
|
||||
byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286)
|
||||
0x0000 +---------------+ 0x00000 +---------------+
|
||||
| | | |
|
||||
| | | |
|
||||
| Application | | Application |
|
||||
| | | |
|
||||
= = = =
|
||||
| | 32KB-4KB | | 128KB-8KB
|
||||
0x6000 +---------------+ 0x1E000 +---------------+
|
||||
| Bootloader | 4KB | Bootloader | 8KB
|
||||
0x7FFF +---------------+ 0x1FFFF +---------------+
|
||||
|
||||
|
||||
byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286)
|
||||
0x0000 +---------------+ 0x00000 +---------------+
|
||||
| | | |
|
||||
| | | |
|
||||
| Application | | Application |
|
||||
| | | |
|
||||
= = = =
|
||||
| | 32KB-512B | | 128KB-2KB
|
||||
0x7E00 +---------------+ 0x1FC00 +---------------+
|
||||
| Bootloader | 512B | Bootloader | 2KB
|
||||
0x7FFF +---------------+ 0x1FFFF +---------------+
|
||||
```
|
||||
|
||||
详情请见下方issue。
|
||||
https://github.com/tmk/tmk_keyboard/issues/179
|
||||
|
||||
如果你使用TeensyUSB, 有一个[已知bug](https://github.com/qmk/qmk_firmware/issues/164)硬件重置按钮阻止软件定义重置键工作。重新插拔键盘就好了。
|
||||
|
||||
## 特殊额外键不起作用(系统,音频控制键)
|
||||
你要在`rules.mk`定义`EXTRAKEY_ENABLE`在QMK中使用它们。
|
||||
|
||||
@@ -173,24 +123,6 @@ EXTRAKEY_ENABLE = yes # 音频控制和系统控制
|
||||
|
||||
Arduino Leonardo和micro使用**ATMega32U4**,该芯片TMK可用,但Arduino的bootloader会导致问题。
|
||||
|
||||
## 为锁定键添加指示灯
|
||||
你要自制CapsLock, ScrollLock 和 NumLock指示灯?见下文。
|
||||
|
||||
http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560
|
||||
|
||||
## 为Arduino Micro/Leonardo编程
|
||||
按下重置键然后在8秒内运行下方这样的命令。
|
||||
|
||||
```
|
||||
avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:adb_usb.hex -P/dev/ttyACM0
|
||||
```
|
||||
|
||||
设备名称因系统而异。
|
||||
|
||||
http://arduino.cc/en/Main/ArduinoBoardMicro
|
||||
https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867
|
||||
|
||||
|
||||
## USB 3 兼容性
|
||||
据传说有些人用USB3接口会有问题,用USB2的试试。
|
||||
|
||||
|
@@ -66,24 +66,8 @@ https://github.com/tmk/tmk_keyboard/issues/67
|
||||
远古机械键盘偶尔会有自锁机械开关,现在几乎没有了。***大多数情况下你不需要使用该功能,且要使用`KC_CAPS`, `KC_NLCK`和`KC_SLCK`这三个键码。***
|
||||
|
||||
## 输入ASCII之外的特殊字符比如Cédille 'Ç'
|
||||
没有在所有系统中输入这个的通用方法。你要定义针对你的特定操作系统或布局的**宏**。
|
||||
|
||||
比如看这个**宏**代码的文章。
|
||||
|
||||
http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p195620
|
||||
<!--翻译问题:下方维基百科链接应全部替换为中文链接,暂未找到全部-->
|
||||
在**Windows**上,可以用`AltGr`键或**Alt码**。
|
||||
* http://en.wikipedia.org/wiki/AltGr_key
|
||||
* https://zh.wikipedia.org/wiki/Alt%E7%A0%81
|
||||
|
||||
在**Mac OS**定义`Option`键组合。
|
||||
* https://zh.wikipedia.org/wiki/Option%E9%94%AE#%E6%9B%BF%E4%BB%A3%E9%94%AE%E7%9B%98%E8%BE%93%E5%85%A5
|
||||
|
||||
在**Xorg**可以改用`compose`键。
|
||||
* http://en.wikipedia.org/wiki/Compose_key
|
||||
|
||||
下方链接查看**Unicode**输入。
|
||||
* http://en.wikipedia.org/wiki/Unicode_input
|
||||
请见[Unicode](feature_unicode.md)功能。
|
||||
|
||||
## macOS上的`Fn`
|
||||
|
||||
@@ -136,51 +120,6 @@ https://github.com/tekezo/Karabiner/issues/403
|
||||
|
||||
请见[Grave Escape](feature_grave_esc.md)功能。
|
||||
|
||||
## 右侧双角色修改键(诸如Shift、Alt等有修改其他键作用的键)变箭头键
|
||||
右侧修改键单击时会变为箭头键,长按就还是修改键。在TMK中双角色键称之为**TAP**.
|
||||
```
|
||||
|
||||
#include "keymap_common.h"
|
||||
|
||||
|
||||
/* 用TMK双角色键功能实现右侧修改键改箭头键
|
||||
*
|
||||
* https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#213-modifier-with-tap-keydual-role
|
||||
* https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys
|
||||
*/
|
||||
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* 0: qwerty */
|
||||
[0] = LAYOUT( \
|
||||
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS,BSPC, \
|
||||
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \
|
||||
LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \
|
||||
LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,FN0, ESC, \
|
||||
FN4, LGUI,LALT, SPC, APP, FN2, FN1, FN3),
|
||||
[1] = LAYOUT( \
|
||||
GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS, \
|
||||
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\
|
||||
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
|
||||
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN5, TRNS, \
|
||||
TRNS,TRNS,TRNS, TRNS, TRNS,FN7, FN6, FN8),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_UP),
|
||||
[1] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_DOWN),
|
||||
[2] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_LEFT),
|
||||
[3] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RIGHT),
|
||||
[4] = ACTION_LAYER_MOMENTARY(1),
|
||||
[5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_PGUP),
|
||||
[6] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_PGDN),
|
||||
[7] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_HOME),
|
||||
[8] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_END),
|
||||
};
|
||||
|
||||
```
|
||||
|
||||
双角色键说明: https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys
|
||||
|
||||
|
||||
## Mac OSX的弹出键
|
||||
`KC_EJCT` 键码在OSX可以使用 https://github.com/tmk/tmk_keyboard/issues/250
|
||||
似乎Windows10会忽略该键码,Linux/Xorg可以识别该键码但默认不映射。
|
||||
|
@@ -3,7 +3,6 @@ tmk_core/protocol/bluefruit
|
||||
tmk_core/protocol/chibios
|
||||
tmk_core/protocol/iwrap
|
||||
tmk_core/protocol/lufa
|
||||
tmk_core/protocol/mbed
|
||||
tmk_core/protocol/midi
|
||||
tmk_core/protocol/midi/bytequeue
|
||||
tmk_core/protocol/midi/Config
|
||||
|
@@ -62,7 +62,7 @@ __attribute__((weak)) void i2c_init(void) {
|
||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT);
|
||||
|
||||
chThdSleepMilliseconds(10);
|
||||
#ifdef USE_I2CV1
|
||||
#if defined(USE_GPIOV1)
|
||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_STM32_ALTERNATE_OPENDRAIN);
|
||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_STM32_ALTERNATE_OPENDRAIN);
|
||||
#else
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#include "ch.h"
|
||||
#include <hal.h>
|
||||
|
||||
#if defined(STM32F1XX) || defined(STM32F1xx) || defined(STM32F2xx) || defined(STM32F4xx) || defined(STM32L0xx) || defined(STM32L1xx)
|
||||
#if defined(STM32F1XX) || defined(STM32F1xx) || defined(STM32F2xx) || defined(STM32F4xx) || defined(STM32F4XX) || defined(STM32L0xx) || defined(STM32L1xx)
|
||||
# define USE_I2CV1
|
||||
#endif
|
||||
|
||||
@@ -51,6 +51,20 @@
|
||||
# define I2C1_SDA 7
|
||||
#endif
|
||||
|
||||
#if defined(STM32F1XX) || defined(STM32F1xx)
|
||||
# define USE_GPIOV1
|
||||
#endif
|
||||
|
||||
#ifndef USE_GPIOV1
|
||||
// The default PAL alternate modes are used to signal that the pins are used for I2C
|
||||
# ifndef I2C1_SCL_PAL_MODE
|
||||
# define I2C1_SCL_PAL_MODE 4
|
||||
# endif
|
||||
# ifndef I2C1_SDA_PAL_MODE
|
||||
# define I2C1_SDA_PAL_MODE 4
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_I2CV1
|
||||
# ifndef I2C1_OPMODE
|
||||
# define I2C1_OPMODE OPMODE_I2C
|
||||
@@ -62,14 +76,6 @@
|
||||
# define I2C1_DUTY_CYCLE STD_DUTY_CYCLE /* FAST_DUTY_CYCLE_2 */
|
||||
# endif
|
||||
#else
|
||||
// The default PAL alternate modes are used to signal that the pins are used for I2C
|
||||
# ifndef I2C1_SCL_PAL_MODE
|
||||
# define I2C1_SCL_PAL_MODE 4
|
||||
# endif
|
||||
# ifndef I2C1_SDA_PAL_MODE
|
||||
# define I2C1_SDA_PAL_MODE 4
|
||||
# endif
|
||||
|
||||
// The default timing values below configures the I2C clock to 400khz assuming a 72Mhz clock
|
||||
// For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html
|
||||
# ifndef I2C1_TIMINGR_PRESC
|
||||
|
@@ -6,7 +6,7 @@
|
||||
/* Adapted from https://github.com/bigjosh/SimpleNeoPixelDemo/ */
|
||||
|
||||
#ifndef NOP_FUDGE
|
||||
# if defined(STM32F1XX) || defined(STM32F1xx) || defined(STM32F0XX) || defined(STM32F0xx) || defined(STM32F3XX) || defined(STM32F3xx) || defined(STM32L0XX) || defined(STM32L0xx)
|
||||
# if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX)
|
||||
# define NOP_FUDGE 0.4
|
||||
# else
|
||||
# error("NOP_FUDGE configuration required")
|
||||
|
@@ -14,24 +14,31 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Simple analog to digitial conversion
|
||||
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#include <stdint.h>
|
||||
#include "analog.h"
|
||||
|
||||
static uint8_t aref = (1 << REFS0); // default to AREF = Vcc
|
||||
static uint8_t aref = ADC_REF_POWER;
|
||||
|
||||
void analogReference(uint8_t mode) { aref = mode & 0xC0; }
|
||||
void analogReference(uint8_t mode) { aref = mode & (_BV(REFS1) | _BV(REFS0)); }
|
||||
|
||||
// Arduino compatible pin input
|
||||
int16_t analogRead(uint8_t pin) {
|
||||
#if defined(__AVR_ATmega32U4__)
|
||||
static const uint8_t PROGMEM pin_to_mux[] = {0x00, 0x01, 0x04, 0x05, 0x06, 0x07, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20};
|
||||
// clang-format off
|
||||
static const uint8_t PROGMEM pin_to_mux[] = {
|
||||
//A0 A1 A2 A3 A4 A5
|
||||
//F7 F6 F5 F4 F1 F0
|
||||
0x07, 0x06, 0x05, 0x04, 0x01, 0x00,
|
||||
//A6 A7 A8 A9 A10 A11
|
||||
//D4 D7 B4 B5 B6 D6
|
||||
0x20, 0x22, 0x23, 0x24, 0x25, 0x21
|
||||
};
|
||||
// clang-format on
|
||||
if (pin >= 12) return 0;
|
||||
return adc_read(pgm_read_byte(pin_to_mux + pin));
|
||||
#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
|
||||
#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega328P__)
|
||||
if (pin >= 8) return 0;
|
||||
return adc_read(pin);
|
||||
#else
|
||||
@@ -39,20 +46,87 @@ int16_t analogRead(uint8_t pin) {
|
||||
#endif
|
||||
}
|
||||
|
||||
// Mux input
|
||||
int16_t analogReadPin(pin_t pin) { return adc_read(pinToMux(pin)); }
|
||||
|
||||
uint8_t pinToMux(pin_t pin) {
|
||||
switch (pin) {
|
||||
// clang-format off
|
||||
#if defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
|
||||
case F0: return 0; // ADC0
|
||||
case F1: return _BV(MUX0); // ADC1
|
||||
case F2: return _BV(MUX1); // ADC2
|
||||
case F3: return _BV(MUX1) | _BV(MUX0); // ADC3
|
||||
case F4: return _BV(MUX2); // ADC4
|
||||
case F5: return _BV(MUX2) | _BV(MUX0); // ADC5
|
||||
case F6: return _BV(MUX2) | _BV(MUX1); // ADC6
|
||||
case F7: return _BV(MUX2) | _BV(MUX1) | _BV(MUX0); // ADC7
|
||||
default: return _BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1) | _BV(MUX0); // 0V
|
||||
#elif defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)
|
||||
case F0: return 0; // ADC0
|
||||
case F1: return _BV(MUX0); // ADC1
|
||||
case F4: return _BV(MUX2); // ADC4
|
||||
case F5: return _BV(MUX2) | _BV(MUX0); // ADC5
|
||||
case F6: return _BV(MUX2) | _BV(MUX1); // ADC6
|
||||
case F7: return _BV(MUX2) | _BV(MUX1) | _BV(MUX0); // ADC7
|
||||
case D4: return _BV(MUX5); // ADC8
|
||||
case D6: return _BV(MUX5) | _BV(MUX0); // ADC9
|
||||
case D7: return _BV(MUX5) | _BV(MUX1); // ADC10
|
||||
case B4: return _BV(MUX5) | _BV(MUX1) | _BV(MUX0); // ADC11
|
||||
case B5: return _BV(MUX5) | _BV(MUX2); // ADC12
|
||||
case B6: return _BV(MUX5) | _BV(MUX2) | _BV(MUX0); // ADC13
|
||||
default: return _BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1) | _BV(MUX0); // 0V
|
||||
#elif defined(__AVR_ATmega32A__)
|
||||
case A0: return 0; // ADC0
|
||||
case A1: return _BV(MUX0); // ADC1
|
||||
case A2: return _BV(MUX1); // ADC2
|
||||
case A3: return _BV(MUX1) | _BV(MUX0); // ADC3
|
||||
case A4: return _BV(MUX2); // ADC4
|
||||
case A5: return _BV(MUX2) | _BV(MUX0); // ADC5
|
||||
case A6: return _BV(MUX2) | _BV(MUX1); // ADC6
|
||||
case A7: return _BV(MUX2) | _BV(MUX1) | _BV(MUX0); // ADC7
|
||||
default: return _BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1) | _BV(MUX0); // 0V
|
||||
#elif defined(__AVR_ATmega328P__)
|
||||
case C0: return 0; // ADC0
|
||||
case C1: return _BV(MUX0); // ADC1
|
||||
case C2: return _BV(MUX1); // ADC2
|
||||
case C3: return _BV(MUX1) | _BV(MUX0); // ADC3
|
||||
case C4: return _BV(MUX2); // ADC4
|
||||
case C5: return _BV(MUX2) | _BV(MUX0); // ADC5
|
||||
// ADC7:6 not present in DIP package and not shared by GPIO pins
|
||||
default: return _BV(MUX3) | _BV(MUX2) | _BV(MUX1) | _BV(MUX0); // 0V
|
||||
#endif
|
||||
// clang-format on
|
||||
}
|
||||
}
|
||||
|
||||
int16_t adc_read(uint8_t mux) {
|
||||
#if defined(__AVR_AT90USB162__)
|
||||
return 0;
|
||||
#else
|
||||
uint8_t low;
|
||||
|
||||
ADCSRA = (1 << ADEN) | ADC_PRESCALER; // enable ADC
|
||||
ADCSRB = (1 << ADHSM) | (mux & 0x20); // high speed mode
|
||||
ADMUX = aref | (mux & 0x1F); // configure mux input
|
||||
ADCSRA = (1 << ADEN) | ADC_PRESCALER | (1 << ADSC); // start the conversion
|
||||
while (ADCSRA & (1 << ADSC))
|
||||
; // wait for result
|
||||
low = ADCL; // must read LSB first
|
||||
return (ADCH << 8) | low; // must read MSB only once!
|
||||
// Enable ADC and configure prescaler
|
||||
ADCSRA = _BV(ADEN) | ADC_PRESCALER;
|
||||
|
||||
#if defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)
|
||||
// High speed mode and ADC8-13
|
||||
ADCSRB = _BV(ADHSM) | (mux & _BV(MUX5));
|
||||
#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
|
||||
// High speed mode only
|
||||
ADCSRB = _BV(ADHSM);
|
||||
#endif
|
||||
|
||||
// Configure mux input
|
||||
#if defined(MUX4)
|
||||
ADMUX = aref | (mux & (_BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1) | _BV(MUX0)));
|
||||
#else
|
||||
ADMUX = aref | (mux & (_BV(MUX3) | _BV(MUX2) | _BV(MUX1) | _BV(MUX0)));
|
||||
#endif
|
||||
|
||||
// Start the conversion
|
||||
ADCSRA |= _BV(ADSC);
|
||||
// Wait for result
|
||||
while (ADCSRA & _BV(ADSC))
|
||||
;
|
||||
// Must read LSB first
|
||||
low = ADCL;
|
||||
// Must read MSB only once!
|
||||
return (ADCH << 8) | low;
|
||||
}
|
||||
|
@@ -14,45 +14,40 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _analog_h_included__
|
||||
#define _analog_h_included__
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void analogReference(uint8_t mode);
|
||||
int16_t analogRead(uint8_t pin);
|
||||
|
||||
int16_t analogReadPin(pin_t pin);
|
||||
uint8_t pinToMux(pin_t pin);
|
||||
|
||||
int16_t adc_read(uint8_t mux);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define ADC_REF_POWER (1 << REFS0)
|
||||
#define ADC_REF_INTERNAL ((1 << REFS1) | (1 << REFS0))
|
||||
#define ADC_REF_EXTERNAL (0)
|
||||
#define ADC_REF_EXTERNAL 0 // AREF, Internal Vref turned off
|
||||
#define ADC_REF_POWER _BV(REFS0) // AVCC with external capacitor on AREF pin
|
||||
#define ADC_REF_INTERNAL (_BV(REFS1) | _BV(REFS0)) // Internal 2.56V Voltage Reference with external capacitor on AREF pin (1.1V for 328P)
|
||||
|
||||
// These prescaler values are for high speed mode, ADHSM = 1
|
||||
#if F_CPU == 16000000L
|
||||
# define ADC_PRESCALER ((1 << ADPS2) | (1 << ADPS1))
|
||||
#if F_CPU == 16000000L || F_CPU == 12000000L
|
||||
# define ADC_PRESCALER (_BV(ADPS2) | _BV(ADPS1)) // /64
|
||||
#elif F_CPU == 8000000L
|
||||
# define ADC_PRESCALER ((1 << ADPS2) | (1 << ADPS0))
|
||||
# define ADC_PRESCALER (_BV(ADPS2) | _BV(ADPS0)) // /32
|
||||
#elif F_CPU == 4000000L
|
||||
# define ADC_PRESCALER ((1 << ADPS2))
|
||||
# define ADC_PRESCALER (_BV(ADPS2)) // /16
|
||||
#elif F_CPU == 2000000L
|
||||
# define ADC_PRESCALER ((1 << ADPS1) | (1 << ADPS0))
|
||||
# define ADC_PRESCALER (_BV(ADPS1) | _BV(ADPS0)) // /8
|
||||
#elif F_CPU == 1000000L
|
||||
# define ADC_PRESCALER ((1 << ADPS1))
|
||||
# define ADC_PRESCALER _BV(ADPS1) // /4
|
||||
#else
|
||||
# define ADC_PRESCALER ((1 << ADPS0))
|
||||
#endif
|
||||
|
||||
// some avr-libc versions do not properly define ADHSM
|
||||
#if defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
|
||||
# if !defined(ADHSM)
|
||||
# define ADHSM (7)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# define ADC_PRESCALER _BV(ADPS0) // /2
|
||||
#endif
|
||||
|
@@ -76,3 +76,20 @@ uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port) {
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
uint16_t pca9555_readAllPins(uint8_t slave_addr) {
|
||||
uint8_t addr = SLAVE_TO_ADDR(slave_addr);
|
||||
|
||||
typedef union {
|
||||
uint8_t u8[2];
|
||||
uint16_t u16;
|
||||
} data16;
|
||||
|
||||
data16 data;
|
||||
|
||||
i2c_status_t ret = i2c_readReg(addr, CMD_INPUT_0, &data.u8[0], sizeof(data), TIMEOUT);
|
||||
if (ret != I2C_STATUS_SUCCESS) {
|
||||
print("pca9555_readAllPins::FAILED\n");
|
||||
}
|
||||
return data.u16;
|
||||
}
|
||||
|
@@ -53,3 +53,5 @@ void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf);
|
||||
void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf);
|
||||
|
||||
uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port);
|
||||
|
||||
uint16_t pca9555_readAllPins(uint8_t slave_addr);
|
||||
|
@@ -21,6 +21,3 @@
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
@@ -18,8 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include QMK_KEYBOARD_CONFIG_H
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x3060
|
||||
|
@@ -54,7 +54,7 @@ bool is_keyboard_master(void)
|
||||
}
|
||||
|
||||
static void keyboard_master_setup(void) {
|
||||
#if defined(USE_I2C) || defined(EH)
|
||||
#if defined(USE_I2C)
|
||||
#ifdef SSD1306OLED
|
||||
matrix_master_OLED_init ();
|
||||
#endif
|
||||
|
@@ -18,7 +18,7 @@
|
||||
extern backlight_config_t backlight_config;
|
||||
#endif
|
||||
|
||||
#if defined(USE_I2C) || defined(EH)
|
||||
#if defined(USE_I2C)
|
||||
|
||||
#include "i2c.h"
|
||||
|
||||
|
@@ -13,7 +13,7 @@
|
||||
* 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 "angel64.h"
|
||||
#include "alpha.h"
|
||||
|
||||
// Optional override functions below.
|
||||
// You can leave any or all of these undefined.
|
@@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x0000
|
||||
#define PRODUCT_ID 0x0A64
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER kakunpc
|
||||
#define PRODUCT angel64
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"keyboard_name": "angel64",
|
||||
"keyboard_name": "angel64_alpha",
|
||||
"url": "https://kakunpc.booth.pm/",
|
||||
"maintainer": "kakunpc",
|
||||
"width": 14,
|
60
keyboards/angel64/alpha/keymaps/default/keymap.c
Normal file
60
keyboards/angel64/alpha/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,60 @@
|
||||
/* Copyright 2019 kakunpc
|
||||
*
|
||||
* 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 layers{
|
||||
BASE = 0,
|
||||
COMMAND
|
||||
};
|
||||
|
||||
#define KC_COMMAND LT(COMMAND,KC_SPC)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[BASE] = LAYOUT(
|
||||
KC_GRV, 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_BSPC,
|
||||
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_BSLS,
|
||||
LCTL_T(KC_TAB), 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_UP, KC_RSFT,
|
||||
KC_TAB, KC_LALT, KC_LGUI, KC_COMMAND, KC_SPC, KC_COMMAND, KC_APP, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL),
|
||||
[COMMAND] = LAYOUT(
|
||||
KC_ESC, 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_BSPC,
|
||||
KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, _______, KC_NO, _______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO),
|
||||
};
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
void oled_task_user(void) {
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
switch (biton32(layer_state)) {
|
||||
case BASE:
|
||||
oled_write_P(PSTR("Default\n"), false);
|
||||
break;
|
||||
case COMMAND:
|
||||
oled_write_P(PSTR("COMMAND\n"), false);
|
||||
break;
|
||||
default:
|
||||
// Or use the write_ln shortcut over adding 'n' to the end of your string
|
||||
oled_write_ln_P(PSTR("Undefined"), false);
|
||||
}
|
||||
|
||||
// Host Keyboard LED Status
|
||||
oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false);
|
||||
oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
|
||||
oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
|
||||
}
|
||||
#endif
|
15
keyboards/angel64/alpha/readme.md
Normal file
15
keyboards/angel64/alpha/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# angel64
|
||||
|
||||

|
||||
|
||||
Keyboard for tablets.
|
||||
|
||||
* Keyboard Maintainer: [kakunpc](https://github.com/kakunpc)
|
||||
* Hardware Supported: angel64_alpha, promicro
|
||||
* Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/))
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make angel64/alpha:default
|
||||
|
||||
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).
|
@@ -1,58 +0,0 @@
|
||||
/* Copyright 2019 kakunpc
|
||||
*
|
||||
* 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 layers{
|
||||
BASE = 0,
|
||||
COMMAND
|
||||
};
|
||||
|
||||
#define KC_COMMAND LT(COMMAND,KC_SPC)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[BASE] = LAYOUT(
|
||||
KC_GRV, 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_BSPC ,
|
||||
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_BSLS,
|
||||
KC_TAB, 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_UP, KC_RSFT,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_COMMAND, KC_SPC, KC_COMMAND, KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL
|
||||
),
|
||||
[COMMAND] = LAYOUT(
|
||||
KC_ESC, 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_BSPC ,
|
||||
KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
|
||||
)
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
}
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
}
|
@@ -1,12 +1,12 @@
|
||||
# angel64
|
||||
|
||||

|
||||

|
||||
|
||||
Keyboard for tablets.
|
||||
|
||||
Keyboard Maintainer: [kakunpc](https://github.com/kakunpc)
|
||||
Hardware Supported: angel64_alpha, promicro
|
||||
Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/))
|
||||
* Keyboard Maintainer: [kakunpc](https://github.com/kakunpc)
|
||||
* Hardware Supported: angel64_alpha, angel64_rev1, promicro
|
||||
* Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/))
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
|
242
keyboards/angel64/rev1/config.h
Normal file
242
keyboards/angel64/rev1/config.h
Normal file
@@ -0,0 +1,242 @@
|
||||
/*
|
||||
Copyright 2019 kakunpc
|
||||
|
||||
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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x0A64
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER kakunpc
|
||||
#define PRODUCT angel64
|
||||
#define DESCRIPTION A custom keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 12
|
||||
#define MATRIX_COLS 6
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 }
|
||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/*
|
||||
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||
*/
|
||||
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||
|
||||
// #define BACKLIGHT_PIN B7
|
||||
// #define BACKLIGHT_BREATHING
|
||||
// #define BACKLIGHT_LEVELS 3
|
||||
|
||||
#define RGB_DI_PIN D3
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLED_NUM 64
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#define RGBLIGHT_LIMIT_VAL 25 /* 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
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* 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 userful 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
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
/* defined by default; to change, uncomment and set to the combination you want */
|
||||
// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP H
|
||||
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER B
|
||||
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* 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
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
/*
|
||||
* HD44780 LCD Display Configuration
|
||||
*/
|
||||
/*
|
||||
#define LCD_LINES 2 //< number of visible lines of the display
|
||||
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||
|
||||
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||
|
||||
#if LCD_IO_MODE
|
||||
#define LCD_PORT PORTB //< port for the LCD lines
|
||||
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||
#define LCD_RS_PIN 3 //< pin for RS line
|
||||
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||
#define LCD_RW_PIN 2 //< pin for RW line
|
||||
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||
#define LCD_E_PIN 1 //< pin for Enable line
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* Bootmagic Lite key configuration */
|
||||
// #define BOOTMAGIC_LITE_ROW 0
|
||||
// #define BOOTMAGIC_LITE_COLUMN 0
|
12
keyboards/angel64/rev1/info.json
Normal file
12
keyboards/angel64/rev1/info.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"keyboard_name": "angel64_rev1",
|
||||
"url": "https://kakunpc.booth.pm/",
|
||||
"maintainer": "kakunpc",
|
||||
"width": 15,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"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 Lock", "x":0, "y":2, "w":2}, {"label":"A", "x":2, "y":2}, {"label":"S", "x":3, "y":2}, {"label":"D", "x":4, "y":2}, {"label":"F", "x":5, "y":2}, {"label":"G", "x":6, "y":2}, {"label":"H", "x":7, "y":2}, {"label":"J", "x":8, "y":2}, {"label":"K", "x":9, "y":2}, {"label":"L", "x":10, "y":2}, {"label":":", "x":11, "y":2}, {"label":"\"", "x":12, "y":2}, {"label":"Enter", "x":13, "y":2, "w":2}, {"label":"Shift", "x":0, "y":3, "w":2.5}, {"label":"Z", "x":2.5, "y":3}, {"label":"X", "x":3.5, "y":3}, {"label":"C", "x":4.5, "y":3}, {"label":"V", "x":5.5, "y":3}, {"label":"B", "x":6.5, "y":3}, {"label":"N", "x":7.5, "y":3}, {"label":"M", "x":8.5, "y":3}, {"label":"<", "x":9.5, "y":3}, {"label":">", "x":10.5, "y":3}, {"label":"?", "x":11.5, "y":3}, {"label":"Shift", "x":12.5, "y":3, "w":2.5}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Alt", "x":1.25, "y":4, "w":1.5}, {"label":"Win", "x":2.75, "y":4, "w":1.5}, {"x":4.25, "y":4}, {"x":5.25, "y":4, "w":1.5}, {"x":6.75, "y":4, "w":1.5}, {"x":8.25, "y":4, "w":1.5}, {"x":9.75, "y":4}, {"label":"Alt", "x":10.75, "y":4, "w":1.5}, {"label":"Menu", "x":12.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
|
||||
}
|
||||
}
|
||||
}
|
19
keyboards/angel64/rev1/keymaps/default/config.h
Normal file
19
keyboards/angel64/rev1/keymaps/default/config.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/* Copyright 2019 kakunpc
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// place overrides here
|
34
keyboards/angel64/rev1/keymaps/default/keymap.c
Normal file
34
keyboards/angel64/rev1/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,34 @@
|
||||
/* Copyright 2019 kakunpc
|
||||
*
|
||||
* 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
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_all(
|
||||
KC_GRV, 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_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_BSLS,
|
||||
KC_CAPS, 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,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_APP, KC_RCTL),
|
||||
};
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
void oled_task_user(void) {
|
||||
// Host Keyboard LED Status
|
||||
oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false);
|
||||
oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
|
||||
oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
|
||||
}
|
||||
#endif
|
1
keyboards/angel64/rev1/keymaps/default/readme.md
Normal file
1
keyboards/angel64/rev1/keymaps/default/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default keymap for angel64
|
19
keyboards/angel64/rev1/keymaps/kakunpc/config.h
Normal file
19
keyboards/angel64/rev1/keymaps/kakunpc/config.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/* Copyright 2019 kakunpc
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// place overrides here
|
195
keyboards/angel64/rev1/keymaps/kakunpc/keymap.c
Normal file
195
keyboards/angel64/rev1/keymaps/kakunpc/keymap.c
Normal file
@@ -0,0 +1,195 @@
|
||||
/* Copyright 2019 kakunpc
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
#define USE_LED_RIPPLE_EFFECT
|
||||
// #define RANDOM_RIPPLE_EFFECT
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "lufa.h"
|
||||
|
||||
#ifdef USE_LED_RIPPLE_EFFECT
|
||||
struct keybuf {
|
||||
char col, row;
|
||||
char frame;
|
||||
};
|
||||
struct keybuf keybufs[256];
|
||||
unsigned char keybuf_begin, keybuf_end;
|
||||
|
||||
unsigned char r = 0;
|
||||
unsigned char g = 112;
|
||||
unsigned char b = 255;
|
||||
int col, row;
|
||||
#endif
|
||||
|
||||
|
||||
enum layers{
|
||||
BASE = 0,
|
||||
COMMAND
|
||||
};
|
||||
|
||||
#define KC_COMMAND_NUM LT(COMMAND,KC_F13)
|
||||
#define KC_COMMAND_KANA LT(COMMAND,KC_F14)
|
||||
#define KC_COMMAND LT(COMMAND,KC_SPC)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[BASE] = LAYOUT_all(
|
||||
KC_GRV, 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_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_BSLS,
|
||||
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,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_COMMAND_NUM, KC_SPC, KC_SPC, KC_SPC, KC_COMMAND_KANA, KC_RALT, MO(COMMAND),KC_RCTL),
|
||||
[COMMAND] = LAYOUT_all(
|
||||
KC_ESC, 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_BSPC,
|
||||
KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_LCTL, KC_NO, KC_NO, _______, KC_NO, RGB_MOD, KC_NO, _______, KC_NO, _______, KC_NO),
|
||||
};
|
||||
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
#ifdef USE_LED_RIPPLE_EFFECT
|
||||
col = record->event.key.col;
|
||||
row = record->event.key.row;
|
||||
if (record->event.pressed) {
|
||||
int end = keybuf_end;
|
||||
keybufs[end].col = col;
|
||||
keybufs[end].row = row;
|
||||
keybufs[end].frame = 0;
|
||||
keybuf_end ++;
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
#ifdef USE_LED_RIPPLE_EFFECT
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef USE_LED_RIPPLE_EFFECT
|
||||
int scan_count = -10;
|
||||
int keys[] = { 14, 14, 13, 12, 11 };
|
||||
int keys_sum[] = { 0, 14, 28, 41, 53 };
|
||||
unsigned char rgb[14][5][3];
|
||||
int row_max = 12;
|
||||
int ToIndex(char _col, char _row) {
|
||||
return (_col * row_max) + _row;
|
||||
}
|
||||
|
||||
void led_ripple_effect(void){
|
||||
if (scan_count == -1) {
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
} else if (scan_count >= 0 && scan_count < 5) {
|
||||
for (unsigned char c=keybuf_begin; c!=keybuf_end; c++) {
|
||||
int i = c;
|
||||
// FIXME:
|
||||
|
||||
int index = ToIndex(keybufs[i].col,keybufs[i].row);
|
||||
int coll = 0;
|
||||
for(int s = 4; s >= 0; --s){
|
||||
if( index >= keys_sum[s]){
|
||||
coll = s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
int roww = MAX(0,index - keys_sum[coll]);
|
||||
|
||||
int y = scan_count;
|
||||
int dist_y = abs(y - coll);
|
||||
for (int x=0; x<keys[y]; x++) {
|
||||
int dist = abs(x - roww) + dist_y;
|
||||
if (dist <= keybufs[i].frame) {
|
||||
int elevation = MAX(0, (8 + dist - keybufs[i].frame)) << 2;
|
||||
if (elevation) {
|
||||
if ((rgb[x][y][0] != 255) && r) { rgb[x][y][0] = MIN(255, elevation + rgb[x][y][0]); }
|
||||
if ((rgb[x][y][1] != 255) && g) { rgb[x][y][1] = MIN(255, elevation + rgb[x][y][1]); }
|
||||
if ((rgb[x][y][2] != 255) && b) { rgb[x][y][2] = MIN(255, elevation + rgb[x][y][2]); }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (scan_count == 5) {
|
||||
for (unsigned char c=keybuf_begin; c!=keybuf_end; c++) {
|
||||
int i = c;
|
||||
if (keybufs[i].frame < 64) {
|
||||
keybufs[i].frame ++;
|
||||
} else {
|
||||
keybuf_begin ++;
|
||||
}
|
||||
}
|
||||
} else if (scan_count >= 6 && scan_count <= 10) {
|
||||
int y = scan_count - 6;
|
||||
for (int x=0; x<keys[y]; x++) {
|
||||
int at = keys_sum[y] + x;
|
||||
led[at].r = rgb[x][y][0];
|
||||
led[at].g = rgb[x][y][1];
|
||||
led[at].b = rgb[x][y][2];
|
||||
}
|
||||
rgblight_set();
|
||||
} else if (scan_count == 11) {
|
||||
memset(rgb, 0, sizeof(rgb));
|
||||
}
|
||||
scan_count++;
|
||||
if (scan_count >= 12) { scan_count = 0; }
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
#ifdef USE_LED_RIPPLE_EFFECT
|
||||
#ifdef RANDOM_RIPPLE_EFFECT
|
||||
static int timer = 0;
|
||||
static int timeout = 300;
|
||||
timer++;
|
||||
if(timer > timeout){
|
||||
int end = keybuf_end;
|
||||
col = rand() % 6;
|
||||
row = rand() % 12;
|
||||
keybufs[end].col = col;
|
||||
keybufs[end].row = row;
|
||||
keybufs[end].frame = 0;
|
||||
keybuf_end ++;
|
||||
timer = rand() % timeout;
|
||||
}
|
||||
#endif
|
||||
led_ripple_effect();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
void oled_task_user(void) {
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
switch (biton32(layer_state)) {
|
||||
case BASE:
|
||||
oled_write_P(PSTR("Default\n"), false);
|
||||
break;
|
||||
case COMMAND:
|
||||
oled_write_P(PSTR("COMMAND\n"), false);
|
||||
break;
|
||||
default:
|
||||
// Or use the write_ln shortcut over adding 'n' to the end of your string
|
||||
oled_write_ln_P(PSTR("Undefined"), false);
|
||||
}
|
||||
|
||||
// Host Keyboard LED Status
|
||||
oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false);
|
||||
oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
|
||||
oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
|
||||
}
|
||||
#endif
|
1
keyboards/angel64/rev1/keymaps/kakunpc/readme.md
Normal file
1
keyboards/angel64/rev1/keymaps/kakunpc/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The kakunpc keymap for angel64
|
287
keyboards/angel64/rev1/matrix.c
Normal file
287
keyboards/angel64/rev1/matrix.c
Normal file
@@ -0,0 +1,287 @@
|
||||
/*
|
||||
Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar
|
||||
|
||||
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 <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "wait.h"
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
#include "debounce.h"
|
||||
#include "quantum.h"
|
||||
|
||||
#if (MATRIX_COLS <= 8)
|
||||
# define print_matrix_header() print("\nr/c 01234567\n")
|
||||
# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop(matrix[i])
|
||||
# define ROW_SHIFTER ((uint8_t)1)
|
||||
#elif (MATRIX_COLS <= 16)
|
||||
# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n")
|
||||
# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop16(matrix[i])
|
||||
# define ROW_SHIFTER ((uint16_t)1)
|
||||
#elif (MATRIX_COLS <= 32)
|
||||
# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n")
|
||||
# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop32(matrix[i])
|
||||
# define ROW_SHIFTER ((uint32_t)1)
|
||||
#endif
|
||||
|
||||
#ifdef MATRIX_MASKED
|
||||
extern const matrix_row_t matrix_mask[];
|
||||
#endif
|
||||
|
||||
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
||||
|
||||
/* matrix state(1:on, 0:off) */
|
||||
static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values
|
||||
static matrix_row_t matrix[MATRIX_ROWS]; //debounced values
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_rows(void) {
|
||||
return MATRIX_ROWS;
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_cols(void) {
|
||||
return MATRIX_COLS;
|
||||
}
|
||||
|
||||
//Deprecated.
|
||||
bool matrix_is_modified(void)
|
||||
{
|
||||
if (debounce_active()) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
inline
|
||||
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||
{
|
||||
return (matrix[row] & ((matrix_row_t)1<<col));
|
||||
}
|
||||
|
||||
inline
|
||||
matrix_row_t matrix_get_row(uint8_t row)
|
||||
{
|
||||
// Matrix mask lets you disable switches in the returned matrix data. For example, if you have a
|
||||
// switch blocker installed and the switch is always pressed.
|
||||
#ifdef MATRIX_MASKED
|
||||
return matrix[row] & matrix_mask[row];
|
||||
#else
|
||||
return matrix[row];
|
||||
#endif
|
||||
}
|
||||
|
||||
void matrix_print(void)
|
||||
{
|
||||
print_matrix_header();
|
||||
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
phex(row); print(": ");
|
||||
print_matrix_row(row);
|
||||
print("\n");
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t matrix_key_count(void)
|
||||
{
|
||||
uint8_t count = 0;
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
count += matrix_bitpop(i);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
static void select_row(uint8_t row)
|
||||
{
|
||||
setPinOutput(row_pins[row]);
|
||||
writePinLow(row_pins[row]);
|
||||
}
|
||||
|
||||
static void unselect_row(uint8_t row)
|
||||
{
|
||||
setPinInputHigh(row_pins[row]);
|
||||
}
|
||||
|
||||
static void unselect_rows(void)
|
||||
{
|
||||
for(uint8_t x = 0; x < MATRIX_ROWS; x++) {
|
||||
setPinInputHigh(row_pins[x]);
|
||||
}
|
||||
}
|
||||
|
||||
static void select_col(uint8_t col)
|
||||
{
|
||||
setPinOutput(col_pins[col]);
|
||||
writePinLow(col_pins[col]);
|
||||
}
|
||||
|
||||
static void unselect_col(uint8_t col)
|
||||
{
|
||||
setPinInputHigh(col_pins[col]);
|
||||
}
|
||||
|
||||
static void unselect_cols(void)
|
||||
{
|
||||
for(uint8_t x = 0; x < MATRIX_COLS; x++) {
|
||||
setPinInputHigh(col_pins[x]);
|
||||
}
|
||||
}
|
||||
|
||||
static void init_pins(void) {
|
||||
unselect_rows();
|
||||
unselect_cols();
|
||||
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
|
||||
setPinInputHigh(col_pins[x]);
|
||||
}
|
||||
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
|
||||
setPinInputHigh(row_pins[x]);
|
||||
}
|
||||
}
|
||||
|
||||
static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
|
||||
{
|
||||
// Store last value of row prior to reading
|
||||
matrix_row_t last_row_value = current_matrix[current_row];
|
||||
|
||||
// Clear data in matrix row
|
||||
current_matrix[current_row] = 0;
|
||||
|
||||
// Select row and wait for row selecton to stabilize
|
||||
select_row(current_row);
|
||||
wait_us(30);
|
||||
|
||||
// For each col...
|
||||
for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
|
||||
|
||||
// Select the col pin to read (active low)
|
||||
uint8_t pin_state = readPin(col_pins[col_index]);
|
||||
|
||||
// Populate the matrix row with the state of the col pin
|
||||
current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
|
||||
}
|
||||
|
||||
// Unselect row
|
||||
unselect_row(current_row);
|
||||
|
||||
return (last_row_value != current_matrix[current_row]);
|
||||
}
|
||||
|
||||
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
|
||||
{
|
||||
bool matrix_changed = false;
|
||||
|
||||
// Select col and wait for col selecton to stabilize
|
||||
select_col(current_col);
|
||||
wait_us(30);
|
||||
|
||||
// For each row...
|
||||
for(uint8_t row_index = 0; row_index < MATRIX_ROWS/2; row_index++)
|
||||
{
|
||||
uint8_t tmp = row_index + MATRIX_ROWS/2;
|
||||
// Store last value of row prior to reading
|
||||
matrix_row_t last_row_value = current_matrix[tmp];
|
||||
|
||||
// Check row pin state
|
||||
if (readPin(row_pins[row_index]) == 0)
|
||||
{
|
||||
// Pin LO, set col bit
|
||||
current_matrix[tmp] |= (ROW_SHIFTER << current_col);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Pin HI, clear col bit
|
||||
current_matrix[tmp] &= ~(ROW_SHIFTER << current_col);
|
||||
}
|
||||
|
||||
// Determine if the matrix changed state
|
||||
if ((last_row_value != current_matrix[tmp]) && !(matrix_changed))
|
||||
{
|
||||
matrix_changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Unselect col
|
||||
unselect_col(current_col);
|
||||
|
||||
return matrix_changed;
|
||||
}
|
||||
|
||||
void matrix_init(void) {
|
||||
|
||||
// initialize key pins
|
||||
init_pins();
|
||||
|
||||
// initialize matrix state: all keys off
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||
raw_matrix[i] = 0;
|
||||
matrix[i] = 0;
|
||||
}
|
||||
|
||||
debounce_init(MATRIX_ROWS);
|
||||
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
bool changed = false;
|
||||
|
||||
// Set row, read cols
|
||||
for (uint8_t current_row = 0; current_row < MATRIX_ROWS / 2; current_row++) {
|
||||
changed |= read_cols_on_row(raw_matrix, current_row);
|
||||
}
|
||||
//else
|
||||
// Set col, read rows
|
||||
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
|
||||
changed |= read_rows_on_col(raw_matrix, current_col);
|
||||
}
|
||||
|
||||
debounce(raw_matrix, matrix, MATRIX_ROWS, changed);
|
||||
|
||||
matrix_scan_quantum();
|
||||
return (uint8_t)changed;
|
||||
}
|
15
keyboards/angel64/rev1/readme.md
Normal file
15
keyboards/angel64/rev1/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# angel64
|
||||
|
||||

|
||||
|
||||
Keyboard for tablets.
|
||||
|
||||
* Keyboard Maintainer: [kakunpc](https://github.com/kakunpc)
|
||||
* Hardware Supported: angel64_rev1, promicro
|
||||
* Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/))
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make angel64/rev1:default
|
||||
|
||||
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).
|
51
keyboards/angel64/rev1/rev1.c
Normal file
51
keyboards/angel64/rev1/rev1.c
Normal file
@@ -0,0 +1,51 @@
|
||||
/* Copyright 2019 kakunpc
|
||||
*
|
||||
* 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 "rev1.h"
|
||||
|
||||
// Optional override functions below.
|
||||
// You can leave any or all of these undefined.
|
||||
// These are only required if you want to perform custom actions.
|
||||
|
||||
/*
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
||||
*/
|
48
keyboards/angel64/rev1/rev1.h
Normal file
48
keyboards/angel64/rev1/rev1.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* Copyright 2019 kakunpc
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
/* This a shortcut to help you visually see your layout.
|
||||
*
|
||||
* The first section contains all of the arguments representing the physical
|
||||
* layout of the board and position of the keys.
|
||||
*
|
||||
* The second converts the arguments into a two-dimensional array which
|
||||
* represents the switch matrix.
|
||||
*/
|
||||
#define LAYOUT_all( \
|
||||
k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, \
|
||||
k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, \
|
||||
k29, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, \
|
||||
k42, k43, k44, k45, k46, k47, k48, k49, k50, k51, k52, k53, \
|
||||
k54, k55, k56, k57, k58, k59, k60, k61, k62, k63, k64\
|
||||
) \
|
||||
{ \
|
||||
{ k01, k13, k25, k37, k49, k61 }, \
|
||||
{ k02, k14, k26, k38, k50, k62 }, \
|
||||
{ k03, k15, k27, k39, k51, k63 }, \
|
||||
{ k04, k16, k28, k40, k52, k64 }, \
|
||||
{ k05, k17, k29, k41, k53, KC_NO }, \
|
||||
{ k06, k18, k30, k42, k54, KC_NO }, \
|
||||
{ k07, k19, k31, k43, k55, KC_NO }, \
|
||||
{ k08, k20, k32, k44, k56, KC_NO }, \
|
||||
{ k09, k21, k33, k45, k57, KC_NO }, \
|
||||
{ k10, k22, k34, k46, k58, KC_NO }, \
|
||||
{ k11, k23, k35, k47, k59, KC_NO }, \
|
||||
{ k12, k24, k36, k48, k60, KC_NO } \
|
||||
}
|
@@ -31,6 +31,9 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||
OLED_DRIVER_ENABLE = yes
|
||||
CUSTOM_MATRIX = yes
|
||||
|
||||
SRC += matrix.c
|
||||
|
||||
DEFAULT_FOLDER = angel64/rev1
|
||||
|
196
keyboards/atreus62/keymaps/d4mation/keymap.c
Normal file
196
keyboards/atreus62/keymaps/d4mation/keymap.c
Normal file
@@ -0,0 +1,196 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "d4mation.h"
|
||||
|
||||
enum layer_names {
|
||||
_DVR,
|
||||
_QWR,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_NUM,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum keymap_custom_keycodes {
|
||||
LOWER = NEW_SAFE_RANGE,
|
||||
RAISE
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Default/Dvorak layer
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | / |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Tab | ' | , | . | P | Y | | F | G | C | R | L | = |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Ctrl | A | O | E | U | I |,------.,------.| D | H | T | N | S | - |
|
||||
* |------+------+------+------+------+------|| || ||------+------+------+------+------+------|
|
||||
* |Shift | ; | Q | J | K | X ||Super ||Enter || B | M | W | V | Z | \ |
|
||||
* |------+------+------+------+------+------|| || ||------+------+------+------+------+------|
|
||||
* | NUM | Alt | Home | End |Lower | Bksp |`------'`------'|Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------' `-----------------------------------------'
|
||||
*/
|
||||
|
||||
[_DVR] = LAYOUT(
|
||||
_GRAVE_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH,
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_EQL,
|
||||
KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
|
||||
TD(SHIFT_CAPS), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_BSLS,
|
||||
TG(_NUM), KC_RALT, KC_HOME, KC_END, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
|
||||
),
|
||||
|
||||
/* Qwerty layer, more "standard" for other people who may need to use my keyboard or for games where using Qwerty is just easier
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Ctrl | A | S | D | F | G |,------.,------.| H | J | K | L | ; | ' |
|
||||
* |------+------+------+------+------+------|| || ||------+------+------+------+------+------|
|
||||
* |Shift | Z | X | C | V | B ||Super ||Enter || N | M | , | . | / | = |
|
||||
* |------+------+------+------+------+------|| || ||------+------+------+------+------+------|
|
||||
* | NUM | Alt | Home | End |Lower | Bksp |`------'`------'|Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------' `-----------------------------------------'
|
||||
*/
|
||||
|
||||
[_QWR] = LAYOUT(
|
||||
_GRAVE_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
TD(SHIFT_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_EQL,
|
||||
TG(_NUM), KC_RALT, KC_HOME, KC_END, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
|
||||
),
|
||||
|
||||
/* "Lower" layer
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | |SLEEP | | | | | SCRGB| | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | |,------.,------.| | | | { | } | |
|
||||
* |------+------+------+------+------+------|| || ||------+------+------+------+------+------|
|
||||
* | | | | | | || || || | Mute | VolD | VolU | | |
|
||||
* |------+------+------+------+------+------|| || ||------+------+------+------+------+------|
|
||||
* | | |PageUp|PgDown| | Del |`------'`------'| Ins | | | | | |
|
||||
* `-----------------------------------------' `-----------------------------------------'
|
||||
*/
|
||||
|
||||
[_LOWER] = LAYOUT(
|
||||
KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12,
|
||||
_______, _______, _______, _______, SLEEP, _______, _______, _______, SCRGB, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______,
|
||||
_______, _______, KC_PGUP, KC_PGDN, _______, KC_DEL, _______, _______, KC_INS, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* "Raise" layer
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | |<?php>| ?> | | | |ZALGO | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | Shrug|Lenny |Magic |Disfac| |,------.,------.| | | | [ | ] | |
|
||||
* |------+------+------+------+------+------|| || ||------+------+------+------+------+------|
|
||||
* | | Ameno| Tflip| Tput | | || || || | Prev | Play | Next | | |
|
||||
* |------+------+------+------+------+------|| || ||------+------+------+------+------+------|
|
||||
* | | |PageUp|PgDown| | Del |`------'`------'| Ins | | | | | |
|
||||
* `-----------------------------------------' `-----------------------------------------'
|
||||
*/
|
||||
|
||||
[_RAISE] = LAYOUT(
|
||||
KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12,
|
||||
_______, _______, PHPOPEN, PHPCLSE, _______, _______, ZALGO, _______, _______, _______, _______, _______,
|
||||
_______, SHRUG, LENNY, MAGIC, DISFACE, _______, _______, _______, _______, KC_LBRC, KC_RBRC,_______,
|
||||
_______, AMENO, TFLIP, TPUT, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______,
|
||||
_______, _______, KC_PGUP, KC_PGDN, _______, KC_DEL, _______, _______, KC_INS, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* "Numpad" layer
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | | / | * | - | | | | | / | * | - | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | 7 | 8 | 9 | + | | | | 7 | 8 | 9 | + | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | 4 | 5 | 6 | + | |,------.,------.| | 4 | 5 | 6 | + | |
|
||||
* |------+------+------+------+------+------|| || ||------+------+------+------+------+------|
|
||||
* | | 1 | 2 | 3 | Enter| || || || | 1 | 2 | 3 | Enter| |
|
||||
* |------+------+------+------+------+------|| || ||------+------+------+------+------+------|
|
||||
* | | 0 | 0 | . | Enter| |`------'`------'| | 0 | 0 | . | Enter| |
|
||||
* `-----------------------------------------' `-----------------------------------------'
|
||||
*/
|
||||
|
||||
[_NUM] = LAYOUT(
|
||||
_______, _______, KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, KC_PSLS, KC_PAST, KC_PMNS, _______,
|
||||
_______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, _______,
|
||||
_______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______,
|
||||
_______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______,
|
||||
_______, KC_KP_0, KC_KP_0, KC_PDOT, KC_PENT, _______, _______, _______, _______, KC_KP_0, KC_KP_0, KC_PDOT, KC_PENT, _______
|
||||
),
|
||||
|
||||
/* "Adjust" layer, only active if both "Lower" and "Raise" are active at the same time
|
||||
* All unused keys are blanked out for this layer
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | NO | NO | NO | NO | NO | NO | | NO | NO | NO | NO | NO | NO |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | NO |RESET | NO | NO | NO | NO | | NO | NO | NO | NO | NO | NO |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | NO | NO | NO |UC WIN|UC OSX| NO |,------.,------.| NO |Dvorak|Qwerty| NO | NO | NO |
|
||||
* |------+------+------+------+------+------|| Swap || ||------+------+------+------+------+------|
|
||||
* | NO | NO | NO | NO | NO | NO || to || Swap || NO | NO | NO | NO | NO | NO |
|
||||
* |------+------+------+------+------+------|| Ctrl || Back ||------+------+------+------+------+------|
|
||||
* | NO | NO | NO | NO | | NO |`------'`------'| NO | | NO | NO | NO | NO |
|
||||
* `-----------------------------------------' `-----------------------------------------'
|
||||
*/
|
||||
|
||||
[_ADJUST] = LAYOUT(
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, UC_M_WI, UC_M_OS, XXXXXXX, XXXXXXX, DF(_DVR),DF(_QWR),XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, CG_SWAP, CG_NORM, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
/* Runs just one time when the keyboard initializes. */
|
||||
void eeconfig_init_keymap( void ) {
|
||||
set_unicode_input_mode( UC_OSX );
|
||||
};
|
||||
|
||||
bool process_record_keymap( uint16_t keycode, keyrecord_t *record ) {
|
||||
|
||||
switch ( keycode ) {
|
||||
|
||||
case LOWER:
|
||||
|
||||
if ( record->event.pressed ) {
|
||||
layer_on( _LOWER );
|
||||
update_tri_layer( _LOWER, _RAISE, _ADJUST );
|
||||
}
|
||||
else {
|
||||
layer_off( _LOWER );
|
||||
update_tri_layer( _LOWER, _RAISE, _ADJUST );
|
||||
}
|
||||
|
||||
return false;
|
||||
break;
|
||||
|
||||
case RAISE :
|
||||
|
||||
if ( record->event.pressed ) {
|
||||
layer_on( _RAISE );
|
||||
update_tri_layer( _LOWER, _RAISE, _ADJUST );
|
||||
}
|
||||
else {
|
||||
layer_off( _RAISE );
|
||||
update_tri_layer( _LOWER, _RAISE, _ADJUST );
|
||||
}
|
||||
|
||||
return false;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
};
|
40
keyboards/atreus62/keymaps/d4mation/readme.md
Normal file
40
keyboards/atreus62/keymaps/d4mation/readme.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# d4mation's keymap for the Atreus62
|
||||
|
||||
This is a bit of a work in-progress, but for the most part I like what I have done here.
|
||||
|
||||
I switched to Dvorak some time ago and software-based support in most OS's for Dvorak isn't very great, so this keymap by default is set to Dvorak.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Layers](#layers)
|
||||
- [Base layer](#base)
|
||||
- [Num](#num)
|
||||
- [Lower](#lower)
|
||||
- [Raise](#raise)
|
||||
- [Adjust](#adjust)
|
||||
|
||||
# Layers
|
||||
|
||||
## Base
|
||||
|
||||
* By default, this layer is Dvorak. But using the Adjust layer you can switch to Qwerty
|
||||
* Double-tapping Shift enables and disables Caps Lock
|
||||
* Quickly tapping the Grave accent key will output a Grave Accent, but holding it for 200ms will output the ESC key instead
|
||||
|
||||
## Num
|
||||
|
||||
This layer gets toggled off and on to place a numpad on both the left and right sides of the keyboard.
|
||||
|
||||
## Lower
|
||||
|
||||
This layer holds some handy shortcuts that I use often, like the screen grab shortcut and sleep shortcut in OS X.
|
||||
|
||||
It also has quick access to {} as they are inaccessible in the base layer
|
||||
|
||||
## Raise
|
||||
|
||||
Aside from quick access to [] and Play/Pause/Next/Previous, this layer is mostly just goofy things I decided to program into the keyboard because I could. There's a bunch of [kaomoji](https://en.wikipedia.org/wiki/Emoticon#Japanese_style_(kaomoji))/"unicode smileys" and I added a toggle switch to enable a [Zalgo Text](https://zalgo.org/) mode.
|
||||
|
||||
## Adjust
|
||||
|
||||
This layer is a "here be dragons" layer. It can only be accessed by holding down the keys for Lower and Raise at the same time. I added exclusively keys that drastically transformed the keyboard's layout or function on this layer. The ability to switch to Qwerty is on this layer, a way to switch CTRL and CMD back and forth is on this layer, and a hotkey to enter bootloader mode also exists.
|
2
keyboards/atreus62/keymaps/d4mation/rules.mk
Normal file
2
keyboards/atreus62/keymaps/d4mation/rules.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
UNICODE_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
@@ -56,6 +56,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \
|
||||
)
|
||||
|
||||
#define LAYOUT_tkl_iso( \
|
||||
KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
|
||||
KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \
|
||||
KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KK4, KO7, KQ7, \
|
||||
KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB3, KB1, \
|
||||
KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \
|
||||
KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \
|
||||
) LAYOUT( \
|
||||
KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
|
||||
KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \
|
||||
KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \
|
||||
KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \
|
||||
KN2, KI6 ,KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \
|
||||
KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \
|
||||
)
|
||||
|
||||
#define LAYOUT_tkl_jis( \
|
||||
KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
|
||||
KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB5, KB2, KL4, KO4, KQ4, \
|
||||
|
@@ -188,6 +188,98 @@
|
||||
{"label":"Right", "x":17.25, "y":5.5}
|
||||
]
|
||||
},
|
||||
"LAYOUT_tkl_iso": {
|
||||
"layout": [
|
||||
{"label":"Esc", "x":0, "y":0},
|
||||
{"label":"F1", "x":2, "y":0},
|
||||
{"label":"F2", "x":3, "y":0},
|
||||
{"label":"F3", "x":4, "y":0},
|
||||
{"label":"F4", "x":5, "y":0},
|
||||
{"label":"F5", "x":6.5, "y":0},
|
||||
{"label":"F6", "x":7.5, "y":0},
|
||||
{"label":"F7", "x":8.5, "y":0},
|
||||
{"label":"F8", "x":9.5, "y":0},
|
||||
{"label":"F9", "x":11, "y":0},
|
||||
{"label":"F10", "x":12, "y":0},
|
||||
{"label":"F11", "x":13, "y":0},
|
||||
{"label":"F12", "x":14, "y":0},
|
||||
{"label":"Print Screen", "x":15.25, "y":0},
|
||||
{"label":"Scroll Lock", "x":16.25, "y":0},
|
||||
{"label":"Pause", "x":17.25, "y":0},
|
||||
{"label":"`", "x":0, "y":1.5},
|
||||
{"label":"1", "x":1, "y":1.5},
|
||||
{"label":"2", "x":2, "y":1.5},
|
||||
{"label":"3", "x":3, "y":1.5},
|
||||
{"label":"4", "x":4, "y":1.5},
|
||||
{"label":"5", "x":5, "y":1.5},
|
||||
{"label":"6", "x":6, "y":1.5},
|
||||
{"label":"7", "x":7, "y":1.5},
|
||||
{"label":"8", "x":8, "y":1.5},
|
||||
{"label":"9", "x":9, "y":1.5},
|
||||
{"label":"0", "x":10, "y":1.5},
|
||||
{"label":"-", "x":11, "y":1.5},
|
||||
{"label":"=", "x":12, "y":1.5},
|
||||
{"label":"Backspace", "x":13, "y":1.5, "w":2},
|
||||
{"label":"Insert", "x":15.25, "y":1.5},
|
||||
{"label":"Home", "x":16.25, "y":1.5},
|
||||
{"label":"Page Up", "x":17.25, "y":1.5},
|
||||
{"label":"Tab", "x":0, "y":2.5, "w":1.5},
|
||||
{"label":"Q", "x":1.5, "y":2.5},
|
||||
{"label":"W", "x":2.5, "y":2.5},
|
||||
{"label":"E", "x":3.5, "y":2.5},
|
||||
{"label":"R", "x":4.5, "y":2.5},
|
||||
{"label":"T", "x":5.5, "y":2.5},
|
||||
{"label":"Y", "x":6.5, "y":2.5},
|
||||
{"label":"U", "x":7.5, "y":2.5},
|
||||
{"label":"I", "x":8.5, "y":2.5},
|
||||
{"label":"O", "x":9.5, "y":2.5},
|
||||
{"label":"P", "x":10.5, "y":2.5},
|
||||
{"label":"[", "x":11.5, "y":2.5},
|
||||
{"label":"]", "x":12.5, "y":2.5},
|
||||
{"label":"Delete", "x":15.25, "y":2.5},
|
||||
{"label":"End", "x":16.25, "y":2.5},
|
||||
{"label":"Page Down", "x":17.25, "y":2.5},
|
||||
{"label":"Caps Lock", "x":0, "y":3.5, "w":1.75},
|
||||
{"label":"A", "x":1.75, "y":3.5},
|
||||
{"label":"S", "x":2.75, "y":3.5},
|
||||
{"label":"D", "x":3.75, "y":3.5},
|
||||
{"label":"F", "x":4.75, "y":3.5},
|
||||
{"label":"G", "x":5.75, "y":3.5},
|
||||
{"label":"H", "x":6.75, "y":3.5},
|
||||
{"label":"J", "x":7.75, "y":3.5},
|
||||
{"label":"K", "x":8.75, "y":3.5},
|
||||
{"label":"L", "x":9.75, "y":3.5},
|
||||
{"label":";", "x":10.75, "y":3.5},
|
||||
{"label":"'", "x":11.75, "y":3.5},
|
||||
{"label":"#", "x":12.75, "y":3.5},
|
||||
{"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2},
|
||||
{"label":"Shift", "x":0, "y":4.5, "w":1.25},
|
||||
{"label":"\\", "x":1.25, "y":4.5},
|
||||
{"label":"Z", "x":2.25, "y":4.5},
|
||||
{"label":"X", "x":3.25, "y":4.5},
|
||||
{"label":"C", "x":4.25, "y":4.5},
|
||||
{"label":"V", "x":5.25, "y":4.5},
|
||||
{"label":"B", "x":6.25, "y":4.5},
|
||||
{"label":"N", "x":7.25, "y":4.5},
|
||||
{"label":"M", "x":8.25, "y":4.5},
|
||||
{"label":",", "x":9.25, "y":4.5},
|
||||
{"label":".", "x":10.25, "y":4.5},
|
||||
{"label":"/", "x":11.25, "y":4.5},
|
||||
{"label":"Shift", "x":12.25, "y":4.5, "w":2.75},
|
||||
{"label":"↑", "x":16.25, "y":4.5},
|
||||
{"label":"Ctrl", "x":0, "y":5.5, "w":1.25},
|
||||
{"label":"GUI", "x":1.25, "y":5.5, "w":1.25},
|
||||
{"label":"Alt", "x":2.5, "y":5.5, "w":1.25},
|
||||
{"x":3.75, "y":5.5, "w":6.25},
|
||||
{"label":"AltGr", "x":10, "y":5.5, "w":1.25},
|
||||
{"label":"GUI", "x":11.25, "y":5.5, "w":1.25},
|
||||
{"label":"App", "x":12.5, "y":5.5, "w":1.25},
|
||||
{"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25},
|
||||
{"label":"←", "x":15.25, "y":5.5},
|
||||
{"label":"↓", "x":16.25, "y":5.5},
|
||||
{"label":"→", "x":17.25, "y":5.5}
|
||||
]
|
||||
},
|
||||
"LAYOUT_tkl_jis": {
|
||||
"layout": [
|
||||
{"label":"Esc", "x":0, "y":0},
|
||||
|
@@ -44,7 +44,7 @@ VPATH += keyboards/cannonkeys/stm32f072
|
||||
SRC = keyboard.c \
|
||||
led.c
|
||||
|
||||
#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
|
@@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#define ENCODER_RESOLUTION 2
|
37
keyboards/cannonkeys/satisfaction75/keymaps/boy_314/keymap.c
Normal file
37
keyboards/cannonkeys/satisfaction75/keymaps/boy_314/keymap.c
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
Copyright 2019 Boy_314
|
||||
|
||||
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
|
||||
|
||||
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_2x2(
|
||||
KC_ESC, 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_GRV, 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_BSPC, KC_NO, ENC_PRESS,
|
||||
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_BSLS, KC_HOME,
|
||||
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_ENTER, KC_END,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL,
|
||||
KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
[1] = LAYOUT_2x2(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
NK_TOGG, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, OLED_TOGG,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, _______, RESET, CLOCK_SET,
|
||||
KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______,
|
||||
_______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT
|
||||
)
|
||||
};
|
@@ -0,0 +1,3 @@
|
||||
# Boy_314's Satisfaction75 Layout
|
||||
|
||||
This is Boy_314's Satisfaction75 Layout. It can be used on VIA. It features a QWERTY layout on the base, along with missing TKL keys on layer 1. Right side 3 keys from top down are: Home, End, Delete. The encoder resolution has been reduced from the default of 4 down to 2 so that it no longer needs to click twice, but now only once, before triggering an action.
|
@@ -0,0 +1,4 @@
|
||||
# rules.mk overrides to enable VIA
|
||||
|
||||
RAW_ENABLE = yes
|
||||
DYNAMIC_KEYMAP_ENABLE = yes
|
@@ -9,3 +9,4 @@ In addition to hosting the [Seattle Mechanical Keyboard Meetups](https://ckeys.o
|
||||
* naKey - Through hole numpad
|
||||
* Handwire 101 - Handwired 4x4 (Proton C or Pro Micro)
|
||||
* The Dora Board - 4x5 with rotary encoder and Proton C pinouts
|
||||
* Washington Macropad - Macropad shaped like Washington State with rotary encoder and OLED
|
||||
|
253
keyboards/ckeys/washington/config.h
Normal file
253
keyboards/ckeys/washington/config.h
Normal file
@@ -0,0 +1,253 @@
|
||||
/*
|
||||
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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x002A
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER merlin04
|
||||
#define PRODUCT Washington Macropad
|
||||
#define DESCRIPTION Washington State shaped macropad
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 3
|
||||
#define MATRIX_COLS 3
|
||||
|
||||
/*
|
||||
* 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 { F4, F5, F6 }
|
||||
#define MATRIX_COL_PINS { F7, B1, B3 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define ENCODERS_PAD_A { D4 }
|
||||
#define ENCODERS_PAD_B { C6 }
|
||||
|
||||
/*
|
||||
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||
*/
|
||||
// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||
|
||||
#define BACKLIGHT_PIN B6
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
// #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 userful 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
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
/* defined by default; to change, uncomment and set to the combination you want */
|
||||
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP H
|
||||
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER B
|
||||
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* 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 */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
/*
|
||||
* HD44780 LCD Display Configuration
|
||||
*/
|
||||
/*
|
||||
#define LCD_LINES 2 //< number of visible lines of the display
|
||||
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||
|
||||
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||
|
||||
#if LCD_IO_MODE
|
||||
#define LCD_PORT PORTB //< port for the LCD lines
|
||||
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||
#define LCD_RS_PIN 3 //< pin for RS line
|
||||
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||
#define LCD_RW_PIN 2 //< pin for RW line
|
||||
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||
#define LCD_E_PIN 1 //< pin for Enable line
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* Bootmagic Lite key configuration */
|
||||
// #define BOOTMAGIC_LITE_ROW 0
|
||||
// #define BOOTMAGIC_LITE_COLUMN 0
|
12
keyboards/ckeys/washington/info.json
Normal file
12
keyboards/ckeys/washington/info.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"keyboard_name": "washington",
|
||||
"url": "https://keypcb.xyz/ViewPage/Washington",
|
||||
"maintainer": "merlin04",
|
||||
"width": 4.5,
|
||||
"height": 3,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [{"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":0, "y":0.75}, {"x":0.5, "y":1.75}, {"x":1.5, "y":2}]
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user