Compare commits

...
47 Commits
Author SHA1 Message Date
fauxpark 559ef21563 Add LUFA mass storage BOOTLOADER "support" (#7729) 2019-12-29 20:53:23 +00:00
64263bbb02 [Keyboard] Orion Locking Indicator LED Support (#7683)
* add indicator lighting support thanks to Keebology tracing

* set the correct number of underglow LEDs

* add comments and skeletal structure for layer indicator LEDs

* add backlight areas pins

* update readme

* we can't turn leds on based on zones, so we use multiple backlight pin support instead to turn them ALL on and control them.

* add comments to backlight setting

* make a more useful default keymap that can also be used for testing

* add duck orion to list

* add indicator led support

* update readme

* Update keyboards/duck/orion/v3/matrix.c

Co-Authored-By: Drashna Jaelre <[email protected]>

* Update keyboards/duck/orion/v3/matrix.c

Co-Authored-By: Drashna Jaelre <[email protected]>

* Update keyboards/duck/orion/v3/matrix.c

Co-Authored-By: Drashna Jaelre <[email protected]>

* Update keyboards/duck/orion/v3/matrix.c

Co-Authored-By: Drashna Jaelre <[email protected]>

* Update keyboards/duck/orion/v3/matrix.c

Co-Authored-By: Drashna Jaelre <[email protected]>

* Update keyboards/duck/orion/v3/matrix.c

Co-Authored-By: Drashna Jaelre <[email protected]>

* add the appropriate header files

* fix indent so Drashna will not die

* Update keyboards/duck/orion/v3/v3.c

Co-Authored-By: James Young <[email protected]>

* Update keyboards/duck/orion/v3/keymaps/default/keymap.c

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/duck/orion/v3/keymaps/default/keymap.c

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/duck/orion/v3/readme.md

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/duck/orion/v3/readme.md

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/duck/orion/v3/readme.md

Co-Authored-By: fauxpark <[email protected]>

Co-authored-by: Drashna Jaelre <[email protected]>
Co-authored-by: James Young <[email protected]>
Co-authored-by: fauxpark <[email protected]>
2019-12-29 11:16:24 -08:00
fauxpark 8af1501328 Clean up ISSI driver includes (#7734)
* Clean up ISSI driver includes

* Missed an endif
2019-12-29 10:21:58 -08:00
Takeshi ISHIIandshela 25aaeb4f40 Japanese translation of docs/newbs_git_*.md (#7689)
* update docs/ja/newbs.md

* update docs/ja/_summary.md

* Translate docs/newbs_git_best_practices.md into Japanese.

* Translate docs/newbs_git_using_your_master_branch.md into Japanese.

* Translate docs/newbs_git_resolving_merge_conflicts.md into Japanese.

* Translate docs/newbs_git_resynchronize_a_branch.md into Japanese.

* Update docs/ja/newbs_git_using_your_master_branch.md

* Update docs/ja/newbs_git_resynchronize_a_branch.md

* Update docs/ja/newbs_git_resynchronize_a_branch.md

* Update docs/ja/newbs_git_resynchronize_a_branch.md

* Update docs/ja/newbs_git_resynchronize_a_branch.md

* Update docs/ja/newbs_git_resynchronize_a_branch.md

* update ja/newbs_git_resynchronize_a_branch.md

* update ja/newbs_git_resynchronize_a_branch.md

* Update docs/ja/newbs_git_best_practices.md

* Update docs/ja/_summary.md

* Update docs/ja/newbs_git_resynchronize_a_branch.md

* update ja/newbs_git_resynchronize_a_branch.md

* update ja/newbs_learn_more_resources.md

* Update docs/ja/newbs_git_resynchronize_a_branch.md

* Update docs/ja/newbs_git_resynchronize_a_branch.md

Co-Authored-By: shela <[email protected]>
2019-12-28 23:38:33 -08:00
codecoffeecode 36d913e1b1 [Keymap] Adding keymap for KBDFans Kbd67 MKII RGB (#7712)
* Adding keymap for Kbd67 MKIIRGB

* "addressing comments by fauxpark"
2019-12-28 18:15:32 -08:00
Joel Challis 250a99ff1b Add rules.mk defaults for f103,f072,f042 (#7704)
* Add rules.mk defaults for f103,f072,f042

* Add rules.mk defaults for f103,f072,f042 - remove comment

* Add rules.mk defaults for f103,f072,f042 - align USE_FPU

* Reset MCU to avoid build issues

* Move essential config values to top and remove ability for override

* Align DFU_SUFFIX_ARGS order with DFU_ARGS
2019-12-28 19:18:52 +00:00
yiancar c329a0ec8e [Keyboard] Doppelganger (#7682)
* Initial commit

* Update info.json

* Update doppelganger.c

* Update keyboards/doppelganger/readme.md

* Update keyboards/doppelganger/readme.md

* Update keyboards/doppelganger/readme.md

* Update keyboards/doppelganger/rules.mk

* Update keyboards/doppelganger/rules.mk

* Update keyboards/doppelganger/rules.mk

* Update keyboards/doppelganger/rules.mk

* More fixes my g:)

* Update keyboards/doppelganger/rules.mk

* Update keyboards/doppelganger/rules.mk

* More prettying

* Update rules.mk

* Minor spacing

* Init pins

* Update rules.mk

* Update keyboards/doppelganger/info.json
2019-12-28 00:06:42 -08:00
Takeshi ISHII 26a823082b [Docs] Fix minor differences in docs/newbs_git_resynchronize_a_branch.md (#7728) 2019-12-27 14:31:23 -08:00
shelaandTakeshi ISHII 80e73b6210 [Docs] Update Japanese translation (#7693)
* [Docs] Update translation

* Update docs/ja/contributing.md

* Update docs/ja/contributing.md

Co-Authored-By: Takeshi ISHII <[email protected]>
2019-12-27 12:09:32 -08:00
fauxpark b359830ea2 Fix file encoding for zh-cn/custom_quantum_functions.md (#7665) 2019-12-27 03:31:48 +00:00
James Young c32d085710 [Keyboard] Kyria Configurator Fixes (#7719)
* Fix key object order

info.json: Reorder the key objects into the order required by kyria.h

* linting

info.json: fix indent depth and trailing whitespaces

* Minimize visual footprint

info.json: Subtract 0.25 from each Y value to minimize the keyboard dimensions when rendered
2019-12-26 19:01:57 -08:00
Josh Hinnebusch a14339e752 Add h75-singa ver. (#7667)
* add h75_singa

* delete some stuff

* update to remove extra crap
2019-12-26 09:39:09 -08:00
Josh Hinnebusch cfbb848e03 Add LZ PhysiX PCB (#7668)
* add physix PCB

* update info.json and default keymap per LZ

* update make example in readme

* remove extra stuff

* remove excess newlines
2019-12-26 09:38:10 -08:00
Jonathan Rascher 12baca1295 Initial Crkbd layout (#7716) 2019-12-26 15:46:18 +00:00
Martin Karlsson 4edc8fc3c7 K-Nunmpad17 (#7708)
* Initial commit for K-Nunmpad

* Changed layoutname

Corrected the files according to drashnas suggestions.
* Some names have been changed
* Some code thats not been used has been removed

* Fixed rules.mk

When adding the commnity layout, tapdancing broke. This was fixed with
rules.mk was changed in the k-numpad and karlssn keymap.

* Cleanup according fauxpark

Cleaned up the readme.md and the rules.mk according to feedback from
fauxpark.
2019-12-26 15:45:14 +00:00
fauxpark e5501d4815 Make the keyboard beep when Audio is enabled and \a is encountered in a sendstring 2019-12-25 11:34:25 -08:00
Drashna Jaelre 46e2b6e43d Turn off RGB Matrix LEDs when keyboard sleeps (#7713) 2019-12-25 17:54:47 +00:00
zvecr 9aedb620c5 Add backwards compatibility for oled_write_raw_P on ARM 2019-12-24 20:13:27 -08:00
Toshihiro Suzuki 7494490d6d Update toshi0383 keymap (#7700)
* minor update for reviung39:toshi0383

* update zinc:toshi0383
2019-12-22 19:58:51 -08:00
Drashna Jaelre 7066164591 Completely remove i2c_transmit_receive function (#7686)
* Add i2c_transmit_receive function

This function is listed in the ARM header file, but doesn't actually exist.

* Remove i2c_transmit_receive function

* Update DRV2605L read function to use i2c_readReg on both arm and avr
2019-12-22 13:50:08 +00:00
XScorpion2 0e2ff9b384 Readded lost pgm_read_word code to encoder array lookups (#7577) 2019-12-21 21:39:26 -08:00
Joel Challis 376419a4f7 Add central location for ChibiOS defines (#7542)
* Add central location for chibios defines

* Add central location for chibios defines - actually add files this time....

* Add Copyright header

* Update include order to resolve i2cv1 build errors
2019-12-21 18:22:49 +00:00
Ryanandfauxpark 05b479d349 Add TADA68 keymap/rules/config for QMK bootloader (#7679)
* Add TADA68 keymap/rules/config for QMK bootloader

* Remove extraneous #DEFINEs

* use #pragma rather than include guards

Co-Authored-By: fauxpark <[email protected]>

* Remove obselete #endif

Co-Authored-By: fauxpark <[email protected]>

* #undefine DESCRIPTION before redefining

Co-Authored-By: fauxpark <[email protected]>

* Remove obselete #define

Co-Authored-By: fauxpark <[email protected]>

Co-authored-by: fauxpark <[email protected]>
2019-12-21 11:01:28 +00:00
shelaandfauxpark 52c18ef026 [Docs] fix docs (#7642)
* [Docs] recurse-submodules option is need now

* [Docs] `tmk_core` folder is correct

* [Docs] fix typo

* [Docs] package scope has changed

* [Docs] Fix menu differences

* Update docs/arm_debugging.md

Co-Authored-By: fauxpark <[email protected]>

* Update docs/arm_debugging.md

Co-Authored-By: fauxpark <[email protected]>

* fix typo

Co-authored-by: fauxpark <[email protected]>
2019-12-21 11:00:22 +00:00
Joel Challis d478095756 Merge pull request #7663 from fauxpark/dztech-config-h
Tidy up dztech config.h
2019-12-20 17:37:40 +00:00
Yan-Fa Li adf4acf596 [Keyboard] Clueboard 60 fix col 11 12 mixup (#7685)
* Fix reversed col 11 and 12

 - the two columns are reversed in the matrix

* Fix gui

* Fix reversed col 11 and 12

 - the two columns are reversed in the matrix
2019-12-19 21:50:59 -08:00
fauxpark 3f696664d6 Missed these LTO blocks 2019-12-19 08:30:51 +11:00
Joel Challis e4c257fb01 Merge pull request #7672 from ihotsuno/patch-1
I corrected my name.
2019-12-18 19:38:16 +00:00
ihotsuno 593bfc86a1 I corrected my name. 2019-12-19 03:13:27 +09:00
Joel Challis b4bda14f3c Merge pull request #7666 from fauxpark/docs-edit-page
Improve docs "Edit Document" footer
2019-12-18 15:42:56 +00:00
Eric Defore f42dd61b8d [Keymap] Added userspace for d4mation. Included their keymap for the Atreus62 (#7483)
* Added userspace for d4mation. Included their keymap for the Atreus62

* Do not assign layer numbers manually

* Remove some unneeded things per @drashna's recommendation

* Fix some single line comments I missed

* Update unicode macros to use send_unicode_hex_string() instead of process_unicode()

* OBetter check for Unicode Enabled. Moved some checks into macros.c

* Use eeconfig_init_user() to set default unicode input mode
2019-12-18 00:59:12 -08:00
Rys Sommefeldt b2405fccce [Keymap] Custom user keymap for Think6.5 with LED range control (#7603)
* ISO layout for the soldered Think6.5 PCB

* Think6.5 personal layout readme

* Add personal Think6.5 user map with LED group cycling

* Add default case to process_record_user

* Make the ASCII diagram match the layer properly

* Relocate KC_NUHS to the home row for consistency

* Add LAYOUT_65_iso_badge to info.json

* Wire up the badge LEDs as capslock LEDs

* Remove unused keymap variable
2019-12-18 00:46:49 -08:00
Lucas Moreira 3415dcef6f [Keymap] CRKBD Custom Keymap - KidBrazil (#7630)
* Added KidBrazil custom keymap for CRKBD
-Custom Font
-Custom OLED output

* Added missing readme

* Oled Timeout Update for KidBrazil Keymap (#1)

* Setup Oled timeout based on simple timer

* Cleaned up comments and added timeout for LEDs

* Fixed some small errors

* Updated oled timout with matrix scan

* Updated oled timout with matrix scan

* Update withou eeprom

* Update timer code

* Use process user instead of keymap

* Added ifdef to protect oledtimer

* Updated with half timeout state for logo

* Removed middle tier timer

* Final cleanup of unused files

* Updated code as per suggestions & requests

* Second round of revisions
2019-12-18 00:37:56 -08:00
x1 7048b94034 [Keymap] Add pico 70 keys keymap (#7654)
* Move pico/rev1 to pico/65keys.

* Add pico/70keys.

* Remove unneeded codes.

* Modified valid 70 keys keymap for jis.
2019-12-18 00:02:57 -08:00
fauxpark 3c190f8927 Improve docs "Edit Document" footer 2019-12-18 14:01:13 +11:00
fauxpark d23e81b1f0 Tidy up dztech config.h 2019-12-18 10:23:26 +11:00
fauxpark 1ac99586a6 Tidy up dztech default keymaps and info.json (#7608) 2019-12-18 10:15:47 +11:00
Joel Challis cfb4c9bb61 Merge pull request #7657 from fauxpark/dztech-rules-cleanup
Tidy up dztech rules.mk
2019-12-17 23:09:20 +00:00
Arda Kılıçdağıandfauxpark 78ffc4f7fe Heisenberg handwired keyboard added (#7643)
* Chotanck keyboard added

* Chotanck renamed to Heisenberg

* Further updates to Heisenberg Keyboard done

* Update keyboards/handwired/heisenberg/info.json

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/handwired/heisenberg/rules.mk

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/handwired/heisenberg/readme.md

Co-Authored-By: fauxpark <[email protected]>
2019-12-18 09:41:41 +11:00
Nygel Lyndley 1646717b4b [Keyboard] Added Filco Majestouch TKL Pegasus Hoof ISO Layout (#7647)
* [keymap] Added Filco Majestouch TKL Pegasus Hoof ISO Layout

* - add rules definition

* Revert "- add rules definition"

This reverts commit 59bfbe83883fbf2337b9541aa2875e935064a1f4.

* - fixed incorrect variable naming
2019-12-17 14:38:22 -08:00
67054fc380 Ported J80 to QMK (#7488)
* ported J80 to QMK

* added default ISO layout

* removed optional override functions

* set bootmagic to lite

* removed comment

* added tkl_ansi and tkl_iso layouts

* updated vendor and device name

* set ANSI layout as default and split iso to separate folder

* removed empty file

* Update keyboards/J80/info.json

Added comma

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/J80/keymaps/default/keymap.c

Removed backslash

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/J80/keymaps/default/keymap.c

Removed backslash.

Co-Authored-By: fauxpark <[email protected]>

* removed comments and backslash, fixed JSON formatting

* Rename J80.h to j80.h

* Rename keyboards/J80 to keyboards/j80

* renamed folder to lowercase

* added key definition for reset key

* added define for KC_NO to underscores

* Added backlight and lock LED support

* Fixed BACKLIGHT_PIN

* Fixed typo

* Added define for bootmagic lite and description in readme

* Update keyboards/j80/info.json

Co-Authored-By: James Young <[email protected]>

* Update keyboards/j80/readme.md

Co-Authored-By: James Young <[email protected]>

* Update keyboards/j80/readme.md

Co-Authored-By: James Young <[email protected]>

* Update keyboards/j80/info.json

Co-Authored-By: James Young <[email protected]>

* Update keyboards/j80/info.json

Co-Authored-By: James Young <[email protected]>

* Update keyboards/j80/info.json

Co-Authored-By: James Young <[email protected]>

* Update keyboards/j80/info.json

Co-Authored-By: James Young <[email protected]>

* Update keyboards/j80/j80.h

Co-Authored-By: James Young <[email protected]>

* Update keyboards/j80/j80.h

Co-Authored-By: James Young <[email protected]>

* Update keyboards/j80/keymaps/default/keymap.c

Co-Authored-By: James Young <[email protected]>

* Apply suggestions from code review

Co-Authored-By: James Young <[email protected]>

* Added full right shift layouts
2019-12-18 09:06:48 +11:00
Dmitry Nosachev 4ebecc424e [Keyboard] Magnavox Videowriter conversion with Pro Micro (#7634)
* Magnavox Videowriter convertion

* Magnavox Videowriter: readme, images

* Update keyboards/handwired/videowriter/info.json

* Update keyboards/handwired/videowriter/README.md

* Update keyboards/handwired/videowriter/README.md

* Update keyboards/handwired/videowriter/info.json

* Update keyboards/handwired/videowriter/info.json

* Update keyboards/handwired/videowriter/info.json

* Update keyboards/handwired/videowriter/info.json

* Update keyboards/handwired/videowriter/info.json

* suggested changes

* suggested changes

* fix comment symbol

* Update keyboards/handwired/videowriter/rules.mk

* Update keyboards/handwired/videowriter/rules.mk

* Update keyboards/handwired/videowriter/rules.mk
2019-12-16 21:42:03 -08:00
a860da8914 [Docs] add japanese translation (basic part) (#7461)
* add basic part

* update cli

* update cli

* correct links to ja document

* update files based on comments

* update for a postpositional particle

* update for a punctuation

* update files based on comments

* update files based on comments

* update files based on comments

* update files based on comments

* update files based on comments

* update files based on comments

* update files based on comments

Co-Authored-By: shela <[email protected]>
Co-Authored-By: Takeshi ISHII <[email protected]>
2019-12-16 21:01:46 -08:00
fauxpark 98c8a30764 Tidy up dztech rules.mk 2019-12-17 10:50:26 +11:00
Joel Challis ae40fc498b Relocate RGB keycode processing (#7508)
* Move rgb keycode logic to process_keycode

* Fixes for rgb matrix

* Fixes for mxss

* Fix inc/dec logic, add comments

* Fix return RAINBOW_SWIRL logic

* stop external use of rgb helper functions

* merge fix

* Fix 'defined but not used' when all animations are disabled
2019-12-16 12:27:53 -08:00
Yan-Fa Li 0082ecf1f3 Move kwerdenker's personal keymap from RGB (#7645)
* Move kwerdenker's personal keymap from RGB

Talked to Maartenwut about making RGB an actual template instead of
kwerdenker's keymap. Free'd up B7 so it can be used for audio in
agreement with MW. He's considering adding a speaker footprint to next
rev of plain60, and only B7 can be used with Audio. RGB uses bitbang
driver so it doesn't really make any difference if it's pin B0.

 - RGB should be a template for other people to modify, not a personal
 keymap
 - change default pin to B0 to free up B7 for audio use
 - rename RGB to kwerdenker

* Add RGB keycodes to FN layer

* don't use uppercase in keymap names

 - doesn't work properly on MacOS or Windows

* Add an audio specific keymap

* Enum instead of define

* Suggested change to keymap

 - maintain compatibility with old keymap
2019-12-16 11:26:02 -08:00
Joel Challis 7cddcce237 Remove QMK_KEYBOARD_CONFIG_H from boards (#7635) 2019-12-16 11:20:33 -08:00
248 changed files with 9219 additions and 1187 deletions

No files matched your search

+7
View File
@@ -82,6 +82,13 @@ ifeq ($(strip $(BOOTLOADER)), USBasp)
OPT_DEFS += -DBOOTLOADER_USBASP OPT_DEFS += -DBOOTLOADER_USBASP
BOOTLOADER_SIZE = 4096 BOOTLOADER_SIZE = 4096
endif endif
ifeq ($(strip $(BOOTLOADER)), lufa-ms)
# DO NOT USE THIS BOOTLOADER IN NEW PROJECTS!
# It is extremely prone to bricking, and is only included to support existing boards.
OPT_DEFS += -DBOOTLOADER_MS
BOOTLOADER_SIZE = 6144
FIRMWARE_FORMAT = bin
endif
ifdef BOOTLOADER_SIZE ifdef BOOTLOADER_SIZE
OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE)) OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE))
+6
View File
@@ -109,6 +109,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/rgblight.c SRC += $(QUANTUM_DIR)/rgblight.c
CIE1931_CURVE = yes CIE1931_CURVE = yes
LED_BREATHING_TABLE = yes LED_BREATHING_TABLE = yes
RGB_KEYCODES_ENABLE = yes
ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes) ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
else else
@@ -147,6 +148,7 @@ endif
SRC += $(QUANTUM_DIR)/rgb_matrix.c SRC += $(QUANTUM_DIR)/rgb_matrix.c
SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c
CIE1931_CURVE = yes CIE1931_CURVE = yes
RGB_KEYCODES_ENABLE = yes
endif endif
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
@@ -187,6 +189,10 @@ ifeq ($(strip $(RGB_MATRIX_CUSTOM_USER)), yes)
OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER
endif endif
ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c
endif
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
OPT_DEFS += -DTAP_DANCE_ENABLE OPT_DEFS += -DTAP_DANCE_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
+11 -11
View File
@@ -1,4 +1,4 @@
# ARM Debugging usign Eclipse # ARM Debugging using Eclipse
This page describes how to setup debugging for ARM MCUs using an SWD adapter and open-source/free tools. In this guide we will install GNU MCU Eclipse IDE for C/C++ Developers and OpenOCD together with all the necessary dependencies. This page describes how to setup debugging for ARM MCUs using an SWD adapter and open-source/free tools. In this guide we will install GNU MCU Eclipse IDE for C/C++ Developers and OpenOCD together with all the necessary dependencies.
@@ -18,7 +18,7 @@ XPM installation instructions can be found [here](https://www.npmjs.com/package/
### The ARM Toolchain ### The ARM Toolchain
Using XPM it is very easy to install the ARM toolchain. Enter the command `xpm install --global @gnu-mcu-eclipse/arm-none-eabi-gcc`. Using XPM it is very easy to install the ARM toolchain. Enter the command `xpm install --global @xpack-dev-tools/arm-none-eabi-gcc`.
### Windows build tools ### Windows build tools
@@ -33,7 +33,7 @@ If you have an ST-Link the drivers can be found [here](https://www.st.com/en/dev
### OpenOCD ### OpenOCD
This dependency allows SWD access from GDB and it is essential for debugging. Run `xpm install --global @gnu-mcu-eclipse/openocd`. This dependency allows SWD access from GDB and it is essential for debugging. Run `xpm install --global @xpack-dev-tools/openocd`.
### Java ### Java
@@ -45,17 +45,17 @@ Now its finally time to install the IDE. Use the Release page [here](https://git
## Configuring Eclipse ## Configuring Eclipse
Open up the Eclipse IDE we just downloaded. To import our QMK directory select File -> Import -> C/C++ -> Existing code as Makefile Project. Select next and use Browse to select your QMK folder. In the tool-chain list select ARM Cross GCC and select Finish. Open up the Eclipse IDE we just downloaded. To import our QMK directory select File -> Import -> C/C++ -> Existing Code as Makefile Project. Select Next and use Browse to select your QMK folder. In the tool-chain list select ARM Cross GCC and select Finish.
Now you can see the QMK folder on the left hand side. Right click it and select Properties. On the left hand side, expand MCU and select ARM Toolchain Paths. Press xPack and OK. Repeat for OpenOCD Path and if you are on windows for Build Tool Path. Select Apply and Close. Now you can see the QMK folder on the left hand side. Right click it and select Properties. On the left hand side, expand MCU and select ARM Toolchains Paths. Press xPack and OK. Repeat for OpenOCD Path and if you are on Windows for Build Tools Path. Select Apply and Close.
Now its time to install the necessary MCU packages. Go to Packs perspective by selecting Window -> Open Perspective -> Others -> Packs. Now select the yellow refresh symbol next to the Packs tab. This will take a long time as it is requesting the MCU definitions from various places. If some of the links fail you can probably select Ignore. Now its time to install the necessary MCU packages. Go to Packs perspective by selecting Window -> Perspective -> Open Perspective -> Other... -> Packs. Now select the yellow refresh symbol next to the Packs tab. This will take a long time as it is requesting the MCU definitions from various places. If some of the links fail you can probably select Ignore.
When this finishes you must find the MCU which we will be building/debugging for. In this example I will be using the STM32F3 series MCUs. On the left, select STMicroelectonics -> STM32F3 Series. On the middle window we can see the pack. Right click and select Install. Once that is done we can go back to the default perspective, Window -> Open Perspective -> Others -> C/C++. When this finishes you must find the MCU which we will be building/debugging for. In this example I will be using the STM32F3 series MCUs. On the left, select STMicroelectronics -> STM32F3 Series. On the middle window we can see the pack. Right click and select Install. Once that is done we can go back to the default perspective, Window -> Perspective -> Open Perspective -> Other... -> C/C++.
We need to let eclipse know the device we intent to build QMK on. Right click on the QMK folder -> Properties -> C/C++ Build -> Settings. Select the Devices tab and under devices select the appropriate variant of your MCU. For my example it is STM32F303CC We need to let eclipse know the device we intent to build QMK on. Right click on the QMK folder -> Properties -> C/C++ Build -> Settings. Select the Devices tab and under Devices select the appropriate variant of your MCU. For my example it is STM32F303CC
While we are here let's setup the build command as well. Select C/C++ Build and then the Behavior tab. On the build command, replace `all` with your necessary make command. For example for a rev6 Planck with the default keymap this would be `planck/rev6:default`. Select Apply and Close. While we are here let's setup the build command as well. Select C/C++ Build and then the Behavior tab. On the Build command, replace `all` with your necessary make command. For example for a rev6 Planck with the default keymap this would be `planck/rev6:default`. Select Apply and Close.
## Building ## Building
@@ -71,7 +71,7 @@ NOTE: Make sure the SWCLK and SWDIO pins are not used in the matrix of your keyb
### Configuring the Debugger ### Configuring the Debugger
Right click on your QMK folder, select Debug As -> Debug Configuration. Here double click on GDB OpenOCD Debugging. Select the debugger tab and enter the configuration necessary for your MCU. This might take some fiddling and googleing to find out. The default script for the STM32F3 is called stm32f3discovery.cfg. To let OpenOCD know, in the Config options enter `-f board/stm32f3discovery.cfg`. Right click on your QMK folder, select Debug As -> Debug Configurations... . Here double click on GDB OpenOCD Debugging. Select the Debugger tab and enter the configuration necessary for your MCU. This might take some fiddling and Googling to find out. The default script for the STM32F3 is called `stm32f3discovery.cfg`. To let OpenOCD know, in the Config options enter `-f board/stm32f3discovery.cfg`.
NOTE: In my case this configuration script requires editing to disable the reset assertion. The locations of the scripts can be found in the actual executable field usually under the path `openocd/version/.content/scripts/board`. Here I edited `reset_config srst_only` to `reset_config none`. NOTE: In my case this configuration script requires editing to disable the reset assertion. The locations of the scripts can be found in the actual executable field usually under the path `openocd/version/.content/scripts/board`. Here I edited `reset_config srst_only` to `reset_config none`.
@@ -81,7 +81,7 @@ Select Apply and Close.
Reset your keyboard. Reset your keyboard.
Press the bug icon and if all goes well you should soon find yourself in the debug perspective. Here the program counter will pause at the beginning of the main function and way for you to press Play. Most of the features of all debuggers work on ARM MCUs but for exact details google is your friend! Press the bug icon and if all goes well you should soon find yourself in the Debug perspective. Here the program counter will pause at the beginning of the main function and wait for you to press Play. Most of the features of all debuggers work on Arm MCUs but for exact details Google is your friend!
Happy debugging! Happy debugging!
+1 -1
View File
@@ -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)! 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: 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:
+14 -8
View File
@@ -16,17 +16,23 @@ Faites attention à sélectionner "HTTPS", et sélectionnez le lien et copiez-le
![HTTPS link](http://i.imgur.com/eGO0ohO.jpg) ![HTTPS link](http://i.imgur.com/eGO0ohO.jpg)
Ensuite, entrez `git clone` dans la ligne de commande, et collez votre lien: Ensuite, entrez `git clone --recurse-submodules ` dans la ligne de commande, et collez votre lien:
``` ```
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'... Cloning into 'qmk_firmware'...
remote: Counting objects: 46625, done. remote: Enumerating objects: 9, done.
remote: Compressing objects: 100% (2/2), done. remote: Counting objects: 100% (9/9), done.
remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 remote: Compressing objects: 100% (5/5), done.
Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. remote: Total 183883 (delta 5), reused 4 (delta 4), pack-reused 183874
Resolving deltas: 100% (29362/29362), done. Receiving objects: 100% (183883/183883), 132.90 MiB | 9.57 MiB/s, done.
Checking out files: 100% (2799/2799), done. Resolving deltas: 100% (119972/119972), done.
...
Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca18b'
Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486'
Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780'
Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d'
Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2'
``` ```
Vous avez maintenant votre fork QMK sur votre machine locale, vous pouvez ajouter votre keymap, la compiler et la flasher sur votre board. Une fois heureux avec vos changements, vous pouvez les ajouter, commit, et pousser vers votre fork comme suit: Vous avez maintenant votre fork QMK sur votre machine locale, vous pouvez ajouter votre keymap, la compiler et la flasher sur votre board. Une fois heureux avec vos changements, vous pouvez les ajouter, commit, et pousser vers votre fork comme suit:
+1 -1
View File
@@ -4,7 +4,7 @@ Le but de cette page est d'expliquer les informations de base qui vous serons n
## Structure de base de QMK ## Structure de base de QMK
QMK est un fork du projet [tmk_keyboard](https://github.com/tmk/tmk_keyboard) créé par [Jun Wako](https://github.com/tmk). Le code originel de TMK, avec quelques modifications, se trouve dans le dossier `tmk`. Les additions que QMK amène au projet se trouvent dans le dossier `quantum`. Les projets de clavier se trouvent dans les dossiers `handwired` et `keyboard`. QMK est un fork du projet [tmk_keyboard](https://github.com/tmk/tmk_keyboard) créé par [Jun Wako](https://github.com/tmk). Le code originel de TMK, avec quelques modifications, se trouve dans le dossier `tmk_core`. Les additions que QMK amène au projet se trouvent dans le dossier `quantum`. Les projets de clavier se trouvent dans les dossiers `handwired` et `keyboard`.
### Structure du Userspace ### Structure du Userspace
+13 -7
View File
@@ -16,17 +16,23 @@ And be sure to select "HTTPS", and select the link and copy it:
![HTTPS link](http://i.imgur.com/eGO0ohO.jpg) ![HTTPS link](http://i.imgur.com/eGO0ohO.jpg)
From here, enter `git clone ` into the command line, and then paste your link: From here, enter `git clone --recurse-submodules ` into the command line, and then paste your link:
``` ```
user@computer:~$ git clone --recurse-submodules https://github.com/whoeveryouare/qmk_firmware.git user@computer:~$ git clone --recurse-submodules https://github.com/whoeveryouare/qmk_firmware.git
Cloning into 'qmk_firmware'... Cloning into 'qmk_firmware'...
remote: Counting objects: 46625, done. remote: Enumerating objects: 9, done.
remote: Compressing objects: 100% (2/2), done. remote: Counting objects: 100% (9/9), done.
remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 remote: Compressing objects: 100% (5/5), done.
Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. remote: Total 183883 (delta 5), reused 4 (delta 4), pack-reused 183874
Resolving deltas: 100% (29362/29362), done. Receiving objects: 100% (183883/183883), 132.90 MiB | 9.57 MiB/s, done.
Checking out files: 100% (2799/2799), done. Resolving deltas: 100% (119972/119972), done.
...
Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca18b'
Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486'
Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780'
Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d'
Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2'
``` ```
You now have your QMK fork on your local machine, and you can add your keymap, compile it and flash it to your board. Once you're happy with your changes, you can add, commit, and push them to your fork like this: You now have your QMK fork on your local machine, and you can add your keymap, compile it and flash it to your board. Once you're happy with your changes, you can add, commit, and push them to your fork like this:
+15 -9
View File
@@ -17,19 +17,25 @@ Github עלול להיות קצת טריקי למי שלא מכיר את העב
![קישור HTTPS](http://i.imgur.com/eGO0ohO.jpg) ![קישור HTTPS](http://i.imgur.com/eGO0ohO.jpg)
מכאן והלאה, הקיש `git clone ` בשורת הפקודה והדביקו את הלינק שלכם: מכאן והלאה, הקיש `git clone --recurse-submodules ` בשורת הפקודה והדביקו את הלינק שלכם:
<div dir="ltr" markdown="1"> <div dir="ltr" markdown="1">
``` ```
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'... Cloning into 'qmk_firmware'...
remote: Counting objects: 46625, done. remote: Enumerating objects: 9, done.
remote: Compressing objects: 100% (2/2), done. remote: Counting objects: 100% (9/9), done.
remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 remote: Compressing objects: 100% (5/5), done.
Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. remote: Total 183883 (delta 5), reused 4 (delta 4), pack-reused 183874
Resolving deltas: 100% (29362/29362), done. Receiving objects: 100% (183883/183883), 132.90 MiB | 9.57 MiB/s, done.
Checking out files: 100% (2799/2799), done. Resolving deltas: 100% (119972/119972), done.
...
Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca18b'
Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486'
Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780'
Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d'
Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2'
``` ```
</div> </div>
@@ -66,4 +72,4 @@ To https://github.com/whoeveryouare/qmk_firmware.git
![צרו Pull Request](http://i.imgur.com/Ojydlaj.jpg) ![צרו Pull Request](http://i.imgur.com/Ojydlaj.jpg)
אחרי שהגשתם, אנו עלולים לפנות אליכם לגבי השינויים שהצעתם, נבקש שתבצעו שינויים ובסופו של דבר נקבל את השינויים! תודה שתרמתם לפרוייקט QMK :) אחרי שהגשתם, אנו עלולים לפנות אליכם לגבי השינויים שהצעתם, נבקש שתבצעו שינויים ובסופו של דבר נקבל את השינויים! תודה שתרמתם לפרוייקט QMK :)
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
## מבנה QMK בסיסי ## מבנה QMK בסיסי
QMK הוא פורק של הפרוייקט [tmk_keyboard](https://github.com/tmk/tmk_keyboard) של [Jun Wako](https://github.com/tmk). קוד הTMK המקורי, עם התאמות, יכול להמצא בתיקיית `tmk`. התוספות של QMK לפרוייקט יכולות להמצא בתיקיית `quantum`. פרוייקטי מקלדות יכולות להמצא בתיקיות `handwired` ו- `keyboard`. QMK הוא פורק של הפרוייקט [tmk_keyboard](https://github.com/tmk/tmk_keyboard) של [Jun Wako](https://github.com/tmk). קוד הTMK המקורי, עם התאמות, יכול להמצא בתיקיית `tmk_core`. התוספות של QMK לפרוייקט יכולות להמצא בתיקיית `quantum`. פרוייקטי מקלדות יכולות להמצא בתיקיות `handwired` ו- `keyboard`.
### מבנה אחסון המשתמש ### מבנה אחסון המשתמש
@@ -69,4 +69,4 @@ In every keymap folder, the following files may be found. Only `keymap.c` is req
``` ```
</div> </div>
</div> </div>
+2 -2
View File
@@ -82,9 +82,9 @@
.replace('raw.githubusercontent.com', 'github.com') .replace('raw.githubusercontent.com', 'github.com')
.replace(/\/master/, '/blob/master') .replace(/\/master/, '/blob/master')
} else { } 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 return html
+ '\n\n----\n\n' + '\n\n----\n\n'
+ editHtml + editHtml
+4 -1
View File
@@ -3,7 +3,10 @@
* [初めてのファームウェアの構築](ja/newbs_building_firmware.md) * [初めてのファームウェアの構築](ja/newbs_building_firmware.md)
* [ファームウェアのフラッシュ](ja/newbs_flashing.md) * [ファームウェアのフラッシュ](ja/newbs_flashing.md)
* [テストとデバッグ](ja/newbs_testing_debugging.md) * [テストとデバッグ](ja/newbs_testing_debugging.md)
* [Gitのベストプラクティス](ja/newbs_best_practices.md) * [QMK における Git 運用作法](ja/newbs_git_best_practices.md)
* [あなたのフォークの master ブランチ](ja/newbs_git_using_your_master_branch.md)
* [マージの競合の解決](ja/newbs_git_resolving_merge_conflicts.md)
* [同期のとれていない git ブランチの再同期](ja/newbs_git_resynchronize_a_branch.md)
* [学習リソース](ja/newbs_learn_more_resources.md) * [学習リソース](ja/newbs_learn_more_resources.md)
* [QMKの基本](ja/README.md) * [QMKの基本](ja/README.md)
+10 -10
View File
@@ -23,7 +23,7 @@ XPM のインストール手順は[ここ](https://www.npmjs.com/package/xpm)で
### ARM ツールチェーン ### ARM ツールチェーン
XPM を使うと、ARM ツールチェーンをとても簡単にインストールできます。`xpm install --global @gnu-mcu-eclipse/arm-none-eabi-gcc` とコマンドを入力します。 XPM を使うと、ARM ツールチェーンをとても簡単にインストールできます。`xpm install --global @xpack-dev-tools/arm-none-eabi-gcc` とコマンドを入力します。
### Windows ビルドツール ### Windows ビルドツール
@@ -38,7 +38,7 @@ ST-Link を持っている場合は、ドライバは[ここ](https://www.st.com
### OpenOCD ### OpenOCD
この依存関係により、SWD は GDB からアクセスでき、デバッグに不可欠です。`xpm install --global @gnu-mcu-eclipse/openocd` を実行します。 この依存関係により、SWD は GDB からアクセスでき、デバッグに不可欠です。`xpm install --global @xpack-dev-tools/openocd` を実行します。
### Java ### Java
@@ -50,17 +50,17 @@ Java は Eclipse で必要とされるため、[ここ](https://www.oracle.com/t
## Eclipse の設定 ## Eclipse の設定
ダウンロードした Eclipse IDE を開きます。QMK ディレクトリをインポートするために、File -> Import -> C/C++ -> Existing code as Makefile Project を選択します。Next を選択し、Browse を使用して QMK フォルダを選択します。tool-chain リストから ARM Cross GCC を選択し、Finish を選択します。 ダウンロードした 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 を選択します。 これで、左側に QMK フォルダが表示されます。右クリックして、Properties を選択します。左側で MCU を展開し、ARM Toolchains Paths を選択します。xPack を押して OK を押します。OpenOCD Path で同じことを繰り返し、Windows の場合は、Build Tools Path でも同じことを繰り返します。Apply and Close を選択します。
ここで、必要な MCU パッケージをインストールします。Window -> Open Perspective -> Others -> Packs を選択して、Packs perspective に移動します。Packs タブの横にある黄色のリフレッシュ記号を選択します。これは様々な場所から MCU の定義を要求するため、時間が掛かります。一部のリンクが失敗した場合は、おそらく Ignore を選択できます。 ここで、必要な MCU パッケージをインストールします。Window -> Perspective -> Open Perspective -> Other... -> Packs を選択して、Packs perspective に移動します。Packs タブの横にある黄色のリフレッシュ記号を選択します。これは様々な場所から MCU の定義を要求するため、時間が掛かります。一部のリンクが失敗した場合は、おそらく Ignore を選択できます。
これが終了すると、ビルドやデバッグする MCU を見つけることができるはずです。この例では、STM32F3 シリーズの MCU を使います。左側で、STMicroelectronics -> STM32F3 Series を選択します。中央のウィンドウに、pack が表示されます。右クリックし、Install を選択します。それが終了したら、Window -> Open Perspective -> Others -> C/C++ を選択してデフォルトのパースペクティブに戻ることができます。 これが終了すると、ビルドやデバッグする MCU を見つけることができるはずです。この例では、STM32F3 シリーズの MCU を使います。左側で、STMicroelectronics -> STM32F3 Series を選択します。中央のウィンドウに、pack が表示されます。右クリックし、Install を選択します。それが終了したら、Window -> Perspective -> Open Perspective -> Other... -> C/C++ を選択してデフォルトのパースペクティブに戻ることができます。
Eclipse に QMK をビルドしようとするデバイスを教える必要があります。QMK フォルダを右クリック -> Properties -> C/C++ Build -> Settings を選択します。Devices タブを選択し、devices の下から MCU の適切な種類を選択します。私の例では、STM32F303CC です。 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 を選択します。 この間に、Build コマンドもセットアップしましょう。C/C++ Build を選択し、Behavior タブを選択します。build コマンドのところで、`all` を必要な make コマンドに置き換えます。例えば、rev6 Planck の default キーマップの場合、これは `planck/rev6:default` になります。Apply and Close を選択します。
## ビルド ## ビルド
@@ -76,7 +76,7 @@ ARM MCU は、クロック信号(SWCLK) とデータ信号(SWDIO) で構成さ
### デバッガの設定 ### デバッガの設定
QMK フォルダを右クリックし、Debug As -> Debug Configuration を選択します。ここで、GDB OpenOCD Debugging をダブルクリックします。Debugger タブを選択し、MCU に必要な設定を入力します。これを見つけるにはいじったりググったりする必要があるかもしれません。STM32F3 用のデフォルトスクリプトは stm32f3discovery.cfg と呼ばれます。OpenOCD に伝えるには、Config options で `-f board/stm32f3discovery.cfg` と入力します。 QMK フォルダを右クリックし、Debug As -> Debug Configurations... を選択します。ここで、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` に編集しました。 注意: 私の場合、この設定スクリプトはリセット操作を無効にするために編集が必要です。スクリプトの場所は、通常はパス `openocd/version/.content/scripts/board` の下の実際の実行可能フィールドの中で見つかります。ここで、私は `reset_config srst_only` を `reset_config none` に編集しました。
@@ -86,7 +86,7 @@ Apply and Close を選択します。
キーボードをリセットしてください。 キーボードをリセットしてください。
虫アイコンをクリックし、もし全てうまく行けば debug パースペクティブに移動します。ここでは、main 関数の最初でプログラムカウンタが停止するので、Play ボタンを押します。全てのデバッガのほとんどの機能は ARM MCU で動作しますが、正確な詳細については google があなたのお友達です! 虫アイコンをクリックし、もし全てうまく行けば Debug パースペクティブに移動します。ここでは、main 関数の最初でプログラムカウンタが停止するので、Play ボタンを押します。全てのデバッガのほとんどの機能は ARM MCU で動作しますが、正確な詳細については google があなたのお友達です!
ハッピーデバッギング! ハッピーデバッギング!
+227
View 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
View 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`) |
+173
View File
@@ -0,0 +1,173 @@
# 貢献方法
<!---
original document: d47809575:docs/contributing.md
git diff d47809575 HEAD docs/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 ベースのワークフローを使いたい場合は、https://docs.qmk.fm/ の各ページの下部にある "Edit this page" リンクをクリックすることができます。
ドキュメントの中にコードの例を提供する場合は、ドキュメント内の他の場所で使用されている命名規則を順守してください。例えば、一貫性を保つために、`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
View 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 が長期的な議論あるいはデバッグを必要とする場合は、特に便利です。
+70
View File
@@ -0,0 +1,70 @@
# 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" というボタンが見えます:
![Git でのフォーク](http://i.imgur.com/8Toomz4.jpg)
あなたが組織の一員である場合は、どのアカウントにフォークするかを選択する必要があります。ほとんどの場合、あなたの個人のアカウントにフォークしたいでしょう。フォークが完了したら(しばらく時間が掛かる場合があります)、"Clone or Download" ボタンをクリックします:
![Git からダウンロード](http://i.imgur.com/N1NYcSz.jpg)
必ず "HTTPS" を選択し、リンクを選択してコピーします:
![HTTPS リンク](http://i.imgur.com/eGO0ohO.jpg)
ここから、`git clone --recurse-submodules ` をコマンドラインに入力し、リンクを貼り付けます:
```
user@computer:~$ git clone --recurse-submodules https://github.com/whoeveryouare/qmk_firmware.git
Cloning into 'qmk_firmware'...
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 183883 (delta 5), reused 4 (delta 4), pack-reused 183874
Receiving objects: 100% (183883/183883), 132.90 MiB | 9.57 MiB/s, done.
Resolving deltas: 100% (119972/119972), done.
...
Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca18b'
Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486'
Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780'
Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d'
Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2'
```
ローカルマシンに 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" ボタンをクリックすることで新しいプルリクエストを作成することができます:
![New Pull Request](http://i.imgur.com/DxMHpJ8.jpg)
ここでは、コミットした内容を正確に確認することができます - 全て良いように見える場合は、"Create Pull Request" をクリックすることで最終的に承認することができます:
![Create Pull Request](http://i.imgur.com/Ojydlaj.jpg)
サブミットの後で、私たちはあなたの変更について話し、変更を依頼し、最終的にそれを受け入れるでしょう!QMK に貢献してくれてありがとう :)
+65
View 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
```
+3 -3
View File
@@ -2,8 +2,8 @@
<!--- <!---
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
original document: ed0575fc8:docs/newbs.md original document: adf4acf59:docs/newbs.md
git diff ed0575fc8 HEAD docs/newbs.md | cat git diff adf4acf59 HEAD docs/newbs.md | cat
--> -->
QMK は、メカニカルキーボード用の強力なオープンソースファームウェアです。 QMK は、メカニカルキーボード用の強力なオープンソースファームウェアです。
@@ -24,7 +24,7 @@ QMK は[多くの趣味のキーボード](http://qmk.fm/keyboards/)をサポー
* [オンライン GUI を使用して初めてのファームウェアを構築する](ja/newbs_building_firmware_configurator.md) * [オンライン GUI を使用して初めてのファームウェアを構築する](ja/newbs_building_firmware_configurator.md)
* [ファームウェアを書きこむ](ja/newbs_flashing.md) * [ファームウェアを書きこむ](ja/newbs_flashing.md)
* [テストとデバッグ](ja/newbs_testing_debugging.md) * [テストとデバッグ](ja/newbs_testing_debugging.md)
* [QMK における Git 運用作法](ja/newbs_best_practices.md) * [QMK における Git 運用作法](ja/newbs_git_best_practices.md)
* [さらに学ぶための学習リソース](ja/newbs_learn_more_resources.md) * [さらに学ぶための学習リソース](ja/newbs_learn_more_resources.md)
このガイドは、これまでソフトウェアをコンパイルしたことがない人を支援することに特化しています。 このガイドは、これまでソフトウェアをコンパイルしたことがない人を支援することに特化しています。
+24
View File
@@ -0,0 +1,24 @@
# QMK における Git 運用作法 :id=best-git-practices-for-working-with-qmk
<!---
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
original document: adf4acf59:docs/newbs_git_best_practices.md
git diff adf4acf59 HEAD docs/newbs_git_best_practices.md | cat
-->
## または、"如何にして私は心配することをやめて Git を愛することを学んだか。"
このセクションは、QMK への貢献をスムーズに行なう最もよい方法を初心者に教えることを目的としています。
QMK に貢献するプロセスを順を追って説明し、この作業を簡単にするいくつかの方法を詳しく説明します。
その後、意図的に一部を壊してみせて、それらを修正する方法を説明します。
このセクションは以下のことを前提としています:
1. あなたは GitHub アカウントがあり、アカウントに [qmk_firmware リポジトリをフォーク](ja/getting_started_github.md) している。
2. あなたは、[環境構築](ja/newbs_getting_started.md#set-up-your-environment) と [QMK の設定](ja/newbs_getting_started.md#set-up-qmk) を両方とも完了している。
---
- パート 1: [あなたのフォークの master ブランチ: 更新は頻繁に、コミットはしないこと](ja/newbs_git_using_your_master_branch.md)
- パート 2: [マージの競合の解決](ja/newbs_git_resolving_merge_conflicts.md)
- パート 3: [同期のとれていない git ブランチの再同期](ja/newbs_git_resynchronize_a_branch.md)
@@ -0,0 +1,94 @@
# マージの競合の解決
<!---
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
original document: adf4acf59:docs/newbs_git_resolving_merge_conflicts.md
git diff adf4acf59 HEAD docs/newbs_git_resolving_merge_conflicts.md | cat
-->
ブランチでの作業の完了に時間がかかる場合、他の人が行った変更が、プルリクエストを開いたときにブランチに加えた変更と競合することがあります。
これは *マージの競合* と呼ばれ、複数の人が同じファイルの同じ部分を編集すると発生します。
?> このドキュメントは [あなたのフォークの master ブランチ: 更新は頻繁に、コミットはしないこと](ja/newbs_git_using_your_master_branch.md) で詳述されている概念に基づいています。
その概念に慣れていない場合は、まずそれを読んでから、ここに戻ってください。
## 変更のリベース
*リベース* は、コミット履歴のある時点で適用された変更を取得し、それらを元に戻し、次に同じ変更を別のポイントに適用する Git の方法です。
マージの競合が発生した場合、ブランチをリベースして、ブランチを作成してから現在までに行われた変更を取得できます。
開始するには、次を実行します:
```
git fetch upstream
git rev-list --left-right --count HEAD...upstream/master
```
ここに入力された `git rev-list` コマンドは、現在のブランチと QMK の master ブランチで異なるコミットの数を返します。
最初に `git fetch` を実行して、upstream リポジトリの現在の状態を表す refs があることを確認します。
入力された `git rev-list` コマンドの出力は2つの数値を返します:
```
$ git rev-list --left-right --count HEAD...upstream/master
7 35
```
最初の数字は、現在のブランチが作成されてからのコミット数を表し、2番目の数字は、現在のブランチが作成されてから `upstream/master` に対して行われたコミットの数であり、したがって、現在のブランチに記録されていない変更です。
現在のブランチと upstream リポジトリの両方の現在の状態がわかったので、リベース操作を開始できます:
```
git rebase upstream/master
```
これにより、Git は現在のブランチのコミットを取り消してから、QMK の master ブランチに対してコミットを再適用します。
```
$ 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".
```
これにより、マージの競合があることがわかり、競合のあるファイルの名前が示されます。
テキストエディタで競合するファイルを開くと、ファイルのどこかに次のような行があります:
```
<<<<<<< HEAD
<p>For help with any issues, email us at [email protected].</p>
=======
<p>Need help? Email [email protected].</p>
>>>>>>> Commit #1
```
行 `<<<<<<< HEAD` はマージ競合の始まりを示し、行 `>>>>>>> commit #1` は終了を示し、競合するセクションは `=======` で区切られます。
`HEAD` 側の部分はファイルの QMK master バージョンからのものであり、コミットメッセージでマークされた部分は現在のブランチとコミットからのものです。
Git はファイルの内容ではなく *ファイルへの変更* を直接追跡するため、Git がコミットの前にファイル内にあったテキストを見つけられない場合、ファイルの編集方法がわかりません。
ファイルを再編集して、競合を解決します。
変更を加えてから、ファイルを保存します。
```
<p>Need help? Email [email protected].</p>
```
そしてコマンド実行:
```
git add conflicting_file_1.txt
git rebase --continue
```
Git は、競合するファイルへの変更をログに記録し、ブランチのコミットが最後に達するまで適用し続けます。
@@ -0,0 +1,88 @@
# 同期のとれていない git ブランチの再同期
<!---
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
original document: adf4acf59:docs/newbs_git_resynchronize_a_branch.md
git diff adf4acf59 HEAD docs/newbs_git_resynchronize_a_branch.md | cat
-->
仮にあなたの `master` ブランチにあなたのコミットを行い、そしてあなたの QMK リポジトリの更新が必要になったとします。
(フォーク元の) QMKの `master` ブランチをあなたの `master` ブランチに `git pull` することもできますが、GitHub は、あなたのブランチが `qmk:master` より何コミットか先行していると通知します、この状態で QMK にプルリクエストを行う場合、問題が発生する可能性があります。
(訳注:この通知は、GitHub のあなたのリポジトリの code ペインのブランチ選択メニューの下のあたりで `This branch is 3 commit ahead of qmk:master` という様な文面で表示されています。)
?> このドキュメントは [あなたのフォークの master ブランチ: 更新は頻繁に、コミットはしないこと](ja/newbs_git_using_your_master_branch.md) で詳述されている概念に基づいています。その概念に慣れていない場合は、まずそれを読んでから、ここに戻ってください。
(訳注:この文書で言う、「同期のとれていない git ブランチ」とは、master ブランチに関する、この「コミットしない」方針を逸脱して、QMK の master リポジトリに存在しないコミットがあなたのフォークの master ブランチに入っている状態を指します。)
## あなた自身の `master` ブランチでの変更のバックアップ(オプション)
救えるものなら自分の行った変更を失いたくはないでしょう。
あなたの `master` ブランチに既に加えた変更を保存したい場合、最も簡単な方法は、単に「ダーティな」`master` ブランチの複製を作成することです:
```sh
git branch old_master master
```
これで、 `master` ブランチの複製である `old_master` という名前のブランチができました。
## あなたのブランチの再同期
さあ、`master` ブランチを再同期します。
この手順では、QMK のリポジトリを git のリモートリポジトリとして設定する必要があります。
設定済みのリモートリポジトリを確認するには、`git remote -v` を実行し、次のような結果が返されなければなりません。
```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)
```
もし、上記のようにならずに以下のように参照されるフォークが、1つだけ表示される場合:
```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)
```
新しいリモートリポジトリを追加します:
```sh
git remote add upstream https://github.com/qmk/qmk_firmware.git
```
次に、`origin` リモートリポジトリを、あなた自身のフォークにリダイレクトします:
```sh
git remote set-url origin https://github.com/<あなたのユーザ名>/qmk_firmware.git
```
両方のリモートリポジトリが設定されたので、次を実行して、QMK である `upstream` リポジトリの参照を更新する必要があります。
```sh
git fetch upstream
```
この時点で、次を実行してあなたの(訳注:master)ブランチを QMK のブランチに再同期します。
(訳注: 今現在 `master` ブランチがチェックアウトされていなければなりません。
そうなってなければ、`git checkout master` を先に実行しておく必要があります。)
```sh
git reset --hard upstream/master
```
これらの手順により、あなたのコンピュータ上のリポジトリが更新されますが、あなたの GitHub 上のフォークはまだ同期されていません。
GitHub 上のフォークを再同期するには、あなたのフォークにプッシュして、ローカルリポジトリに反映されていないリモート変更をオーバーライドするように Git に指示する必要があります。
これを行うには、次を実行します:
```sh
git push --force-with-lease
```
!> 他のユーザーがコミットを投稿するフォークで `git push --force-with-lease` を**実行しないでください**。これをすると、かれらのコミットが消去されてしまいます。
これで、あなたの GitHub フォーク、あなたのローカルファイル、および QMK のリポジトリはすべて同じになりました。
ここから、[ブランチを使って](ja/newbs_git_using_your_master_branch.md#making-changes)さらに必要な変更を加え、通常どおりそれらを投稿できます。
@@ -0,0 +1,101 @@
# あなたのフォークの master ブランチ: 更新は頻繁に、コミットはしないこと
<!---
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
original document: adf4acf59:docs/newbs_git_using_your_master_branch.md
git diff adf4acf59 HEAD docs/newbs_git_using_your_master_branch.md | cat
-->
QMK の開発では、何がどこで行われているかにかかわらず、`master` ブランチを最新の状態に保つことを強くお勧めします、しかし `master` ブランチには***絶対に直接コミットしないでください***。
代わりに、あなたのすべての変更は開発ブランチで行い、あなたが開発する時にはそのブランチからプルリクエストを発行します。
マージの競合 &mdash; これは 2人以上のユーザーがファイルの同じ部分をそれぞれ異なる編集をして統合できなくなった状態 &mdash; の可能性を減らすため `master` ブランチをなるべく最新の状態に保ち、新しいブランチを作成して新しい開発を開始します。
## あなたの master ブランチを更新する
`master` ブランチを最新の状態に保つには、git のリモートリポジトリとして QMK ファームウェアのリポジトリ(以降、QMK リポジトリ)を追加することをお勧めします。
これを行うには、Git コマンドラインインターフェイスを開き、次のように入力します。
```
git remote add upstream https://github.com/qmk/qmk_firmware.git
```
?> `upstream`(訳注: `upstream` は`上流`という意味です)という名前は任意ですが、一般的な慣習です。
QMK のリモートリポジトリには、あなたにとって分かりやすい名前を付けることができます。
Git の `remote` コマンドは、構文 `git remote add <name> <url>` を使用します。
`<name>` はリモートリポジトリの省略形としてあなたが指定するものです。
この名前は、`fetch`、`pull`、`push` やそれ以外の多くの Git コマンドで、対象のリモートリポジトリを指定するために使用されます。
リポジトリが追加されたことを確認するには、`git remote -v` を実行します。
次のように表示されます。
```
$ 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)
```
これが完了すると、`git fetch upstream` を実行してリポジトリの更新を確認できます。
このコマンドは `upstream` というニックネームを持つ QMK リポジトリから、ブランチとタグ &mdash; "refs" と総称されます &mdash; を取得します。
これで、あなたのフォーク `origin` のデータを QMK が保持するデータと比較できます。
あなたのフォークの `master` を更新するには、次を実行します、各行の後にEnterキーを押してください:
```
git checkout master
git fetch upstream
git pull upstream master
git push origin master
```
これにより、あなたの `master` ブランチに切り替わり、QMK リポジトリから 'refs' を取得し、現在の QMK の `master` ブランチをコンピュータにダウンロードしてから、あなたのフォークにアップロードします。
## 変更を行なう :id=making-changes
変更するには、以下を入力して新しいブランチを作成します:
```
git checkout -b dev_branch
git push --set-upstream origin dev_branch
```
これにより、`dev_branch` という名前の新しいブランチが作成され、チェックアウトされ、新しいブランチがあなたのフォークに保存されます。
`--set-upstream` 引数は、このブランチから `git push` または `git pull` を使用するたびに、あなたのフォークと `dev_branch` ブランチを使用するように git に指示します。
この引数は最初のプッシュでのみ使用する必要があります。
その後、残りの引数なしで `git push` または `git pull` を安全に使用できます。
?> `git push` では、`-set-upstream` の代わりに `-u` を使用できます、 `-u` は `--set-upstream` のエイリアスです。
ブランチにはほぼ任意の名前を付けることができますが、あなたが行なう変更を表す名前を付けることをお勧めします。
デフォルトでは、`git checkout -b`は、今チェックアウトされているブランチに基づいて新しいブランチを作成します。
コマンド末尾に既存のブランチの名前を追加指定することにより、チェックアウトされていない既存のブランチを基にして新しいブランチを作成できます:
```
git checkout -b dev_branch master
```
これで開発ブランチができたのでテキストエディタを開き必要な変更を加えます。
ブランチに対して多くの小さなコミットを行うことをお勧めします。
そうすることで、問題を引き起こす変更をより簡単に特定し必要に応じて元に戻すことができます。
変更を加えるには、更新が必要なファイルを編集して保存し、Git の *ステージングエリア* に追加してから、ブランチにコミットします:
```
git add path/to/updated_file
git commit -m "My commit message."
```
`git add`は、変更されたファイルを Git の *ステージングエリア* に追加します。
これは、Git の「ロードゾーン」です。
これには、`git commit` によって *コミット* される変更が含まれており、リポジトリへの変更が保存されます。
変更内容が一目でわかるように、説明的なコミットメッセージを使用します。
?> 複数のファイルを変更した場合、`git add -- path/to/file1 path/to/file2 ...` を実行すれば、あなたの望むファイルを追加できます。
## 変更を公開する
最後のステップは、変更をフォークにプッシュすることです。
これを行うには、`git push`と入力します。
Gitは、 `dev_branch`の現在の状態をフォークに公開します。
+6 -2
View File
@@ -14,13 +14,17 @@
* [Great General Tutorial](https://www.codecademy.com/learn/learn-git) * [Great General Tutorial](https://www.codecademy.com/learn/learn-git)
* [Git Game To Learn From Examples](https://learngitbranching.js.org/) * [Git Game To Learn From Examples](https://learngitbranching.js.org/)
* [Git Resources to Learn More About Github](ja/getting_started_github.md) * [Git Resources to Learn More About Github](getting_started_github.md)
* [Git Resources Aimed Specifically toward QMK](ja/contributing.md) * [Git Resources Aimed Specifically toward QMK](contributing.md)
### 日本語 ### 日本語
_日本語のリソース情報を募集中です。_ _日本語のリソース情報を募集中です。_
* [Git Game To Learn From Examples(日本語対応有り)](https://learngitbranching.js.org/)
* [QMK で Github を使う方法](ja/getting_started_github.md)
* [貢献方法](ja/contributing.md)
## コマンドラインに関するリソース: ## コマンドラインに関するリソース:
### 英語 ### 英語
+1 -1
View File
@@ -1,6 +1,6 @@
# Resynchronizing an Out-of-Sync Git Branch # 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. 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 branch 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. ?> 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.
+14 -8
View File
@@ -15,17 +15,23 @@ GitHub может показаться несколько сложным для
![HTTPS link](http://i.imgur.com/eGO0ohO.jpg) ![HTTPS link](http://i.imgur.com/eGO0ohO.jpg)
Теперь введите `git clone` в командную строку, а затем вставьте ссылку: Теперь введите `git clone --recurse-submodules ` в командную строку, а затем вставьте ссылку:
``` ```
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'... Cloning into 'qmk_firmware'...
remote: Counting objects: 46625, done. remote: Enumerating objects: 9, done.
remote: Compressing objects: 100% (2/2), done. remote: Counting objects: 100% (9/9), done.
remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 remote: Compressing objects: 100% (5/5), done.
Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. remote: Total 183883 (delta 5), reused 4 (delta 4), pack-reused 183874
Resolving deltas: 100% (29362/29362), done. Receiving objects: 100% (183883/183883), 132.90 MiB | 9.57 MiB/s, done.
Checking out files: 100% (2799/2799), done. Resolving deltas: 100% (119972/119972), done.
...
Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca18b'
Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486'
Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780'
Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d'
Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2'
``` ```
Теперь у вас есть форк QMK на вашем локальном компьютере, и вы можете добавить свою раскладку, скомпилировать ее и прошить ей свою клавиатуру. Как только вы будете довольны своими изменениями, есть возможность добавить, зафиксировать их и сделать коммит в свой форк следующим образом: Теперь у вас есть форк QMK на вашем локальном компьютере, и вы можете добавить свою раскладку, скомпилировать ее и прошить ей свою клавиатуру. Как только вы будете довольны своими изменениями, есть возможность добавить, зафиксировать их и сделать коммит в свой форк следующим образом:
+1 -1
View File
@@ -4,7 +4,7 @@
## Базовая структура QMK ## Базовая структура QMK
QMK - это форк [Джуна Вако (Jun Wako)](https://github.com/tmk) проекта [tmk_keyboard](https://github.com/tmk/tmk_keyboard). Оригинальный код TMK с изменениями можно найти в папке `tmk`. Дополнения QMK к проекту можно найти в папке `quantum`. Проекты клавиатур можно найти в папках `handwired` и `keyboard`. QMK - это форк [Джуна Вако (Jun Wako)](https://github.com/tmk) проекта [tmk_keyboard](https://github.com/tmk/tmk_keyboard). Оригинальный код TMK с изменениями можно найти в папке `tmk_core`. Дополнения QMK к проекту можно найти в папке `quantum`. Проекты клавиатур можно найти в папках `handwired` и `keyboard`.
### Структура пространства пользователя ### Структура пространства пользователя
+162 -162
View File
@@ -1,31 +1,31 @@
# 如何定制你键盘的功能 # 如何定制你键盘的功能
对于很多人来说客制化键盘可不只是向你的电脑发送你按了那个件这么简单。你肯定想实现比简单按键和宏更复杂的功能。QMK有能让你注入代码的钩子, 覆盖功能, 另外,还可以自定义键盘在不同情况下的行为。 对于很多人来说客制化键盘可不只是向你的电脑发送你按了那个件这么简单。你肯定想实现比简单按键和宏更复杂的功能。QMK有能让你注入代码的钩子, 覆盖功能, 另外,还可以自定义键盘在不同情况下的行为。
本页不假定任何特殊的QMK知识,但阅读[理解QMK](understanding_qmk.md)将会在更基础的层面帮你理解发生了什么。 本页不假定任何特殊的QMK知识,但阅读[理解QMK](understanding_qmk.md)将会在更基础的层面帮你理解发生了什么。
## A Word on Core vs 键盘 vs 布局 ## A Word on Core vs 键盘 vs 布局
我们把qmk组织成一个层次结构: 我们把qmk组织成一个层次结构:
* Core (`_quantum`) * Core (`_quantum`)
* Keyboard/Revision (`_kb`) * Keyboard/Revision (`_kb`)
* Keymap (`_user`) * Keymap (`_user`)
下面描述的每一个函数都可以在定义上加一个`_kb()`或 `_user()` 后缀。 建议在键盘/修订层使用`_kb()`后缀,在布局层使用`_user()`后缀。 下面描述的每一个函数都可以在定义上加一个`_kb()`或 `_user()` 后缀。 建议在键盘/修订层使用`_kb()`后缀,在布局层使用`_user()`后缀。
在键盘/修订层定义函数时,`_kb()`在执行任何代码前先调用`_user()`是必要的,不然布局层函数就不要被调用。 在键盘/修订层定义函数时,`_kb()`在执行任何代码前先调用`_user()`是必要的,不然布局层函数就不要被调用。
<!-- 翻译问题:上面那句翻译的不太好--> <!-- 翻译问题:上面那句翻译的不太好-->
# 自定义键码 # 自定义键码
到目前为止,最常见的任务是更改现有键码的行为或创建新的键码。从代码角度来看这些操作都很相似。 到目前为止,最常见的任务是更改现有键码的行为或创建新的键码。从代码角度来看这些操作都很相似。
## 定义一个新键码 ## 定义一个新键码
创建键码第一步,先枚举出它全部,也就是给键码起个名字并分配唯一数值。QMK没有直接限制最大键码值大小,而是提供了一个`SAFE_RANGE`宏。你可以在枚举时用`SAFE_RANGE`来保证你取得了唯一的键码值。 创建键码第一步,先枚举出它全部,也就是给键码起个名字并分配唯一数值。QMK没有直接限制最大键码值大小,而是提供了一个`SAFE_RANGE`宏。你可以在枚举时用`SAFE_RANGE`来保证你取得了唯一的键码值。
这有枚举两个键码的例子。把这块加到`keymap.c`的话你就在布局中能用`FOO`和`BAR`了。 这有枚举两个键码的例子。把这块加到`keymap.c`的话你就在布局中能用`FOO`和`BAR`了。
```c ```c
enum my_keycodes { enum my_keycodes {
@@ -34,46 +34,46 @@ enum my_keycodes {
}; };
``` ```
## 为键码的行为编程 ## 为键码的行为编程
当你覆盖一个已存在按键的行为时,或将这个行为赋给新键时,你要用`process_record_kb()`和`process_record_user()`函数。这俩函数在键处理中真实键事件被处理前被QMK调用。如果这俩函数返回`true`,QMK将会用正常的方式处理键码。这样可以很方便的扩展键码的功能而不是替换它。如果函数返回`false` QMK会跳过正常键处理,然后发送键子抬起还是按下事件就由你决定了。 当你覆盖一个已存在按键的行为时,或将这个行为赋给新键时,你要用`process_record_kb()`和`process_record_user()`函数。这俩函数在键处理中真实键事件被处理前被QMK调用。如果这俩函数返回`true`,QMK将会用正常的方式处理键码。这样可以很方便的扩展键码的功能而不是替换它。如果函数返回`false` QMK会跳过正常键处理,然后发送键子抬起还是按下事件就由你决定了。
当某个键按下或释放时这俩函数会被调用。 当某个键按下或释放时这俩函数会被调用。
### process_record_user()`函数示例实现 ### process_record_user()`函数示例实现
这个例子做了两个事。自定义了一个叫做`FOO`的键码的行为,并补充了在按下回车时播放音符。 这个例子做了两个事。自定义了一个叫做`FOO`的键码的行为,并补充了在按下回车时播放音符。
```c ```c
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case FOO: case FOO:
if (record->event.pressed) { if (record->event.pressed) {
// 按下时做些什么 // 按下时做些什么
} else { } else {
// 释放时做些什么 // 释放时做些什么
} }
return false; // 跳过此键的所有进一步处理 return false; // 跳过此键的所有进一步处理
case KC_ENTER: case KC_ENTER:
// 当按下回车时播放音符 // 当按下回车时播放音符
if (record->event.pressed) { if (record->event.pressed) {
PLAY_NOTE_ARRAY(tone_qwerty); PLAY_NOTE_ARRAY(tone_qwerty);
} }
return true; // 让QMK触发回车按下/释放事件 return true; // 让QMK触发回车按下/释放事件
default: default:
return true; // 正常处理其他键码 return true; // 正常处理其他键码
} }
} }
``` ```
### `process_record_*` 函数文档 ### `process_record_*` 函数文档
* 键盘/修订: `bool process_record_kb(uint16_t keycode, keyrecord_t *record)` * 键盘/修订: `bool process_record_kb(uint16_t keycode, keyrecord_t *record)`
* 布局: `bool process_record_user(uint16_t keycode, keyrecord_t *record)` * 布局: `bool process_record_user(uint16_t keycode, keyrecord_t *record)`
`keycode(键码)`参数是在布局上定义的,比如`MO(1)`, `KC_L`, 等等。 你要用 `switch...case` 块来处理这些事件。 `keycode(键码)`参数是在布局上定义的,比如`MO(1)`, `KC_L`, 等等。 你要用 `switch...case` 块来处理这些事件。
`record`参数含有实际按键的信息: `record`参数含有实际按键的信息:
```c ```c
keyrecord_t record { keyrecord_t record {
@@ -88,9 +88,9 @@ keyrecord_t record {
} }
``` ```
# LED控制 # LED控制
qmk提供了读取HID规范包含的5个LED的方法。: qmk提供了读取HID规范包含的5个LED的方法。:
* `USB_LED_NUM_LOCK` * `USB_LED_NUM_LOCK`
* `USB_LED_CAPS_LOCK` * `USB_LED_CAPS_LOCK`
@@ -98,20 +98,20 @@ qmk
* `USB_LED_COMPOSE` * `USB_LED_COMPOSE`
* `USB_LED_KANA` * `USB_LED_KANA`
这五个常量对应于主机LED状态的位置位。 这五个常量对应于主机LED状态的位置位。
有两种方法可以获得主机LED状态: 有两种方法可以获得主机LED状态:
* 通过执行 `led_set_user()` * 通过执行 `led_set_user()`
* 通过调用 `host_keyboard_leds()` * 通过调用 `host_keyboard_leds()`
## `led_set_user()` ## `led_set_user()`
当5个LED中任何一个的状态需要改变时,此函数将被调用。此函数通过参数输入LED参数。 当5个LED中任何一个的状态需要改变时,此函数将被调用。此函数通过参数输入LED参数。
使用`IS_LED_ON(usb_led, led_name)`和`IS_LED_OFF(usb_led, led_name)`这两个宏来检查LED状态。 使用`IS_LED_ON(usb_led, led_name)`和`IS_LED_OFF(usb_led, led_name)`这两个宏来检查LED状态。
!> `host_keyboard_leds()`可能会在`led_set_user()`被调用前返回新值。 !> `host_keyboard_leds()`可能会在`led_set_user()`被调用前返回新值。
### `led_set_user()`函数示例实现 ### `led_set_user()`函数示例实现
```c ```c
void led_set_user(uint8_t usb_led) { void led_set_user(uint8_t usb_led) {
@@ -143,59 +143,59 @@ void led_set_user(uint8_t usb_led) {
} }
``` ```
### `led_set_*`函数文档 ### `led_set_*`函数文档
* 键盘/修订: `void led_set_kb(uint8_t usb_led)` * 键盘/修订: `void led_set_kb(uint8_t usb_led)`
* 布局: `void led_set_user(uint8_t usb_led)` * 布局: `void led_set_user(uint8_t usb_led)`
## `host_keyboard_leds()` ## `host_keyboard_leds()`
调用这个函数会返回最后收到的LED状态。这个函数在`led_set_*`之外读取LED状态时很有用,比如在[`matrix_scan_user()`](#矩阵扫描代码). 调用这个函数会返回最后收到的LED状态。这个函数在`led_set_*`之外读取LED状态时很有用,比如在[`matrix_scan_user()`](#矩阵扫描代码).
为了便捷,你可以用`IS_HOST_LED_ON(led_name)`和`IS_HOST_LED_OFF(led_name)` 宏,而不直接调用和检查`host_keyboard_leds()`。 为了便捷,你可以用`IS_HOST_LED_ON(led_name)`和`IS_HOST_LED_OFF(led_name)` 宏,而不直接调用和检查`host_keyboard_leds()`。
## 设置物理LED状态 ## 设置物理LED状态
一些键盘实现了为设置物理LED的状态提供了方便的方法。 一些键盘实现了为设置物理LED的状态提供了方便的方法。
### Ergodox Boards ### Ergodox Boards
Ergodox实现了提供`ergodox_right_led_1`/`2`/`3_on`/`off()`来让每个LED开或关, 也可以用 `ergodox_right_led_on`/`off(uint8_t led)` 按索引打开或关闭他们。 Ergodox实现了提供`ergodox_right_led_1`/`2`/`3_on`/`off()`来让每个LED开或关, 也可以用 `ergodox_right_led_on`/`off(uint8_t led)` 按索引打开或关闭他们。
此外,还可以使用`ergodox_led_all_set(uint8_t n)`指定所有LED的亮度级别;针对每个LED用`ergodox_right_led_1`/`2`/`3_set(uint8_t n)`;使用索引的话用`ergodox_right_led_set(uint8_t led, uint8_t n)`。 此外,还可以使用`ergodox_led_all_set(uint8_t n)`指定所有LED的亮度级别;针对每个LED用`ergodox_right_led_1`/`2`/`3_set(uint8_t n)`;使用索引的话用`ergodox_right_led_set(uint8_t led, uint8_t n)`。
Ergodox boards 同时定义了最低亮度级别`LED_BRIGHTNESS_LO`和最高亮度级别`LED_BRIGHTNESS_HI`(默认最高). Ergodox boards 同时定义了最低亮度级别`LED_BRIGHTNESS_LO`和最高亮度级别`LED_BRIGHTNESS_HI`(默认最高).
# 键盘初始化代码 # 键盘初始化代码
键盘初始化过程有几个步骤。你是用那个函数取决于你想要做什么。 键盘初始化过程有几个步骤。你是用那个函数取决于你想要做什么。
有三个主要初始化函数,按调用顺序列出。 有三个主要初始化函数,按调用顺序列出。
* `keyboard_pre_init_*` - 会在大多数其他东西运行前运行。适用于哪些需要提前运行的硬件初始化。 * `keyboard_pre_init_*` - 会在大多数其他东西运行前运行。适用于哪些需要提前运行的硬件初始化。
* `matrix_init_*` - 在固件启动过程中间被调用。此时硬件已初始化,功能尚未初始化。 * `matrix_init_*` - 在固件启动过程中间被调用。此时硬件已初始化,功能尚未初始化。
* `keyboard_post_init_*` - 在固件启动过程最后被调用。大多数情况下,你的“客制化”代码都可以放在这里。 * `keyboard_post_init_*` - 在固件启动过程最后被调用。大多数情况下,你的“客制化”代码都可以放在这里。
!> 对于大多数人来说`keyboard_post_init_user`是你想要调用的函数。例如, 此时你可以设置RGB灯发光。 !> 对于大多数人来说`keyboard_post_init_user`是你想要调用的函数。例如, 此时你可以设置RGB灯发光。
## 键盘预初始化代码 ## 键盘预初始化代码
这代码极早运行,甚至都在USB初始化前运行。 这代码极早运行,甚至都在USB初始化前运行。
在这之后不久矩阵就被初始化了。 在这之后不久矩阵就被初始化了。
对于大多数用户来说,这用不到,因为它主要是用于面向硬件的初始化。 对于大多数用户来说,这用不到,因为它主要是用于面向硬件的初始化。
但如果你有硬件初始化的话放在这里再好不过了(比如初始化LED引脚一类的). 但如果你有硬件初始化的话放在这里再好不过了(比如初始化LED引脚一类的).
### `keyboard_pre_init_user()`函数示例实现 ### `keyboard_pre_init_user()`函数示例实现
本例中在键盘级别,设定 B0, B1, B2, B3, 和 B4 是LED引脚。 本例中在键盘级别,设定 B0, B1, B2, B3, 和 B4 是LED引脚。
```c ```c
void keyboard_pre_init_user(void) { void keyboard_pre_init_user(void) {
// 调用键盘预初始化代码 // 调用键盘预初始化代码
// 设置LED引脚为输出模式 // 设置LED引脚为输出模式
setPinOutput(B0); setPinOutput(B0);
setPinOutput(B1); setPinOutput(B1);
setPinOutput(B2); setPinOutput(B2);
@@ -204,73 +204,73 @@ void keyboard_pre_init_user(void) {
} }
``` ```
### `keyboard_pre_init_*` 函数文档 ### `keyboard_pre_init_*` 函数文档
* 键盘/修订: `void keyboard_pre_init_kb(void)` * 键盘/修订: `void keyboard_pre_init_kb(void)`
* 布局: `void keyboard_pre_init_user(void)` * 布局: `void keyboard_pre_init_user(void)`
## 矩阵初始化代码 ## 矩阵初始化代码
这将会在矩阵初始化时被调用,在某些硬件设置好后,但在一些功能被初始化前。 这将会在矩阵初始化时被调用,在某些硬件设置好后,但在一些功能被初始化前。
这在你设置其他地方会用到的东西的时候会很有用,但与硬件无关,也不依赖于它的启动位置。 这在你设置其他地方会用到的东西的时候会很有用,但与硬件无关,也不依赖于它的启动位置。
### `matrix_init_*`函数文档 ### `matrix_init_*`函数文档
* 键盘/修订: `void matrix_init_kb(void)` * 键盘/修订: `void matrix_init_kb(void)`
* 布局: `void matrix_init_user(void)` * 布局: `void matrix_init_user(void)`
## 键盘后初始化代码 ## 键盘后初始化代码
这是键盘初始化过程中的最后一个任务。如果您想更改某些特性,这会很有用,因为此时应该对它们进行初始化。 这是键盘初始化过程中的最后一个任务。如果您想更改某些特性,这会很有用,因为此时应该对它们进行初始化。
### `keyboard_post_init_user()`示例实现 ### `keyboard_post_init_user()`示例实现
本示例在所有初始化完成后运行,配置RGB灯。 本示例在所有初始化完成后运行,配置RGB灯。
```c ```c
void keyboard_post_init_user(void) { void keyboard_post_init_user(void) {
// 调用后初始化代码 // 调用后初始化代码
rgblight_enable_noeeprom(); // 使能Rgb,不保存设置 rgblight_enable_noeeprom(); // 使能Rgb,不保存设置
rgblight_sethsv_noeeprom(180, 255, 255); // 将颜色设置到蓝绿色(青色)不保存 rgblight_sethsv_noeeprom(180, 255, 255); // 将颜色设置到蓝绿色(青色)不保存
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // 设置快速呼吸模式不保存 rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // 设置快速呼吸模式不保存
} }
``` ```
### `keyboard_post_init_*` 函数文档 ### `keyboard_post_init_*` 函数文档
* 键盘/修订: `void keyboard_post_init_kb(void)` * 键盘/修订: `void keyboard_post_init_kb(void)`
* 布局: `void keyboard_post_init_user(void)` * 布局: `void keyboard_post_init_user(void)`
# 矩阵扫描代码 # 矩阵扫描代码
可能的话你要用`process_record_*()`自定义键盘,以这种方式连接到事件中,以确保代码不会对键盘产生负面的性能影响。然而,在极少数情况下,有必要进行矩阵扫描。在这些函数中要特别注意代码的性能,因为它每秒至少被调用10次。 可能的话你要用`process_record_*()`自定义键盘,以这种方式连接到事件中,以确保代码不会对键盘产生负面的性能影响。然而,在极少数情况下,有必要进行矩阵扫描。在这些函数中要特别注意代码的性能,因为它每秒至少被调用10次。
### `matrix_scan_*`示例实现 ### `matrix_scan_*`示例实现
这个例子被故意省略了。在hook这样一个对性能及其敏感的区域之前,您应该足够了解qmk的内部结构,以便在没有示例的情况下编写。如果你需要帮助,请[建立一个issue](https://github.com/qmk/qmk_firmware/issues/new)或[在Discord上与我们交流](https://discord.gg/Uq7gcHh). 这个例子被故意省略了。在hook这样一个对性能及其敏感的区域之前,您应该足够了解qmk的内部结构,以便在没有示例的情况下编写。如果你需要帮助,请[建立一个issue](https://github.com/qmk/qmk_firmware/issues/new)或[在Discord上与我们交流](https://discord.gg/Uq7gcHh).
### `matrix_scan_*` 函数文档 ### `matrix_scan_*` 函数文档
* 键盘/修订: `void matrix_scan_kb(void)` * 键盘/修订: `void matrix_scan_kb(void)`
* 布局: `void matrix_scan_user(void)` * 布局: `void matrix_scan_user(void)`
该函数在每次矩阵扫描时被调用,这基本与MCU处理能力上限相同。在这里写代码要谨慎,因为它会运行很多次。 该函数在每次矩阵扫描时被调用,这基本与MCU处理能力上限相同。在这里写代码要谨慎,因为它会运行很多次。
你会在自定义矩阵扫描代码时用到这个函数。这也可以用作自定义状态输出(比如LED灯或者屏幕)或者其他即便用户不输入你也想定期运行的功能。 你会在自定义矩阵扫描代码时用到这个函数。这也可以用作自定义状态输出(比如LED灯或者屏幕)或者其他即便用户不输入你也想定期运行的功能。
# 键盘 空闲/唤醒 代码 # 键盘 空闲/唤醒 代码
如果键盘支持就可以通过停止一大票功能来达到"空闲"。RGB灯和背光就是很好的例子。这可以节约能耗,也可能让你键盘风味更佳。 如果键盘支持就可以通过停止一大票功能来达到"空闲"。RGB灯和背光就是很好的例子。这可以节约能耗,也可能让你键盘风味更佳。
用两个函数控制: `suspend_power_down_*`和`suspend_wakeup_init_*`, 分别在系统板空闲和唤醒时调用。 用两个函数控制: `suspend_power_down_*`和`suspend_wakeup_init_*`, 分别在系统板空闲和唤醒时调用。
### suspend_power_down_user()和suspend_wakeup_init_user()示例实现 ### suspend_power_down_user()和suspend_wakeup_init_user()示例实现
```c ```c
@@ -283,18 +283,18 @@ void suspend_wakeup_init_user(void) {
} }
``` ```
### 键盘 挂起/唤醒 函数文档 ### 键盘 挂起/唤醒 函数文档
* 键盘/修订: `void suspend_power_down_kb(void)` 和`void suspend_wakeup_init_user(void)` * 键盘/修订: `void suspend_power_down_kb(void)` 和`void suspend_wakeup_init_user(void)`
* 布局: `void suspend_power_down_kb(void)` 和 `void suspend_wakeup_init_user(void)` * 布局: `void suspend_power_down_kb(void)` 和 `void suspend_wakeup_init_user(void)`
# 层改变代码 # 层改变代码
每当层改变这个就运行代码。这对于层指示或自定义层处理很有用。 每当层改变这个就运行代码。这对于层指示或自定义层处理很有用。
### `layer_state_set_*` 示例实现 ### `layer_state_set_*` 示例实现
本例使用了Planck键盘示范了如何设置 [RGB背光灯](feature_rgblight.md)使之与层对应 本例使用了Planck键盘示范了如何设置 [RGB背光灯](feature_rgblight.md)使之与层对应
```c ```c
uint32_t layer_state_set_user(uint32_t state) { uint32_t layer_state_set_user(uint32_t state) {
@@ -318,31 +318,31 @@ uint32_t layer_state_set_user(uint32_t state) {
return state; return state;
} }
``` ```
### `layer_state_set_*` 函数文档 ### `layer_state_set_*` 函数文档
* 键盘/修订: `uint32_t layer_state_set_kb(uint32_t state)` * 键盘/修订: `uint32_t layer_state_set_kb(uint32_t state)`
* 布局: `uint32_t layer_state_set_user(uint32_t state)` * 布局: `uint32_t layer_state_set_user(uint32_t state)`
该`状态`是活动层的bitmask, 详见[布局概述](keymap.md#布局的层状态) 该`状态`是活动层的bitmask, 详见[布局概述](keymap.md#布局的层状态)
# 掉电保存配置 (EEPROM) # 掉电保存配置 (EEPROM)
这会让你的配置长期的保存在键盘中。这些配置保存在你主控的EEPROM里,掉电不会消失。 设置可以用`eeconfig_read_kb`和`eeconfig_read_user`读取,可以用`eeconfig_update_kb`和`eeconfig_update_user`写入。这对于您希望能够切换的功能很有用(比如切换RGB层指示。此外,你可以用`eeconfig_init_kb`和`eeconfig_init_user`来设置EEPROM默认值。 这会让你的配置长期的保存在键盘中。这些配置保存在你主控的EEPROM里,掉电不会消失。 设置可以用`eeconfig_read_kb`和`eeconfig_read_user`读取,可以用`eeconfig_update_kb`和`eeconfig_update_user`写入。这对于您希望能够切换的功能很有用(比如切换RGB层指示。此外,你可以用`eeconfig_init_kb`和`eeconfig_init_user`来设置EEPROM默认值。
最复杂的部分可能是,有很多方法可以通过EEPROM存储和访问数据,并且并没有用哪种方法是“政治正确”的。你每个功能只有一个双字(四字节)空间。 最复杂的部分可能是,有很多方法可以通过EEPROM存储和访问数据,并且并没有用哪种方法是“政治正确”的。你每个功能只有一个双字(四字节)空间。
记住EEPROM是有写入寿命的。尽管写入寿命很高,但是并不是只有设置写道EEPROM中。如果你写入频繁,你的MCU寿命将会变短。 记住EEPROM是有写入寿命的。尽管写入寿命很高,但是并不是只有设置写道EEPROM中。如果你写入频繁,你的MCU寿命将会变短。
* 如果您不理解这个例子,那么您可能希望避免使用这个特性,因为它相当复杂。 * 如果您不理解这个例子,那么您可能希望避免使用这个特性,因为它相当复杂。
### 示例实现 ### 示例实现
本例讲解了如何添加设置,并且读写。本里使用了用户布局。这是一个复杂的函数,有很多事情要做。实际上,它使用了很多上述函数来工作! 本例讲解了如何添加设置,并且读写。本里使用了用户布局。这是一个复杂的函数,有很多事情要做。实际上,它使用了很多上述函数来工作!
在你的keymap.c文件中,将以下代码添加至顶部: 在你的keymap.c文件中,将以下代码添加至顶部:
```c ```c
typedef union { typedef union {
uint32_t raw; uint32_t raw;
@@ -354,19 +354,19 @@ typedef union {
user_config_t user_config; user_config_t user_config;
``` ```
以上代码建立了一个结构体,该结构体可以存储设置并可用于写入EEPROM。如此这般将无需定义变量,因为在结构体中已然定义。要记住`bool` (布尔)值使用1位, `uint8_t`使用8位, `uint16_t`使用16位。你可以混合搭配使用,但是顺序记错可能会招致麻烦,因为那会改变写入写出的值。 以上代码建立了一个结构体,该结构体可以存储设置并可用于写入EEPROM。如此这般将无需定义变量,因为在结构体中已然定义。要记住`bool` (布尔)值使用1位, `uint8_t`使用8位, `uint16_t`使用16位。你可以混合搭配使用,但是顺序记错可能会招致麻烦,因为那会改变写入写出的值。
`layer_state_set_*`函数中使用了`rgb_layer_change`,使用了`keyboard_post_init_user`和`process_record_user`来配置一切。 `layer_state_set_*`函数中使用了`rgb_layer_change`,使用了`keyboard_post_init_user`和`process_record_user`来配置一切。
首先要使用`keyboard_post_init_user,你要加入`eeconfig_read_user()`来填充你刚刚创建的结构体。然后您可以立即使用这个结构来控制您的布局中的功能。就像这样: 首先要使用`keyboard_post_init_user,你要加入`eeconfig_read_user()`来填充你刚刚创建的结构体。然后您可以立即使用这个结构来控制您的布局中的功能。就像这样:
```c ```c
void keyboard_post_init_user(void) { void keyboard_post_init_user(void) {
// 调用布局级别的矩阵初始化 // 调用布局级别的矩阵初始化
// 从EEPROM读用户配置 // 从EEPROM读用户配置
user_config.raw = eeconfig_read_user(); user_config.raw = eeconfig_read_user();
// 如使能,设置默认层 // 如使能,设置默认层
if (user_config.rgb_layer_change) { if (user_config.rgb_layer_change) {
rgblight_enable_noeeprom(); rgblight_enable_noeeprom();
rgblight_sethsv_noeeprom_cyan(); rgblight_sethsv_noeeprom_cyan();
@@ -374,7 +374,7 @@ void keyboard_post_init_user(void) {
} }
} }
``` ```
以上函数会在读EEPROM配置后立即使用该设置来设置默认层RGB颜色。"raw"的值是从你上面基于"union"创建的结构体中转换来的。 以上函数会在读EEPROM配置后立即使用该设置来设置默认层RGB颜色。"raw"的值是从你上面基于"union"创建的结构体中转换来的。
```c ```c
uint32_t layer_state_set_user(uint32_t state) { uint32_t layer_state_set_user(uint32_t state) {
@@ -391,86 +391,86 @@ uint32_t layer_state_set_user(uint32_t state) {
case _ADJUST: case _ADJUST:
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_white(); rgblight_mode_noeeprom(1); } if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_white(); rgblight_mode_noeeprom(1); }
break; break;
default: // 针对其他层或默认层 default: // 针对其他层或默认层
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_cyan(); rgblight_mode_noeeprom(1); } if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_cyan(); rgblight_mode_noeeprom(1); }
break; break;
} }
return state; return state;
} }
``` ```
这样仅在值使能时会改变RGB背光灯。现在配置这个值, 为`process_record_user`创建一个新键码叫做`RGB_LYR`。我们要确保,如果使用正常的RGB代码,使用上面的示例将其关闭,请将其设置为: 这样仅在值使能时会改变RGB背光灯。现在配置这个值, 为`process_record_user`创建一个新键码叫做`RGB_LYR`。我们要确保,如果使用正常的RGB代码,使用上面的示例将其关闭,请将其设置为:
```c ```c
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case FOO: case FOO:
if (record->event.pressed) { if (record->event.pressed) {
// 按下时做点什么 // 按下时做点什么
} else { } else {
// 释放时做点什么 // 释放时做点什么
} }
return false; // 跳过此键的进一步处理 return false; // 跳过此键的进一步处理
case KC_ENTER: case KC_ENTER:
// 在按下回车时播放音符 // 在按下回车时播放音符
if (record->event.pressed) { if (record->event.pressed) {
PLAY_NOTE_ARRAY(tone_qwerty); PLAY_NOTE_ARRAY(tone_qwerty);
} }
return true; // 让QMK产生回车按下/释放事件 return true; // 让QMK产生回车按下/释放事件
case RGB_LYR: // 本句让underglow作为层指示,或正常使用。 case RGB_LYR: // 本句让underglow作为层指示,或正常使用。
if (record->event.pressed) { if (record->event.pressed) {
user_config.rgb_layer_change ^= 1; // 切换状态 user_config.rgb_layer_change ^= 1; // 切换状态
eeconfig_update_user(user_config.raw); // 向EEPROM写入新状态 eeconfig_update_user(user_config.raw); // 向EEPROM写入新状态
if (user_config.rgb_layer_change) { // 如果层状态被使能 if (user_config.rgb_layer_change) { // 如果层状态被使能
layer_state_set(layer_state); // 那么立刻更新层颜色 layer_state_set(layer_state); // 那么立刻更新层颜色
} }
} }
return false; break; return false; break;
case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // 对于所有的RGB代码 (see quantum_keycodes.h, L400 可以参考) case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // 对于所有的RGB代码 (see quantum_keycodes.h, L400 可以参考)
if (record->event.pressed) { //本句失能层指示,假设你改变了这个…你要把它禁用 if (record->event.pressed) { //本句失能层指示,假设你改变了这个…你要把它禁用
if (user_config.rgb_layer_change) { // 仅当使能时 if (user_config.rgb_layer_change) { // 仅当使能时
user_config.rgb_layer_change = false; // 失能,然后 user_config.rgb_layer_change = false; // 失能,然后
eeconfig_update_user(user_config.raw); // 向EEPROM写入设置 eeconfig_update_user(user_config.raw); // 向EEPROM写入设置
} }
} }
return true; break; return true; break;
default: default:
return true; // 按其他键正常 return true; // 按其他键正常
} }
} }
``` ```
最后你要加入`eeconfig_init_user`函数,所以当EEPROM重置时,可以指定默认值, 甚至自定义操作。想强制重置EEPROM,请用`EEP_RST`键码或[Bootmagic](feature_bootmagic.md)函数。比如,如果要在默认情况下设置RGB层指示,并保存默认值 最后你要加入`eeconfig_init_user`函数,所以当EEPROM重置时,可以指定默认值, 甚至自定义操作。想强制重置EEPROM,请用`EEP_RST`键码或[Bootmagic](feature_bootmagic.md)函数。比如,如果要在默认情况下设置RGB层指示,并保存默认值
```c ```c
void eeconfig_init_user(void) { // EEPROM正被重置 void eeconfig_init_user(void) { // EEPROM正被重置
user_config.raw = 0; user_config.raw = 0;
user_config.rgb_layer_change = true; // 我们想要默认使能 user_config.rgb_layer_change = true; // 我们想要默认使能
eeconfig_update_user(user_config.raw); // 向EEPROM写入默认值 eeconfig_update_user(user_config.raw); // 向EEPROM写入默认值
// use the non noeeprom versions, 还要向EEPROM写入这些值 // use the non noeeprom versions, 还要向EEPROM写入这些值
rgblight_enable(); // 默认使能RGB rgblight_enable(); // 默认使能RGB
rgblight_sethsv_cyan(); // 默认设置青色 rgblight_sethsv_cyan(); // 默认设置青色
rgblight_mode(1); // 默认设置长亮 rgblight_mode(1); // 默认设置长亮
} }
``` ```
然后就完事了。RGB层指示会在你想让它工作时工作。这个设置会一直保存,即便你拔下键盘。如果你使用其他RGB代码,层指示将失能,现在它可以做你所想了。 然后就完事了。RGB层指示会在你想让它工作时工作。这个设置会一直保存,即便你拔下键盘。如果你使用其他RGB代码,层指示将失能,现在它可以做你所想了。
### 'EECONFIG' 函数文档 ### 'EECONFIG' 函数文档
* 键盘/修订: `void eeconfig_init_kb(void)`, `uint32_t eeconfig_read_kb(void)`和`void eeconfig_update_kb(uint32_t val)` * 键盘/修订: `void eeconfig_init_kb(void)`, `uint32_t eeconfig_read_kb(void)`和`void eeconfig_update_kb(uint32_t val)`
* 布局: `void eeconfig_init_user(void)`, `uint32_t eeconfig_read_user(void)`和`void eeconfig_update_user(uint32_t val)` * 布局: `void eeconfig_init_user(void)`, `uint32_t eeconfig_read_user(void)`和`void eeconfig_update_user(uint32_t val)`
`val` 是你想写入EEPROM的值,`eeconfig_read_*`函数会从EEPROM返回一个32位(双字)的值。 `val` 是你想写入EEPROM的值,`eeconfig_read_*`函数会从EEPROM返回一个32位(双字)的值。
# 自定义击键-长按临界值(TAPPING_TERM) # 自定义击键-长按临界值(TAPPING_TERM)
默认情况下,击键-长按临界值是全球统一的,并且不能通过键进行配置。对于大多数用户来说这很好。但是在有些情况下,对于`LT`键来说按键延时对双功能键的提升更大,可能是因为有些键比其他的键更容易按住。为了不给每个都自定义键码,本功能可以为每个键定义`TAPPING_TERM`。 默认情况下,击键-长按临界值是全球统一的,并且不能通过键进行配置。对于大多数用户来说这很好。但是在有些情况下,对于`LT`键来说按键延时对双功能键的提升更大,可能是因为有些键比其他的键更容易按住。为了不给每个都自定义键码,本功能可以为每个键定义`TAPPING_TERM`。
想使能这个功能的话, 要先在`config.h`加上`#define TAPPING_TERM_PER_KEY`。 想使能这个功能的话, 要先在`config.h`加上`#define TAPPING_TERM_PER_KEY`。
## `get_tapping_term`示例实现 ## `get_tapping_term`示例实现
想要修改基于键码的`TAPPING TERM`,你要向`keymap.c`文件添加如下代码: 想要修改基于键码的`TAPPING TERM`,你要向`keymap.c`文件添加如下代码:
```c ```c
uint16_t get_tapping_term(uint16_t keycode) { uint16_t get_tapping_term(uint16_t keycode) {
@@ -485,6 +485,6 @@ uint16_t get_tapping_term(uint16_t keycode) {
} }
``` ```
### `get_tapping_term` 函数文档 ### `get_tapping_term` 函数文档
不像这篇的其他功能,这个不需要quantum或者键盘级别的函数,只要用户级函数即可。 不像这篇的其他功能,这个不需要quantum或者键盘级别的函数,只要用户级函数即可。
+14 -8
View File
@@ -16,17 +16,23 @@ Github can be a little tricky to those that aren't familiar with it - this guide
![HTTPS链接](http://i.imgur.com/eGO0ohO.jpg) ![HTTPS链接](http://i.imgur.com/eGO0ohO.jpg)
然后,在命令行输入`git clone `,然后粘贴你的链接: 然后,在命令行输入`git clone --recurse-submodules `,然后粘贴你的链接:
``` ```
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'... Cloning into 'qmk_firmware'...
remote: Counting objects: 46625, done. remote: Enumerating objects: 9, done.
remote: Compressing objects: 100% (2/2), done. remote: Counting objects: 100% (9/9), done.
remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 remote: Compressing objects: 100% (5/5), done.
Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. remote: Total 183883 (delta 5), reused 4 (delta 4), pack-reused 183874
Resolving deltas: 100% (29362/29362), done. Receiving objects: 100% (183883/183883), 132.90 MiB | 9.57 MiB/s, done.
Checking out files: 100% (2799/2799), done. Resolving deltas: 100% (119972/119972), done.
...
Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca18b'
Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486'
Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780'
Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d'
Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2'
``` ```
现在你本地计算机有QMK的分叉了,你可以添加你的布局了, 为你的键盘编译并刷新固件吧。如果你觉得你的修改很不错, 你可以添加,提交,然后想你的分叉推出(pull)你的改变,像这样: 现在你本地计算机有QMK的分叉了,你可以添加你的布局了, 为你的键盘编译并刷新固件吧。如果你觉得你的修改很不错, 你可以添加,提交,然后想你的分叉推出(pull)你的改变,像这样:
+1 -1
View File
@@ -4,7 +4,7 @@
## 基本QMK结构 ## 基本QMK结构
QMK是[Jun Wako](https://github.com/tmk)的[tmk_keyboard](https://github.com/tmk/tmk_keyboard)工程的一个分叉。经过更改的TMK原始代码放在`tmk` 文件夹中。 QMK增加的新东西可以在 `quantum` 文件夹中找到。 键盘项目可以在 `handwired`(手动飞线) 和 `keyboard`(PCB键盘)这两个文件夹找到。 QMK是[Jun Wako](https://github.com/tmk)的[tmk_keyboard](https://github.com/tmk/tmk_keyboard)工程的一个分叉。经过更改的TMK原始代码放在`tmk_core` 文件夹中。 QMK增加的新东西可以在 `quantum` 文件夹中找到。 键盘项目可以在 `handwired`(手动飞线) 和 `keyboard`(PCB键盘)这两个文件夹找到。
### 用户空间结构 ### 用户空间结构
+1 -2
View File
@@ -24,9 +24,8 @@
* STM32_I2C_USE_I2C1 is TRUE in the mcuconf.h file. Pins B6 and B7 are used * STM32_I2C_USE_I2C1 is TRUE in the mcuconf.h file. Pins B6 and B7 are used
* but using any other I2C pins should be trivial. * but using any other I2C pins should be trivial.
*/ */
#include "i2c_master.h"
#include "quantum.h" #include "quantum.h"
#include "i2c_master.h"
#include <string.h> #include <string.h>
#include <hal.h> #include <hal.h>
+10 -19
View File
@@ -27,10 +27,6 @@
#include "ch.h" #include "ch.h"
#include <hal.h> #include <hal.h>
#if defined(STM32F1XX) || defined(STM32F1xx) || defined(STM32F2xx) || defined(STM32F4xx) || defined(STM32F4XX) || defined(STM32L0xx) || defined(STM32L1xx)
# define USE_I2CV1
#endif
#ifdef I2C1_BANK #ifdef I2C1_BANK
# define I2C1_SCL_BANK I2C1_BANK # define I2C1_SCL_BANK I2C1_BANK
# define I2C1_SDA_BANK I2C1_BANK # define I2C1_SDA_BANK I2C1_BANK
@@ -51,20 +47,6 @@
# define I2C1_SDA 7 # define I2C1_SDA 7
#endif #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 #ifdef USE_I2CV1
# ifndef I2C1_OPMODE # ifndef I2C1_OPMODE
# define I2C1_OPMODE OPMODE_I2C # define I2C1_OPMODE OPMODE_I2C
@@ -99,6 +81,16 @@
# define I2C_DRIVER I2CD1 # define I2C_DRIVER I2CD1
#endif #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
typedef int16_t i2c_status_t; typedef int16_t i2c_status_t;
#define I2C_STATUS_SUCCESS (0) #define I2C_STATUS_SUCCESS (0)
@@ -109,7 +101,6 @@ void i2c_init(void);
i2c_status_t i2c_start(uint8_t address); i2c_status_t i2c_start(uint8_t address);
i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout);
i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
i2c_status_t i2c_transmit_receive(uint8_t address, uint8_t* tx_body, uint16_t tx_length, uint8_t* rx_body, uint16_t rx_length);
i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout);
i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
void i2c_stop(void); void i2c_stop(void);
+2 -9
View File
@@ -32,16 +32,9 @@ void DRV_write(uint8_t drv_register, uint8_t settings) {
} }
uint8_t DRV_read(uint8_t regaddress) { uint8_t DRV_read(uint8_t regaddress) {
#ifdef __AVR__
i2c_readReg(DRV2605L_BASE_ADDRESS << 1, regaddress, DRV2605L_read_buffer, 1, 100); i2c_readReg(DRV2605L_BASE_ADDRESS << 1, regaddress, DRV2605L_read_buffer, 1, 100);
DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0]; DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0];
#else
DRV2605L_tx_register[0] = regaddress;
if (MSG_OK != i2c_transmit_receive(DRV2605L_BASE_ADDRESS << 1, DRV2605L_tx_register, 1, DRV2605L_read_buffer, 1)) {
printf("err reading reg \n");
}
DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0];
#endif
return DRV2605L_read_register; return DRV2605L_read_register;
} }
@@ -127,4 +120,4 @@ void DRV_pulse(uint8_t sequence) {
DRV_write(DRV_GO, 0x00); DRV_write(DRV_GO, 0x00);
DRV_write(DRV_WAVEFORM_SEQ_1, sequence); DRV_write(DRV_WAVEFORM_SEQ_1, sequence);
DRV_write(DRV_GO, 0x01); DRV_write(DRV_GO, 0x01);
} }
+1
View File
@@ -13,6 +13,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once #pragma once
#include <stdint.h> #include <stdint.h>
+2 -13
View File
@@ -16,21 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifdef __AVR__
# include <avr/interrupt.h>
# include <avr/io.h>
# include <util/delay.h>
#else
# include "wait.h"
#endif
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "is31fl3731-simple.h" #include "is31fl3731-simple.h"
#include "i2c_master.h" #include "i2c_master.h"
#include "progmem.h" #include "wait.h"
#include "print.h"
// This is a 7-bit address, that gets left-shifted and bit 0 // This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol) // set to 0 for write, 1 for read (as per I2C protocol)
@@ -156,6 +144,7 @@ void IS31FL3731_init(uint8_t addr) {
// enable software shutdown // enable software shutdown
IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00); IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00);
// this delay was copied from other drivers, might not be needed // this delay was copied from other drivers, might not be needed
wait_ms(10); wait_ms(10);
+4 -4
View File
@@ -16,8 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef IS31FL3731_DRIVER_H #pragma once
#define IS31FL3731_DRIVER_H
#include <stdint.h>
#include <stdbool.h>
typedef struct is31_led { typedef struct is31_led {
uint8_t driver : 2; uint8_t driver : 2;
@@ -203,5 +205,3 @@ void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index);
#define C9_14 0xB1 #define C9_14 0xB1
#define C9_15 0xB2 #define C9_15 0xB2
#define C9_16 0xB3 #define C9_16 0xB3
#endif // IS31FL3731_DRIVER_H
+3 -15
View File
@@ -15,18 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifdef __AVR__
# include <avr/interrupt.h>
# include <avr/io.h>
# include <util/delay.h>
#else
# include "wait.h"
#endif
#include "is31fl3731.h" #include "is31fl3731.h"
#include <string.h>
#include "i2c_master.h" #include "i2c_master.h"
#include "progmem.h" #include "wait.h"
// This is a 7-bit address, that gets left-shifted and bit 0 // This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol) // set to 0 for write, 1 for read (as per I2C protocol)
@@ -141,12 +132,9 @@ void IS31FL3731_init(uint8_t addr) {
// enable software shutdown // enable software shutdown
IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00); IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00);
// this delay was copied from other drivers, might not be needed
#ifdef __AVR__ // this delay was copied from other drivers, might not be needed
_delay_ms(10);
#else
wait_ms(10); wait_ms(10);
#endif
// picture mode // picture mode
IS31FL3731_write_register(addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE); IS31FL3731_write_register(addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE);
+1 -4
View File
@@ -15,8 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef IS31FL3731_DRIVER_H #pragma once
#define IS31FL3731_DRIVER_H
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
@@ -207,5 +206,3 @@ void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index);
#define C9_14 0xB1 #define C9_14 0xB1
#define C9_15 0xB2 #define C9_15 0xB2
#define C9_16 0xB3 #define C9_16 0xB3
#endif // IS31FL3731_DRIVER_H
+3 -16
View File
@@ -16,18 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifdef __AVR__
# include <avr/interrupt.h>
# include <avr/io.h>
# include <util/delay.h>
#else
# include "wait.h"
#endif
#include <string.h>
#include "i2c_master.h"
#include "progmem.h"
#include "is31fl3733.h" #include "is31fl3733.h"
#include "i2c_master.h"
#include "wait.h"
// This is a 7-bit address, that gets left-shifted and bit 0 // This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol) // set to 0 for write, 1 for read (as per I2C protocol)
@@ -168,12 +159,8 @@ void IS31FL3733_init(uint8_t addr, uint8_t sync) {
// Disable software shutdown. // Disable software shutdown.
IS31FL3733_write_register(addr, ISSI_REG_CONFIGURATION, (sync << 6) | 0x01); IS31FL3733_write_register(addr, ISSI_REG_CONFIGURATION, (sync << 6) | 0x01);
// Wait 10ms to ensure the device has woken up. // Wait 10ms to ensure the device has woken up.
#ifdef __AVR__
_delay_ms(10);
#else
wait_ms(10); wait_ms(10);
#endif
} }
void IS31FL3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { void IS31FL3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
+1 -4
View File
@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef IS31FL3733_DRIVER_H #pragma once
#define IS31FL3733_DRIVER_H
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
@@ -250,5 +249,3 @@ void IS31FL3733_update_led_control_registers(uint8_t addr, uint8_t index);
#define L_14 0xBD #define L_14 0xBD
#define L_15 0xBE #define L_15 0xBE
#define L_16 0xBF #define L_16 0xBF
#endif // IS31FL3733_DRIVER_H
+4 -17
View File
@@ -14,18 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifdef __AVR__
# include <avr/interrupt.h>
# include <avr/io.h>
# include <util/delay.h>
#else
# include "wait.h"
#endif
#include "is31fl3736.h" #include "is31fl3736.h"
#include <string.h>
#include "i2c_master.h" #include "i2c_master.h"
#include "progmem.h" #include "wait.h"
// This is a 7-bit address, that gets left-shifted and bit 0 // This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol) // set to 0 for write, 1 for read (as per I2C protocol)
@@ -154,12 +145,8 @@ void IS31FL3736_init(uint8_t addr) {
// Disable software shutdown. // Disable software shutdown.
IS31FL3736_write_register(addr, ISSI_REG_CONFIGURATION, 0x01); IS31FL3736_write_register(addr, ISSI_REG_CONFIGURATION, 0x01);
// Wait 10ms to ensure the device has woken up. // Wait 10ms to ensure the device has woken up.
#ifdef __AVR__
_delay_ms(10);
#else
wait_ms(10); wait_ms(10);
#endif
} }
void IS31FL3736_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { void IS31FL3736_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
@@ -263,7 +250,7 @@ void IS31FL3736_update_pwm_buffers(uint8_t addr1, uint8_t addr2) {
IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM); IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
IS31FL3736_write_pwm_buffer(addr1, g_pwm_buffer[0]); IS31FL3736_write_pwm_buffer(addr1, g_pwm_buffer[0]);
// IS31FL3736_write_pwm_buffer( addr2, g_pwm_buffer[1] ); // IS31FL3736_write_pwm_buffer(addr2, g_pwm_buffer[1]);
} }
g_pwm_buffer_update_required = false; g_pwm_buffer_update_required = false;
} }
@@ -275,7 +262,7 @@ void IS31FL3736_update_led_control_registers(uint8_t addr1, uint8_t addr2) {
IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL); IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
for (int i = 0; i < 24; i++) { for (int i = 0; i < 24; i++) {
IS31FL3736_write_register(addr1, i, g_led_control_registers[0][i]); IS31FL3736_write_register(addr1, i, g_led_control_registers[0][i]);
// IS31FL3736_write_register(addr2, i, g_led_control_registers[1][i] ); // IS31FL3736_write_register(addr2, i, g_led_control_registers[1][i]);
} }
} }
} }
+5 -18
View File
@@ -16,18 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifdef __AVR__ #include "is31fl3737.h"
# include <avr/interrupt.h>
# include <avr/io.h>
# include <util/delay.h>
#else
# include "wait.h"
#endif
#include <string.h>
#include "i2c_master.h" #include "i2c_master.h"
#include "progmem.h" #include "wait.h"
#include "rgb_matrix.h"
// This is a 7-bit address, that gets left-shifted and bit 0 // This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol) // set to 0 for write, 1 for read (as per I2C protocol)
@@ -156,12 +147,8 @@ void IS31FL3737_init(uint8_t addr) {
// Disable software shutdown. // Disable software shutdown.
IS31FL3737_write_register(addr, ISSI_REG_CONFIGURATION, 0x01); IS31FL3737_write_register(addr, ISSI_REG_CONFIGURATION, 0x01);
// Wait 10ms to ensure the device has woken up. // Wait 10ms to ensure the device has woken up.
#ifdef __AVR__
_delay_ms(10);
#else
wait_ms(10); wait_ms(10);
#endif
} }
void IS31FL3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { void IS31FL3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
@@ -217,7 +204,7 @@ void IS31FL3737_update_pwm_buffers(uint8_t addr1, uint8_t addr2) {
IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM); IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
IS31FL3737_write_pwm_buffer(addr1, g_pwm_buffer[0]); IS31FL3737_write_pwm_buffer(addr1, g_pwm_buffer[0]);
// IS31FL3737_write_pwm_buffer( addr2, g_pwm_buffer[1] ); // IS31FL3737_write_pwm_buffer(addr2, g_pwm_buffer[1]);
} }
g_pwm_buffer_update_required = false; g_pwm_buffer_update_required = false;
} }
@@ -229,7 +216,7 @@ void IS31FL3737_update_led_control_registers(uint8_t addr1, uint8_t addr2) {
IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL); IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
for (int i = 0; i < 24; i++) { for (int i = 0; i < 24; i++) {
IS31FL3737_write_register(addr1, i, g_led_control_registers[0][i]); IS31FL3737_write_register(addr1, i, g_led_control_registers[0][i]);
// IS31FL3737_write_register(addr2, i, g_led_control_registers[1][i] ); // IS31FL3737_write_register(addr2, i, g_led_control_registers[1][i]);
} }
} }
} }
+1 -4
View File
@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef IS31FL3737_DRIVER_H #pragma once
#define IS31FL3737_DRIVER_H
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
@@ -202,5 +201,3 @@ void IS31FL3737_update_led_control_registers(uint8_t addr1, uint8_t addr2);
#define L_10 0xBB #define L_10 0xBB
#define L_11 0xBC #define L_11 0xBC
#define L_12 0xBD #define L_12 0xBD
#endif // IS31FL3737_DRIVER_H
+2
View File
@@ -224,6 +224,8 @@ void oled_write_raw_P(const char *data, uint16_t size);
// Advances the cursor while writing, inverts the pixels if true // Advances the cursor while writing, inverts the pixels if true
// Advances the cursor to the next page, wiring ' ' to the remainder of the current page // Advances the cursor to the next page, wiring ' ' to the remainder of the current page
# define oled_write_ln_P(data, invert) oled_write(data, invert) # define oled_write_ln_P(data, invert) oled_write(data, invert)
# define oled_write_raw_P(data, size) oled_write_raw(data, size)
#endif // defined(__AVR__) #endif // defined(__AVR__)
// Can be used to manually turn on the screen if it is off // Can be used to manually turn on the screen if it is off
-2
View File
@@ -18,8 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once #pragma once
#include QMK_KEYBOARD_CONFIG_H
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x3060 #define PRODUCT_ID 0x3060
@@ -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;
};
@@ -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.
@@ -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 \ 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( \ #define LAYOUT_tkl_jis( \
KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ 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, \ KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB5, KB2, KL4, KO4, KQ4, \
+92
View File
@@ -188,6 +188,98 @@
{"label":"Right", "x":17.25, "y":5.5} {"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_tkl_jis": {
"layout": [ "layout": [
{"label":"Esc", "x":0, "y":0}, {"label":"Esc", "x":0, "y":0},
+1 -1
View File
@@ -47,7 +47,7 @@
* *
*/ */
#define MATRIX_ROW_PINS { B0, B1, B2, A15, A10 } #define MATRIX_ROW_PINS { B0, B1, B2, A15, A10 }
#define MATRIX_COL_PINS { A2, A3, A6, B14, B15, A8, A9, A7, B3, B4, C14, C15, C13, B5, B6 } #define MATRIX_COL_PINS { A2, A3, A6, B14, B15, A8, A9, A7, B3, B4, C15, C14, C13, B5, B6 }
#define UNUSED_PINS { A0, A1, A9, B7, B8, B9, B10, B11, B12, B13 } #define UNUSED_PINS { A0, A1, A9, B7, B8, B9, B10, B11, B12, B13 }
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
+6
View File
@@ -0,0 +1,6 @@
#pragma once
#define EE_HANDS
/* Limit max RGB LED current to avoid tripping controller fuse. */
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150
+51
View File
@@ -0,0 +1,51 @@
#include QMK_KEYBOARD_H
enum layer {
LAYER_DEFAULT,
LAYER_LOWER,
LAYER_RAISE,
LAYER_ADJUST,
};
#define LY_LWR MO(LAYER_LOWER)
#define LY_RSE MO(LAYER_RAISE)
#define KY_CESC LCTL_T(KC_ESC)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Default layer: http://www.keyboard-layout-editor.com/#/gists/08d9827d916662a9414f48805aa895a5 */
[LAYER_DEFAULT] = LAYOUT(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KY_CESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
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_LALT, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RGUI
),
/* Lower layer: http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0 */
[LAYER_LOWER] = LAYOUT(
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
_______, _______, _______, KC_PIPE, KC_TILD, KC_DEL, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______,
_______, _______, _______, KC_BSLS, KC_GRV, KC_INS, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______,
_______, _______, _______, _______, _______, _______
),
/* Raise layer: http://www.keyboard-layout-editor.com/#/gists/08b44355d4ca85d294bad9e2821f91d7 */
[LAYER_RAISE] = LAYOUT(
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_HOME, KC_PGUP,
_______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_END, KC_PGDN,
_______, _______, _______, _______, _______, _______
),
/* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/77e7572e077b36a23eb2086017e16fee */
[LAYER_ADJUST] = LAYOUT(
KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______,
_______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, RGB_RMOD, RGB_VAD, RGB_VAI, RGB_MOD, RGB_HUI, RGB_SAI,
_______, _______, _______, KC_MUTE, _______, _______, RGB_SPD, RGB_SPI, _______, _______, RGB_HUD, RGB_SAD,
_______, _______, _______, RGB_TOG, _______, _______
),
};
layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, LAYER_LOWER, LAYER_RAISE, LAYER_ADJUST);
}
+30
View File
@@ -0,0 +1,30 @@
# bcat's Corne layout
This split ergo layout mirrors
[my Lily58 layout](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lily58/keymaps/bcat)
with the number row removed and RGB controls added. See that layout's docs for
more details on the principles that went into the layout.
## Default layer
![Default layer layout](https://i.imgur.com/s1LDlSQ.png)
([KLE](http://www.keyboard-layout-editor.com/#/gists/08d9827d916662a9414f48805aa895a5))
## Lower layer
![Lower layer layout](https://i.imgur.com/9ShGkJI.png)
([KLE](http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0))
## Raise layer
![Raise layer layout](https://i.imgur.com/HcmW99r.png)
([KLE](http://www.keyboard-layout-editor.com/#/gists/08b44355d4ca85d294bad9e2821f91d7))
## Adjust layer
![Adjust layer layout](https://i.imgur.com/53qLnxo.png)
([KLE](http://www.keyboard-layout-editor.com/#/gists/77e7572e077b36a23eb2086017e16fee))
+3
View File
@@ -0,0 +1,3 @@
BOOTLOADER = atmel-dfu # Elite-C
RGB_MATRIX_ENABLE = WS2812 # per-key RGB and underglow
@@ -0,0 +1,52 @@
# KidBrazil's custom CRKBD Layout
![Crkbd](https://user-images.githubusercontent.com/736191/40575636-6fba63a4-6123-11e8-9ca0-3f990f1f9f4c.jpg)
This is a simple layout that I use for both programming and gaming. It is very
closely based on the original CRKBD layout with some modifications to the
position of CTRL and SHIFT.
## Layers
This keymap includes a total of 4 Layers:
- QWERTY
- NUMBERS
- SYMBOLS
- GAMING
- WEAPONS
The first three layers are pretty self explanatory and follow closely the
default keymap for this keyboard. The magic really starts to happen with the
gaming layer.
### Gaming Layer
The gaming layer can be toggled on/off from the SYMBOLS layer. Once on the
gaming layer it will stay there until you toggle it off again. The gaming layer
includes normal WASD and most of the keys FPS games use on the left hand. On the
right hand we have F1-F12 and a few other special keys for games that require
it.
### Weapon
The weapon layer is a momentary layer that can only be reached from the gaming
layer. This layer preserves the left hand almost unchanged, except for when the
layer is activated the top row becomes NUM 1 - 6 for wepon selection. The right
hand is KC_TRNS the whole way so basically it is still the gaming layer.
## Custom Font
This keymap includes a custom font for my LooseTransistor logo. It is fine if
you want to use it I certainly don't mind but if you want your own, just replace
the glcdfont file here and you should be fine.
Alternatively you could remove the font config line from the config.h file so it
will use the default QMK one.
## OLED
This Keymap is setup to use the newer OLED API. Some work has been done to
customize this with showing layer and USB information. I also tried my best to
get a dormant / sleep state going but it is hit or miss and often only works on
the master hand.
### TODO
- Fix OLED and Backlight so they turn off when the computer sleeps, currently
only the left hand does that and the LEDs still stay on.
- Wait for Spit_common to be implemented in CRKBD and revisit the special color
layers and animations
+100
View File
@@ -0,0 +1,100 @@
/*
This is the c configuration file for the keymap
Copyright 2012 Jun Wako <[email protected]>
Copyright 2015 Jack Humbert
Copyright 2019 Lucas Moreira
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
//#define USE_MATRIX_I2C
/* Select hand configuration */
#define MASTER_LEFT
// #define MASTER_RIGHT
// #define EE_HANDS
//#define SSD1306OLED
#define USE_SERIAL_PD2
#define TAPPING_FORCE_HOLD
#define TAPPING_TERM 150
#undef PRODUCT
#define PRODUCT CRKBD Loose Transistor Ed.
#ifdef RGBLIGHT_ENABLE
//#undef RGBLED_NUM
//#define RGBLIGHT_ANIMATIONS
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_KNIGHT
//#define RGBLED_NUM 27
#define RGBLIGHT_LIMIT_VAL 120
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17
#endif
#ifdef RGB_MATRIX_ENABLE
//# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
# define RGB_MATRIX_HUE_STEP 8
# define RGB_MATRIX_SAT_STEP 8
# define RGB_MATRIX_VAL_STEP 8
# define RGB_MATRIX_SPD_STEP 10
/* Disable the animations you don&#39;t want/need. You will need to disable a good number of these *
* because they take up a lot of space. Disable until you can successfully compile your firmware. */
# define DISABLE_RGB_MATRIX_ALPHAS_MODS
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
// # define DISABLE_RGB_MATRIX_BREATHING
# define DISABLE_RGB_MATRIX_CYCLE_ALL
# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
# define DISABLE_RGB_MATRIX_DUAL_BEACON
# define DISABLE_RGB_MATRIX_RAINBOW_BEACON
# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
# define DISABLE_RGB_MATRIX_RAINDROPS
# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
# define DISABLE_RGB_MATRIX_TYPING_HEATMAP
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
# define DISABLE_RGB_MATRIX_SPLASH
# define DISABLE_RGB_MATRIX_MULTISPLASH
# define DISABLE_RGB_MATRIX_SOLID_SPLASH
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif
#define OLED_FONT_H "keyboards/crkbd/keymaps/kidbrazil/glcdfont.c"
#define OLED_DISABLE_TIMEOUT
@@ -0,0 +1,243 @@
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
// See gfxfont.h for newer custom bitmap font info.
#ifndef FONT5X7_H
#define FONT5X7_H
#ifdef __AVR__
#include <avr/io.h>
#include <avr/pgmspace.h>
#elif defined(ESP8266)
#include <pgmspace.h>
#else
#define PROGMEM
#endif
// Standard ASCII 5x7 font
const unsigned char font[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
0x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
0x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
0x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8,
0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0x00,
0xFC, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
0x02, 0xF9, 0x01, 0x01, 0x05, 0x09,
0x11, 0x22, 0x06, 0xFE, 0xFE, 0xFE,
0xFE, 0xFE, 0xFE, 0xFE, 0x46, 0x46,
0x44, 0x44, 0x45, 0x44, 0x29, 0x28,
0x2A, 0x28, 0x11, 0x13, 0x05, 0x07,
0x05, 0x07, 0x05, 0x07, 0x05, 0x07,
0xE5, 0xE7, 0xE5, 0x07, 0x05, 0x07,
0x05, 0x07, 0x05, 0x07, 0x05, 0x07,
0x85, 0xC7, 0xE5, 0xE7, 0xE5, 0xE7,
0xE5, 0xE7, 0xE5, 0xC7, 0x85, 0x07,
0x85, 0xC7, 0xE5, 0xE7, 0xE5, 0xE7,
0xE5, 0xE7, 0xE5, 0xC7, 0x85, 0x07,
0x85, 0xC7, 0xE5, 0xE7, 0xE5, 0xE7,
0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0x07,
0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0xE7,
0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC,
0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00,
0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E,
0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00,
0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xE3, 0xC1, 0xC1, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0xFF, 0x00, 0x00, 0x80, 0x00,
0x1C, 0x3E, 0x7F, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x22, 0x22,
0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
0x22, 0x22, 0x22, 0x14, 0x14, 0x14,
0x14, 0x14, 0x08, 0x08, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0xBE,
0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0x81, 0xBD,
0x81, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
0x8F, 0x9F, 0x9C, 0x9C, 0x9C, 0x9C,
0x9C, 0x9C, 0x9C, 0xFC, 0xF8, 0x00,
0xFF, 0xFF, 0xFF, 0x9C, 0x9C, 0x9C,
0x9C, 0x9C, 0x9C, 0x80, 0x80, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00,
0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F,
0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00,
0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x03, 0x07, 0x0F,
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x00,
0x1F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
0x20, 0x47, 0x48, 0x50, 0x40, 0x41,
0x42, 0x24, 0x30, 0x3F, 0x3F, 0x3F,
0x3F, 0x3F, 0x3F, 0x3F, 0x31, 0x31,
0x11, 0x51, 0x11, 0x11, 0x4A, 0x0A,
0x2A, 0x0A, 0x44, 0x64, 0x50, 0x70,
0x50, 0x70, 0x50, 0x70, 0x50, 0x70,
0x53, 0x73, 0x53, 0x73, 0x53, 0x73,
0x53, 0x73, 0x53, 0x73, 0x53, 0x70,
0x50, 0x71, 0x53, 0x73, 0x53, 0x73,
0x53, 0x73, 0x53, 0x71, 0x50, 0x70,
0x50, 0x71, 0x53, 0x73, 0x53, 0x73,
0x53, 0x73, 0x53, 0x71, 0x50, 0x70,
0x53, 0x73, 0x53, 0x73, 0x53, 0x73,
0x53, 0x73, 0x53, 0x73, 0x51, 0x70,
0x53, 0x73, 0x53, 0x73, 0x53, 0x73,
0x53, 0x73, 0x53, 0x73, 0x53, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
#endif // FONT5X7_H
+214
View File
@@ -0,0 +1,214 @@
#include QMK_KEYBOARD_H
// [Init Variables] ----------------------------------------------------------//
extern uint8_t is_master;
// Oled timer similar to Drashna's
static uint32_t oled_timer = 0;
// Boolean to store
bool eeprom_oled_enabled = false;
// [CRKBD layers Init] -------------------------------------------------------//
enum crkbd_layers {
_QWERTY,
_NUM,
_SYM,
_GAME,
_WEAPON
};
// [Keymaps] -----------------------------------------------------------------//
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
LSFT_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_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
LGUI_T(KC_PGUP), MO(_NUM), KC_SPC, KC_ENT, MO(_SYM), LALT_T(KC_PGDN)
),
[_NUM] = LAYOUT(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
LSFT_T(KC_TAB), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F12, KC_NO,
KC_LCTL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_PGUP, KC_PGDN, KC_HOME, KC_END, KC_F11, KC_NO,
LGUI_T(KC_PGUP), KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, LALT_T(KC_PGDN)
),
[_SYM] = LAYOUT(
KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
LSFT_T(KC_TAB), RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,
KC_LCTL, RGB_VAD, RGB_RMOD, RGB_HUD, RGB_SAD, TG(_GAME), KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,
LGUI_T(KC_PGUP), KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, LALT_T(KC_PGDN)
),
[_GAME] = LAYOUT(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO, KC_NO,
KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_TRNS, KC_PGUP, KC_PGDN, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TAB, MO(_WEAPON), KC_SPC, KC_ENT, KC_TRNS, KC_NO
),
[_WEAPON] = LAYOUT(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_7, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TAB, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS
)
};
//int RGB_current_mode;
// [Process User Input] ------------------------------------------------------//
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// Use process_record_keymap to reset timer on keypress
if (record->event.pressed) {
#ifdef OLED_DRIVER_ENABLE
oled_timer = timer_read32();
#endif
// Restore LEDs if they are enabled in eeprom
rgb_matrix_enable_noeeprom();
}
return true;
}
// [OLED Configuration] ------------------------------------------------------//
#ifdef OLED_DRIVER_ENABLE
// Init Oled and Rotate....
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
if (!has_usb())
return OLED_ROTATION_180; // flips the display 180 to see it from my side
return rotation;
}
// Read logo from font file
const char *read_logo(void);
// {OLED helpers} -----------------------------------------------//
// Render Blank Space
void render_space(void) {
oled_write_ln_P(PSTR(" "), false);
}
// Render separator lines for oled display
void render_separator(void) {
switch (get_highest_layer(layer_state)){
case _GAME:
case _WEAPON:
oled_write_ln_P(PSTR("===================="), false);
break;
default:
oled_write_ln_P(PSTR("++++++++++++++++++++"), false);
}
}
// Render current layer state
void render_layer_state(void){
// If you want to change the display of OLED, you need to change here
switch (get_highest_layer(layer_state)){
case _QWERTY:
oled_write_ln_P(PSTR("| MODE | QWRTY ]"), false);
break;
case _NUM:
oled_write_ln_P(PSTR("| MODE | NUMBERS ]"), false);
break;
case _SYM:
oled_write_ln_P(PSTR("| MODE | SYMBOLS ]"), false);
break;
case _GAME:
oled_write_ln_P(PSTR("| G A M E ]"), false);
break;
case _WEAPON:
oled_write_ln_P(PSTR("| W E A P O N ]"), false);
break;
default:
oled_write_ln_P(PSTR("| MODE | UNDEF ]"), false);
}
}
// Render USB State
void render_usb_state(void) {
switch (USB_DeviceState) {
case DEVICE_STATE_Unattached:
oled_write_ln_P(PSTR("| USB | FREE ]"), false);
break;
case DEVICE_STATE_Suspended:
oled_write_ln_P(PSTR("| USB | SLEEP ]"), false);
break;
case DEVICE_STATE_Configured:
oled_write_ln_P(PSTR("| USB | READY ]"), false);
break;
case DEVICE_STATE_Powered:
oled_write_ln_P(PSTR("| USB | PWRD ]"), false);
break;
case DEVICE_STATE_Default:
oled_write_ln_P(PSTR("| USB | DFLT ]"), false);
break;
case DEVICE_STATE_Addressed:
oled_write_ln_P(PSTR("| USB | ADDRS ]"), false);
break;
default:
oled_write_ln_P(PSTR("| USB | INVALID ]"), false);
}
}
// Render Logo
void render_logo(void) {
oled_write(read_logo(), false);
}
// Master OLED Screen (Left Hand )
void render_master_oled(void) {
// Switch display based on Layer
switch (get_highest_layer(layer_state)){
case _GAME:
render_separator();
render_layer_state();
render_separator();
render_separator();
break;
case _WEAPON:
render_separator();
render_separator();
render_layer_state();
render_separator();
break;
default:
render_separator();
render_layer_state();
render_separator();
render_usb_state();
}
}
// lave OLED scren (Right Hand)
void render_slave_oled(void) {
render_logo();
}
// {OLED Task} -----------------------------------------------//
void oled_task_user(void) {
// Drashna style timeout for LED and OLED Roughly 8mins
if (timer_elapsed32(oled_timer) > 480000) {
oled_off();
rgb_matrix_disable_noeeprom();
return;
}
else {
oled_on();
}
// Show logo when USB dormant
switch (USB_DeviceState) {
case DEVICE_STATE_Unattached:
case DEVICE_STATE_Powered:
case DEVICE_STATE_Suspended:
render_logo();
break;
default:
if (is_master) {
render_master_oled();
} else {
render_slave_oled();
}
}
}
#endif
@@ -0,0 +1 @@
{"keyboard":"crkbd/rev1","keymap":"kidbrazil","layout":"LAYOUT","layers":[["KC_ESC","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_BSPC","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_LSFT","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_N","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_RSFT","LGUI_T(KC_PGUP)","MO(1)","KC_SPC","KC_ENT","MO(2)","LALT_T(KC_PGDN)"],["KC_ESC","KC_1","KC_2","KC_3","KC_4","KC_5","KC_6","KC_7","KC_8","KC_9","KC_0","KC_DEL","LCTL_T(KC_TAB)","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_LEFT","KC_UP","KC_DOWN","KC_RGHT","KC_F12","KC_NO","KC_LSFT","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_PGUP","KC_PGDN","KC_HOME","KC_END","KC_F11","KC_NO","LGUI_T(KC_PGUP)","KC_TRNS","KC_SPC","KC_ENT","KC_TRNS","LALT_T(KC_PGDN)"],["KC_ESC","KC_EXLM","KC_AT","KC_HASH","KC_DLR","KC_PERC","KC_CIRC","KC_AMPR","KC_ASTR","KC_LPRN","KC_RPRN","KC_BSPC","LCTL_T(KC_TAB)","RGB_TOG","RGB_MOD","RGB_HUI","RGB_SAI","RGB_VAI","KC_MINS","KC_EQL","KC_LCBR","KC_RCBR","KC_PIPE","KC_GRV","KC_LSFT","RGB_VAD","RGB_RMOD","RGB_HUD","RGB_SAD","TG(3)","KC_UNDS","KC_PLUS","KC_LBRC","KC_RBRC","KC_BSLS","KC_TILD","LGUI_T(KC_PGUP)","KC_TRNS","KC_SPC","KC_ENT","KC_TRNS","LALT_T(KC_PGDN)"],["KC_ESC","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_F6","KC_LSFT","KC_A","KC_S","KC_D","KC_F","KC_G","KC_F7","KC_F8","KC_F9","KC_F10","KC_NO","KC_NO","KC_LCTL","KC_Z","KC_X","KC_C","KC_V","KC_TRNS","KC_PGUP","KC_PGDN","KC_NO","KC_NO","KC_NO","KC_NO","KC_TAB","MO(4)","KC_SPC","KC_ENT","KC_TRNS","KC_NO"],["KC_ESC","KC_1","KC_2","KC_3","KC_4","KC_5","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_LSFT","KC_A","KC_S","KC_D","KC_F","KC_6","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_LCTL","KC_Z","KC_X","KC_C","KC_V","KC_7","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TAB","KC_TRNS","KC_SPC","KC_TRNS","KC_TRNS","KC_TRNS"]],"author":"","notes":""}
@@ -0,0 +1,11 @@
#include "crkbd.h"
const char *read_logo(void) {
static char logo[] = {
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
0};
return logo;
}
@@ -0,0 +1,17 @@
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
MOUSEKEY_ENABLE = no
RGBLIGHT_ENABLE = no
RGB_MATRIX_ENABLE = WS2812
OLED_DRIVER_ENABLE = yes
# If you want to change the display of OLED, you need to change here
SRC += ./keyboards/crkbd/keymaps/kidbrazil/logo_reader.c \
#./lib/rgb_state_reader.c \
#./lib/logo_reader.c \
#./lib/keylogger.c \
# ./lib/mode_icon_reader.c \
# ./lib/host_led_state_reader.c \
# ./lib/timelogger.c \
+229
View File
@@ -0,0 +1,229 @@
/*
Copyright 2019 Yiancar-Designs
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 0x8968
#define PRODUCT_ID 0x4447
#define DEVICE_VER 0x0001
#define MANUFACTURER Yiancar-Designs
#define PRODUCT Doppelganger
#define DESCRIPTION A custom split keyboard
/* key matrix size */
#define MATRIX_ROWS 10
#define MATRIX_COLS 9
/*
* 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 SPLIT_HAND_PIN D4
#define MATRIX_ROW_PINS { E6, F1, C7, F7, F6 }
#define MATRIX_COL_PINS { F4, F0, B7, B3, B2, B1, D5, D3, D2 }
#define UNUSED_PINS
#define MATRIX_ROW_PINS_RIGHT { D7, D6, D4, E6, B5 }
#define MATRIX_COL_PINS_RIGHT { F1, F0, F4, F5, F6, F7, C7, C6, B6 }
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
/*
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
*/
// #define USE_I2C
#define SOFT_SERIAL_PIN D1 // or D1, D2, D3, E6
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
#define RGB_DI_PIN B4
// #ifdef RGB_DI_PIN
#define RGBLED_NUM 2
#define RGBLIGHT_SPLIT
#define RGBLED_SPLIT { 1, 1 }
// #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
//#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
/* Bootmagic Lite key configuration */
#define BOOTMAGIC_LITE_ROW 0
#define BOOTMAGIC_LITE_COLUMN 2
+39
View File
@@ -0,0 +1,39 @@
/* Copyright 2019 Yiancar-Designs
*
* 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 "doppelganger.h"
void keyboard_pre_init_kb (void) {
setPinOutput(C6);
setPinOutput(B0);
}
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
// writePin sets the pin high for 1 and low for 0.
// In this example the pins are inverted, setting
// it low/0 turns it on, and high/1 turns the LED off.
// This behavior depends on whether the LED is between the pin
// and VCC or the pin and GND.
writePin(C6, !led_state.caps_lock);
}
return res;
}
__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) {
writePin(B0, !(state & (1UL << 1)));
return state;
}
+46
View File
@@ -0,0 +1,46 @@
/* Copyright 2019 Yiancar-Designs
*
* 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( \
L01, L02, L03, L04, L05, L06, L07, L08, R00, R01, R02, R03, R04, R05, R06, R07, \
L10, L11, L12, L13, L14, L15, L16, L17, R10, R11, R12, R13, R14, R15, R16, R17, R18, \
L20, L21, L22, L23, L24, L25, L26, L27, R20, R21, R22, R23, R24, R25, R26, R27, R28, \
L30, L31, L32, L33, L34, L35, L36, L37, L38, R31, R32, R33, R34, R35, R36, R37, R38, \
L40, L41, L42, L43, L44, L45, L46, R42, R43, R44, R45, R46, R47, R48 \
) \
{ \
{ KC_NO, L01, L02, L03, L04, L05, L06, L07, L08 }, \
{ L10, L11, L12, L13, L14, L15, L16, L17, KC_NO }, \
{ L20, L21, L22, L23, L24, L25, L26, L27, KC_NO }, \
{ L30, L31, L32, L33, L34, L35, L36, L37, L38 }, \
{ L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO }, \
{ R00, R01, R02, R03, R04, R05, R06, R07, KC_NO }, \
{ R10, R11, R12, R13, R14, R15, R16, R17, R18 }, \
{ R20, R21, R22, R23, R24, R25, R26, R27, R28 }, \
{ KC_NO, R31, R32, R33, R34, R35, R36, R37, R38 }, \
{ KC_NO, KC_NO, R42, R43, R44, R45, R46, R47, R48 }, \
}
+12
View File
@@ -0,0 +1,12 @@
{
"keyboard_name": "Doppelganger",
"url": "",
"maintainer": "yiancar",
"width": 20,
"height": 5.25,
"layouts": {
"LAYOUT": {
"layout": [{"label":"F1", "x":1, "y":0}, {"label":"Esc", "x":2.5, "y":0}, {"label":"1", "x":3.5, "y":0}, {"label":"2", "x":4.5, "y":0}, {"label":"3", "x":5.5, "y":0}, {"label":"4", "x":6.5, "y":0}, {"label":"5", "x":7.5, "y":0}, {"label":"6", "x":8.5, "y":0}, {"label":"7", "x":10.5, "y":0}, {"label":"8", "x":11.5, "y":0}, {"label":"9", "x":12.5, "y":0}, {"label":"0", "x":13.5, "y":0}, {"label":"_", "x":14.5, "y":0}, {"label":"+", "x":15.5, "y":0}, {"x":16.5, "y":0}, {"x":17.5, "y":0}, {"label":"F2", "x":0, "y":1}, {"label":"F3", "x":1, "y":1}, {"label":"Tab", "x":2.5, "y":1, "w":1.5}, {"label":"Q", "x":4, "y":1}, {"label":"W", "x":5, "y":1}, {"label":"E", "x":6, "y":1}, {"label":"R", "x":7, "y":1}, {"label":"T", "x":8, "y":1}, {"label":"Y", "x":10, "y":1}, {"label":"U", "x":11, "y":1}, {"label":"I", "x":12, "y":1}, {"label":"O", "x":13, "y":1}, {"label":"P", "x":14, "y":1}, {"label":"{", "x":15, "y":1}, {"label":"}", "x":16, "y":1}, {"label":"|", "x":17, "y":1, "w":1.5}, {"label":"Pg Up", "x":19, "y":1}, {"label":"F4", "x":0, "y":2}, {"label":"F5", "x":1, "y":2}, {"label":"Caps Lock", "x":2.5, "y":2, "w":1.75}, {"label":"A", "x":4.25, "y":2}, {"label":"S", "x":5.25, "y":2}, {"label":"D", "x":6.25, "y":2}, {"label":"F", "x":7.25, "y":2}, {"label":"G", "x":8.25, "y":2}, {"label":"H", "x":10.25, "y":2}, {"label":"J", "x":11.25, "y":2}, {"label":"K", "x":12.25, "y":2}, {"label":"L", "x":13.25, "y":2}, {"label":":", "x":14.25, "y":2}, {"label":"\"", "x":15.25, "y":2}, {"label":"~", "x":16.25, "y":2}, {"label":"Enter", "x":17.25, "y":2, "w":1.25}, {"label":"Pg Dn", "x":19, "y":2}, {"label":"F6", "x":0, "y":3}, {"label":"F7", "x":1, "y":3}, {"label":"Shift", "x":2.5, "y":3, "w":1.25}, {"label":"|", "x":3.75, "y":3}, {"label":"Z", "x":4.75, "y":3}, {"label":"X", "x":5.75, "y":3}, {"label":"C", "x":6.75, "y":3}, {"label":"V", "x":7.75, "y":3}, {"label":"B", "x":8.75, "y":3}, {"label":"N", "x":10.75, "y":3}, {"label":"M", "x":11.75, "y":3}, {"label":"<", "x":12.75, "y":3}, {"label":">", "x":13.75, "y":3}, {"label":"?", "x":14.75, "y":3}, {"label":"Shift", "x":15.75, "y":3, "w":1.75}, {"label":"Up", "x":17.75, "y":3.25}, {"label":"Fn", "x":19, "y":3}, {"label":"F8", "x":0, "y":4}, {"label":"F9", "x":1, "y":4}, {"label":"Ctrl", "x":2.5, "y":4, "w":1.25}, {"label":"Win", "x":3.75, "y":4}, {"label":"Alt", "x":4.75, "y":4, "w":1.25}, {"x":6, "y":4, "w":2.25}, {"x":8.25, "y":4}, {"x":10.25, "y":4, "w":2.75}, {"label":"Alt", "x":13, "y":4, "w":1.25}, {"x":14.25, "y":4}, {"label":"Win", "x":15.25, "y":4, "w":1.25}, {"label":"Left", "x":16.75, "y":4.25}, {"label":"Down", "x":17.75, "y":4.25}, {"label":"Right", "x":18.75, "y":4.25}]
}
}
}
@@ -0,0 +1,33 @@
/* Copyright 2019 Yiancar-Designs
*
* 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( /* Base */
KC_F1, KC_GESC, 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_DEL,
KC_F2, KC_F3, 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_DEL,
KC_F4, KC_F5, 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_NUHS, KC_ENT, KC_PGUP,
KC_F6, KC_F7, KC_LSFT, KC_NUBS, 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_PGDN,
KC_F8, KC_F9, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT( /* FN1 */
RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_MOD, RGB_RMOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
};
@@ -0,0 +1 @@
# The default keymap for doppelganger
+15
View File
@@ -0,0 +1,15 @@
# Doppelganger
![doppelganger](https://i.imgur.com/5eALJBf.png)
A Split keyboard co-designed with Cable Car designs
* Keyboard Maintainer: [Yiancar-Designs](https://github.com/yiancar)
* Hardware Supported: The specific set of pcbs which use 2 ATMEGA-32u4
* Hardware Availability: Contact Noahf#2971 on discord!
Make example for this keyboard (after setting up your build environment):
make doppelganger: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).
+34
View File
@@ -0,0 +1,34 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support
UNICODE_ENABLE = no # Unicode
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
SPLIT_KEYBOARD = yes
+8 -2
View File
@@ -37,11 +37,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DEBOUNCE 5 #define DEBOUNCE 5
/* number of backlight levels */ /* number of backlight levels */
#define BACKLIGHT_LEVELS 3 // #define BACKLIGHT_LEVELS 3
#undef BACKLIGHT_PIN
#define BACKLIGHT_PINS { B1, B2, B3, E6 }
#define BACKLIGHT_LED_COUNT 4
#define BACKLIGHT_LEVELS 10
#define BACKLIGHT_ON_STATE 1
#define RGBLIGHT_ANIMATIONS #define RGBLIGHT_ANIMATIONS
#define RGB_DI_PIN D6 #define RGB_DI_PIN D6
#define RGBLED_NUM 17 #define RGBLED_NUM 18
/* Set to top left most key */ /* Set to top left most key */
#define BOOTMAGIC_LITE_ROW 4 #define BOOTMAGIC_LITE_ROW 4
@@ -16,11 +16,19 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_tkl_ansi(\ [0] = LAYOUT_tkl_ansi(
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_PSCR,KC_SLCK,KC_PAUS, \ 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_PSCR,KC_SLCK,KC_PAUS,
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_INS ,KC_HOME,KC_PGUP, \ 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_INS ,KC_HOME,KC_PGUP,
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_DEL ,KC_END ,KC_PGDN, \ 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_DEL ,KC_END ,KC_PGDN,
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_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_UP, \ 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_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT) \ KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, MO(1),KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT),
[1] = LAYOUT_tkl_ansi(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
BL_TOGG, BL_STEP, BL_INC, BL_DEC, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
}; };
+15 -16
View File
@@ -14,13 +14,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/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <util/delay.h> #include "quantum.h"
#include <avr/io.h>
#include <stdio.h>
#include "matrix.h"
#include "util.h"
#include "print.h"
#include "debug.h"
static uint8_t debouncing = DEBOUNCE; static uint8_t debouncing = DEBOUNCE;
@@ -54,18 +48,23 @@ void matrix_scan_user(void) {
void backlight_init_ports(void) void backlight_init_ports(void)
{ {
DDRD |= 0b11010000;
PORTD &= ~0b01010000; }
PORTD |= 0b10000000;
DDRB |= 0b00011111; void indicator_init_ports(void) {
PORTB &= ~0b00001110;
PORTB |= 0b00010001; // Num LED
DDRE |= 0b01000000; setPinOutput(B4);
PORTE &= ~0b01000000;
// Caps Lock
setPinOutput(B0);
// Scroll Lock
setPinOutput(D7);
} }
void matrix_init(void) { void matrix_init(void) {
backlight_init_ports(); indicator_init_ports();
unselect_cols(); unselect_cols();
init_rows(); init_rows();
+7 -7
View File
@@ -3,9 +3,9 @@
Non official firmware for custom TKL Korean keyboard made by Duck. Non official firmware for custom TKL Korean keyboard made by Duck.
Group buy was run December 2018 via [geekhack](https://geekhack.org/index.php?topic=98581.0) with 100 keyboards total. Group buy was run December 2018 via [geekhack](https://geekhack.org/index.php?topic=98581.0) with 100 keyboards total.
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) * Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
Hardware Supported: Duck Eagle/Viper PCB Ver 2.0, Atmega32u4 * Hardware Supported: Duck Orion V3 PCB Ver 2.1
Hardware Availability: Wait until GB of the next revision * Hardware Availability: Wait until GB of the next revision
Make example for this keyboard (after setting up your build environment): Make example for this keyboard (after setting up your build environment):
@@ -13,7 +13,7 @@ Make example for this keyboard (after setting up your build environment):
**Reset Key:** To put the Orion V3 into reset, hold Backspace key (`K4N`) while plugging in. **Reset Key:** To put the Orion V3 into reset, hold Backspace key (`K4N`) while plugging in.
**CAUTION:** At this time 10/03/19 lighting has not been tested fully and may not properly work. **CAUTION:** At this time 12/19/19 layer indicator lighting has not been implemented by 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). 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).
@@ -22,9 +22,9 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to
The Orion V3 PCB consists of: The Orion V3 PCB consists of:
### Microchips ### Microchips
2 74HC237D 3-to-8 line decoders 2 74HC237D 3-to-8 line decoders U1, U2
1 Atmega32u4 microcontroller 1 Atmega32u4 microcontroller
2 WS2811 LED controller 2 WS2811 LED controller U5, U6
## Notes ## Notes
Special thanks to Marcus aka Keebology for doing this remotely and mapping the matrix. Special thanks to Marcus aka Keebology for doing this remotely and mapping the matrix, indicator LEDs, and backlight LEDs.
+18 -40
View File
@@ -16,48 +16,26 @@
#include "v3.h" #include "v3.h"
#include "indicator_leds.h" #include "indicator_leds.h"
enum BACKLIGHT_AREAS { // Alphas PB1
BACKLIGHT_ALPHAS = 0b00000010, // Navigation Cluster: PB2
BACKLIGHT_MODNUM = 0b00001000 // Number Row, Mods: PB3
}; // Function Row: PE6
void backlight_set(uint8_t level) { // Other than using RGB or LED matrix, QMK cannot turn on specific zones
switch(level) { // of backlight LEDs. Unfortunately, Duck PCBs do not follow this design
case 0: // and instead use multiple pins connected to each of these zones. QMK is
PORTB |= BACKLIGHT_ALPHAS; // only able to control them ALL with the current default mechanisms.
PORTB |= BACKLIGHT_MODNUM;
break;
case 1:
PORTB &= ~BACKLIGHT_ALPHAS;
PORTB |= BACKLIGHT_MODNUM;
break;
case 2:
PORTB |= BACKLIGHT_ALPHAS;
PORTB &= ~BACKLIGHT_MODNUM;
break;
case 3:
PORTB &= ~BACKLIGHT_ALPHAS;
PORTB &= ~BACKLIGHT_MODNUM;
break;
}
}
// Port from backlight_update_state // Locking indicator LEDs
void led_set_kb(uint8_t usb_led) { // The Duck Orion V3 has 3 locking indicator LEDs and are located to the right
bool status[8] = { // of the Escape key.
IS_HOST_LED_ON(USB_LED_SCROLL_LOCK), /* LED 3 */ bool led_update_kb(led_t led_state) {
IS_HOST_LED_ON(USB_LED_CAPS_LOCK), /* LED 2 */ if(led_update_user(led_state)) {
IS_HOST_LED_ON(USB_LED_NUM_LOCK), /* LED 1 */ writePin(B0, !led_state.caps_lock);
writePin(B4, !led_state.num_lock);
layer_state & (1<<2), /* LED 6 */ writePin(D7, !led_state.scroll_lock);
layer_state & (1<<1), /* LED 5 */ }
layer_state & (1<<0) ? 0: 1, /* LED 4 */ return true;
layer_state & (1<<5), /* LED 8 */
layer_state & (1<<4) /* LED 7 */
};
indicator_leds_set(status);
} }
bool process_record_kb(uint16_t keycode, keyrecord_t *record) { bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+1
View File
@@ -13,4 +13,5 @@ Jetfire V1
Lightsaver V3 Lightsaver V3
Octagon V1 Octagon V1
Octagon V2 Octagon V2
Orion V3
Viper V2 Viper V2
+2 -1
View File
@@ -1,2 +1,3 @@
#pragma once #pragma once
#include "config_common.h"
#include "config_common.h"
+69 -2
View File
@@ -6,8 +6,75 @@
"height": 5, "height": 5,
"layouts": { "layouts": {
"LAYOUT": { "LAYOUT": {
"key_count": 63, "layout": [
"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":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"Shift", "x":11.25, "y":3, "w":1.75}, {"label":"\u2191", "x":13, "y":3},{"label":"?", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Ctrl", "x":11, "y":4}, {"label":"\u2190", "x":12, "y":4}, {"label":"\u2193", "x":13, "y":4}, {"label":"\u2192", "x":14, "y":4}] {"x":0, "y":0},
{"x":1, "y":0},
{"x":2, "y":0},
{"x":3, "y":0},
{"x":4, "y":0},
{"x":5, "y":0},
{"x":6, "y":0},
{"x":7, "y":0},
{"x":8, "y":0},
{"x":9, "y":0},
{"x":10, "y":0},
{"x":11, "y":0},
{"x":12, "y":0},
{"x":13, "y":0, "w":2},
{"x":0, "y":1, "w":1.5},
{"x":1.5, "y":1},
{"x":2.5, "y":1},
{"x":3.5, "y":1},
{"x":4.5, "y":1},
{"x":5.5, "y":1},
{"x":6.5, "y":1},
{"x":7.5, "y":1},
{"x":8.5, "y":1},
{"x":9.5, "y":1},
{"x":10.5, "y":1},
{"x":11.5, "y":1},
{"x":12.5, "y":1},
{"x":13.5, "y":1, "w":1.5},
{"x":0, "y":2, "w":1.75},
{"x":1.75, "y":2},
{"x":2.75, "y":2},
{"x":3.75, "y":2},
{"x":4.75, "y":2},
{"x":5.75, "y":2},
{"x":6.75, "y":2},
{"x":7.75, "y":2},
{"x":8.75, "y":2},
{"x":9.75, "y":2},
{"x":10.75, "y":2},
{"x":11.75, "y":2},
{"x":12.75, "y":2, "w":2.25},
{"x":0, "y":3, "w":2.25},
{"x":2.25, "y":3},
{"x":3.25, "y":3},
{"x":4.25, "y":3},
{"x":5.25, "y":3},
{"x":6.25, "y":3},
{"x":7.25, "y":3},
{"x":8.25, "y":3},
{"x":9.25, "y":3},
{"x":10.25, "y":3},
{"x":11.25, "y":3, "w":1.75},
{"x":13, "y":3},
{"x":14, "y":3},
{"x":0, "y":4, "w":1.25},
{"x":1.25, "y":4, "w":1.25},
{"x":2.5, "y":4, "w":1.25},
{"x":3.75, "y":4, "w":6.25},
{"x":10, "y":4},
{"x":11, "y":4},
{"x":12, "y":4},
{"x":13, "y":4},
{"x":14, "y":4}
]
} }
} }
} }
@@ -1,49 +1,39 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#define _LAYER0 0
#define _LAYER1 1
#define _LAYER2 2
#define _LAYER3 3
#define _LAYER4 4
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LAYER0] = LAYOUT( /* Base */ [0] = LAYOUT(
KC_GESC, 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_GESC, 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_BSLASH,\ 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,
CTL_T(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, \ CTL_T(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, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL),\ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL),
KC_LCTL, KC_LGUI, LM(1, MOD_LALT), KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), KC_LCTL, KC_LGUI, LM(1, MOD_LALT), KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
[_LAYER1] = LAYOUT( /* FN */ ),
TO(3), 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_DEL ,\ [1] = LAYOUT(
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET ,\ TO(3), 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_DEL,
KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, EEP_RST,\ _______, _______, KC_UP, _______, _______, _______, KC_CALC, _______, KC_INS, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, NK_TOGG, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN,KC_VOLU, KC_MUTE,\ _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, EEP_RST,
KC_TRNS, KC_TRNS, KC_TRNS, TO(4), KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_VOLU, KC_MUTE,
[_LAYER2] = LAYOUT( /* LIGHT */ _______, _______, _______, TO(4), _______, _______, KC_MPRV, KC_VOLD, KC_MNXT
KC_TRNS, 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_DEL ,\ ),
KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, RESET ,\ [2] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, EEP_RST,\ _______, 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_DEL,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, RESET,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, EEP_RST,
[_LAYER3] = LAYOUT( /* NUMPAD */ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_TRNS,\ _______, _______, _______, _______, _______, _______, _______, _______, _______
KC_TRNS, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, TO(0),\ ),
KC_TRNS, KC_P4, KC_P5, KC_P6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_TRNS, KC_PENT,\ [3] = LAYOUT(
KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS,\ KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, _______, _______, _______, _______, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, _______,
KC_TRNS, KC_P0, KC_PDOT, KC_PENT, KC_P0, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS), _______, KC_P7, KC_P8, KC_P9, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, TO(0),
[_LAYER4] = LAYOUT( /* SWITCH LALT AND LGUI */ _______, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, KC_PENT,
KC_GESC, 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_P1, KC_P2, KC_P3, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______,
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_BSLASH,\ _______, KC_P0, KC_PDOT, KC_PENT, KC_P0, KC_PDOT, _______, _______, _______
CTL_T(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, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL),\ [4] = LAYOUT(
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, TO(0), KC_LEFT, KC_DOWN, KC_RIGHT), KC_GESC, 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,
void matrix_init_user(void) { CTL_T(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,
//user initialization KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL),
} KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, TO(0), KC_LEFT, KC_DOWN, KC_RGHT
)
void matrix_scan_user(void) { };
//user matrix
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
+39 -19
View File
@@ -1,36 +1,56 @@
#pragma once #pragma once
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x1219 #define PRODUCT_ID 0x1219
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER DZTECH #define MANUFACTURER DZTECH
#define PRODUCT DZ60RGB #define PRODUCT DZ60RGB
#define DESCRIPTION DZ60 ARM RGB keyboard #define DESCRIPTION DZ60 ARM RGB keyboard
/* key matrix size */
#define MATRIX_ROWS 5 #define MATRIX_ROWS 5
#define MATRIX_COLS 14 #define MATRIX_COLS 14
/*
* 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 { B1, B10, B11, B14, B12 } #define MATRIX_ROW_PINS { B1, B10, B11, B14, B12 }
#define MATRIX_COL_PINS {A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14 } #define MATRIX_COL_PINS { A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14 }
#define UNUSED_PINS
/* #define UNUSED_PINS {A0,A1,A2, A3,A4,A9,A10,C15,A13,A14,B2}*/
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 3 #define DEBOUNCE 3
/* disable these deprecated features by default */
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
# define NO_ACTION_MACRO
# define NO_ACTION_FUNCTION
#endif
#ifdef RGB_MATRIX_ENABLE #ifdef RGB_MATRIX_ENABLE
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 4 # define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26 # define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define DISABLE_RGB_MATRIX_SPLASH # define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_MULTISPLASH # define DISABLE_RGB_MATRIX_MULTISPLASH
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b1010000 # define DRIVER_ADDR_1 0b1010000
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. # define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
#define DRIVER_COUNT 2 # define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 63 # define DRIVER_1_LED_TOTAL 63
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL # define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif
+21 -11
View File
@@ -1,14 +1,24 @@
# MCU name # MCU name
MCU = STM32F303 MCU = STM32F303
BACKLIGHT_ENABLE = no # Build Options
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration # change yes to no to disable
MOUSEKEY_ENABLE = yes # Mouse keys #
EXTRAKEY_ENABLE = yes # Audio control and System control BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
CONSOLE_ENABLE = no # Console for debug MOUSEKEY_ENABLE = yes # Mouse keys
COMMAND_ENABLE = no # Commands for debug and configuration EXTRAKEY_ENABLE = yes # Audio control and System control
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend CONSOLE_ENABLE = no # Console for debug
NKRO_ENABLE = yes # USB Nkey Rollover COMMAND_ENABLE = no # Commands for debug and configuration
AUDIO_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support
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
RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
+49 -27
View File
@@ -1,44 +1,66 @@
#pragma once #pragma once
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x1219 #define PRODUCT_ID 0x1219
#define DEVICE_VER 0x0002 #define DEVICE_VER 0x0002
#define MANUFACTURER DZTECH #define MANUFACTURER DZTECH
#define PRODUCT DZ60RGB #define PRODUCT DZ60RGB
#define DESCRIPTION DZ60 AVR RGB keyboard #define DESCRIPTION DZ60 AVR RGB keyboard
/* key matrix size */
#define MATRIX_ROWS 5 #define MATRIX_ROWS 5
#define MATRIX_COLS 14 #define MATRIX_COLS 14
#define MATRIX_ROW_PINS {F5, F4, F1, B3, B2 } /*
#define MATRIX_COL_PINS {C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 } * 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 { F5, F4, F1, B3, B2 }
#define MATRIX_COL_PINS { C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 }
#define UNUSED_PINS #define UNUSED_PINS
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 3 #define DEBOUNCE 3
/* disable these deprecated features by default */
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
# define NO_ACTION_MACRO
# define NO_ACTION_FUNCTION
#endif
#ifdef RGB_MATRIX_ENABLE #ifdef RGB_MATRIX_ENABLE
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#define DISABLE_RGB_MATRIX_BAND_SAT # define DISABLE_RGB_MATRIX_BAND_SAT
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT # define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT # define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
#define DISABLE_RGB_MATRIX_SPLASH # define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_MULTISPLASH # define DISABLE_RGB_MATRIX_MULTISPLASH
#define DISABLE_RGB_MATRIX_SOLID_SPLASH # define DISABLE_RGB_MATRIX_SOLID_SPLASH
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
#define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DISABLE_RGB_MATRIX_DIGITAL_RAIN
#define DRIVER_ADDR_1 0b1010000 # define DRIVER_ADDR_1 0b1010000
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. # define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
#define DRIVER_COUNT 2 # define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 63 # define DRIVER_1_LED_TOTAL 63
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL # define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif
+22 -11
View File
@@ -1,3 +1,4 @@
# MCU name
MCU = atmega32u4 MCU = atmega32u4
# Bootloader selection # Bootloader selection
@@ -10,14 +11,24 @@ MCU = atmega32u4
# ATmega328P USBasp # ATmega328P USBasp
BOOTLOADER = atmel-dfu BOOTLOADER = atmel-dfu
BACKLIGHT_ENABLE = no # Build Options
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration # change yes to no to disable
MOUSEKEY_ENABLE = yes # Mouse keys #
EXTRAKEY_ENABLE = yes # Audio control and System control BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
CONSOLE_ENABLE = no # Console for debug MOUSEKEY_ENABLE = yes # Mouse keys
COMMAND_ENABLE = no # Commands for debug and configuration EXTRAKEY_ENABLE = yes # Audio control and System control
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend CONSOLE_ENABLE = no # Console for debug
NKRO_ENABLE = yes # USB Nkey Rollover COMMAND_ENABLE = no # Commands for debug and configuration
AUDIO_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support
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
RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
+1
View File
@@ -1,2 +1,3 @@
#pragma once #pragma once
#include "config_common.h" #include "config_common.h"
+73 -8
View File
@@ -1,13 +1,78 @@
{ {
"keyboard_name": "dz60rgb_ansi", "keyboard_name": "dz60rgb_ansi",
"url": "", "url": "",
"maintainer": "dztch", "maintainer": "dztech",
"width": 14, "width": 15,
"height": 5, "height": 5,
"layouts": { "layouts": {
"LAYOUT_60_ansi": { "LAYOUT_60_ansi": {
"key_count": 61, "layout": [
"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":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] {"x":0, "y":0},
{"x":1, "y":0},
{"x":2, "y":0},
{"x":3, "y":0},
{"x":4, "y":0},
{"x":5, "y":0},
{"x":6, "y":0},
{"x":7, "y":0},
{"x":8, "y":0},
{"x":9, "y":0},
{"x":10, "y":0},
{"x":11, "y":0},
{"x":12, "y":0},
{"x":13, "y":0, "w":2},
{"x":0, "y":1, "w":1.5},
{"x":1.5, "y":1},
{"x":2.5, "y":1},
{"x":3.5, "y":1},
{"x":4.5, "y":1},
{"x":5.5, "y":1},
{"x":6.5, "y":1},
{"x":7.5, "y":1},
{"x":8.5, "y":1},
{"x":9.5, "y":1},
{"x":10.5, "y":1},
{"x":11.5, "y":1},
{"x":12.5, "y":1},
{"x":13.5, "y":1, "w":1.5},
{"x":0, "y":2, "w":1.75},
{"x":1.75, "y":2},
{"x":2.75, "y":2},
{"x":3.75, "y":2},
{"x":4.75, "y":2},
{"x":5.75, "y":2},
{"x":6.75, "y":2},
{"x":7.75, "y":2},
{"x":8.75, "y":2},
{"x":9.75, "y":2},
{"x":10.75, "y":2},
{"x":11.75, "y":2},
{"x":12.75, "y":2, "w":2.25},
{"x":0, "y":3, "w":2.25},
{"x":2.25, "y":3},
{"x":3.25, "y":3},
{"x":4.25, "y":3},
{"x":5.25, "y":3},
{"x":6.25, "y":3},
{"x":7.25, "y":3},
{"x":8.25, "y":3},
{"x":9.25, "y":3},
{"x":10.25, "y":3},
{"x":11.25, "y":3},
{"x":12.25, "y":3, "w":2.75},
{"x":0, "y":4, "w":1.25},
{"x":1.25, "y":4, "w":1.25},
{"x":2.5, "y":4, "w":1.25},
{"x":3.75, "y":4, "w":6.25},
{"x":10, "y":4, "w":1.25},
{"x":11.25, "y":4, "w":1.25},
{"x":12.5, "y":4, "w":1.25},
{"x":13.75, "y":4, "w":1.25}
]
} }
} }
} }
@@ -1,36 +1,25 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#define _LAYER0 0
#define _LAYER1 1
#define _LAYER2 2
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LAYER0] = LAYOUT_60_ansi( /* Base */ [0] = LAYOUT_60_ansi(
KC_GESC, 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_GESC, 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_BSLASH,\ 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,
CTL_T(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, \ CTL_T(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_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_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), MO(2), KC_RCTL), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), MO(2), KC_RCTL
[_LAYER1] = LAYOUT_60_ansi( /* FN */ ),
KC_GESC, 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_DEL ,\ [1] = LAYOUT_60_ansi(
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET ,\ KC_GESC, 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_DEL,
KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS,\ _______, _______, KC_UP, _______, _______, _______, KC_CALC, _______, KC_INS, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET,
KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, NK_TOGG, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN,KC_MNXT, \ _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_MNXT,
[_LAYER2] = LAYOUT_60_ansi( /* FN2 */ _______, _______, _______, _______, _______, _______, _______, _______
KC_TRNS, 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_DEL ,\ ),
KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, RESET ,\ [2] = LAYOUT_60_ansi(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS,\ _______, 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_DEL,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, RESET,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______,
}; _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______
void matrix_init_user(void) { )
//user initialization };
}
void matrix_scan_user(void) {
//user matrix
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
+39 -19
View File
@@ -1,36 +1,56 @@
#pragma once #pragma once
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x1220 #define PRODUCT_ID 0x1220
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER DZTECH #define MANUFACTURER DZTECH
#define PRODUCT DZ60RGB_ANSI #define PRODUCT DZ60RGB_ANSI
#define DESCRIPTION DZ60 ARM RGB keyboard #define DESCRIPTION DZ60 ARM RGB keyboard
/* key matrix size */
#define MATRIX_ROWS 5 #define MATRIX_ROWS 5
#define MATRIX_COLS 14 #define MATRIX_COLS 14
/*
* 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 { B1, B10, B11, B14, B12 } #define MATRIX_ROW_PINS { B1, B10, B11, B14, B12 }
#define MATRIX_COL_PINS {A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14 } #define MATRIX_COL_PINS { A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14 }
#define UNUSED_PINS
/* #define UNUSED_PINS {A0,A1,A2, A3,A4,A9,A10,C15,A13,A14,B2}*/
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 3 #define DEBOUNCE 3
/* disable these deprecated features by default */
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
# define NO_ACTION_MACRO
# define NO_ACTION_FUNCTION
#endif
#ifdef RGB_MATRIX_ENABLE #ifdef RGB_MATRIX_ENABLE
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 4 # define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26 # define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define DISABLE_RGB_MATRIX_SPLASH # define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_MULTISPLASH # define DISABLE_RGB_MATRIX_MULTISPLASH
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b1010000 # define DRIVER_ADDR_1 0b1010000
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. # define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
#define DRIVER_COUNT 2 # define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 61 # define DRIVER_1_LED_TOTAL 61
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL # define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif
+21 -11
View File
@@ -1,14 +1,24 @@
# MCU name # MCU name
MCU = STM32F303 MCU = STM32F303
BACKLIGHT_ENABLE = no # Build Options
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration # change yes to no to disable
MOUSEKEY_ENABLE = yes # Mouse keys #
EXTRAKEY_ENABLE = yes # Audio control and System control BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
CONSOLE_ENABLE = no # Console for debug MOUSEKEY_ENABLE = yes # Mouse keys
COMMAND_ENABLE = no # Commands for debug and configuration EXTRAKEY_ENABLE = yes # Audio control and System control
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend CONSOLE_ENABLE = no # Console for debug
NKRO_ENABLE = yes # USB Nkey Rollover COMMAND_ENABLE = no # Commands for debug and configuration
AUDIO_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support
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
RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
+49 -27
View File
@@ -1,44 +1,66 @@
#pragma once #pragma once
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x1220 #define PRODUCT_ID 0x1220
#define DEVICE_VER 0x0002 #define DEVICE_VER 0x0002
#define MANUFACTURER DZTECH #define MANUFACTURER DZTECH
#define PRODUCT DZ60RGB_ANSI #define PRODUCT DZ60RGB_ANSI
#define DESCRIPTION DZ60 AVR RGB keyboard #define DESCRIPTION DZ60 AVR RGB keyboard
/* key matrix size */
#define MATRIX_ROWS 5 #define MATRIX_ROWS 5
#define MATRIX_COLS 14 #define MATRIX_COLS 14
#define MATRIX_ROW_PINS {F5, F4, F1, B3, B2 } /*
#define MATRIX_COL_PINS {C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 } * 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 { F5, F4, F1, B3, B2 }
#define MATRIX_COL_PINS { C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 }
#define UNUSED_PINS #define UNUSED_PINS
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 3 #define DEBOUNCE 3
/* disable these deprecated features by default */
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
# define NO_ACTION_MACRO
# define NO_ACTION_FUNCTION
#endif
#ifdef RGB_MATRIX_ENABLE #ifdef RGB_MATRIX_ENABLE
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#define DISABLE_RGB_MATRIX_BAND_SAT # define DISABLE_RGB_MATRIX_BAND_SAT
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT # define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT # define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
#define DISABLE_RGB_MATRIX_SPLASH # define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_MULTISPLASH # define DISABLE_RGB_MATRIX_MULTISPLASH
#define DISABLE_RGB_MATRIX_SOLID_SPLASH # define DISABLE_RGB_MATRIX_SOLID_SPLASH
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
#define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DISABLE_RGB_MATRIX_DIGITAL_RAIN
#define DRIVER_ADDR_1 0b1010000 # define DRIVER_ADDR_1 0b1010000
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. # define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
#define DRIVER_COUNT 2 # define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 61 # define DRIVER_1_LED_TOTAL 61
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL # define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif
+22 -11
View File
@@ -1,3 +1,4 @@
# MCU name
MCU = atmega32u4 MCU = atmega32u4
# Bootloader selection # Bootloader selection
@@ -10,14 +11,24 @@ MCU = atmega32u4
# ATmega328P USBasp # ATmega328P USBasp
BOOTLOADER = atmel-dfu BOOTLOADER = atmel-dfu
BACKLIGHT_ENABLE = no # Build Options
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration # change yes to no to disable
MOUSEKEY_ENABLE = yes # Mouse keys #
EXTRAKEY_ENABLE = yes # Audio control and System control BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
CONSOLE_ENABLE = no # Console for debug MOUSEKEY_ENABLE = yes # Mouse keys
COMMAND_ENABLE = no # Commands for debug and configuration EXTRAKEY_ENABLE = yes # Audio control and System control
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend CONSOLE_ENABLE = no # Console for debug
NKRO_ENABLE = yes # USB Nkey Rollover COMMAND_ENABLE = no # Commands for debug and configuration
AUDIO_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support
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
RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
+2 -1
View File
@@ -1,2 +1,3 @@
#pragma once #pragma once
#include "config_common.h"
#include "config_common.h"
+73 -6
View File
@@ -1,12 +1,79 @@
{ {
"keyboard_name": "dz60rgb_wkl", "keyboard_name": "dz60rgb_wkl",
"url": "", "url": "",
"maintainer": "dztech", "maintainer": "dztech",
"width": 15, "width": 15,
"height": 5, "height": 5,
"layouts": { "layouts": {
"LAYOUT_60_tsangan_hhkb": { "LAYOUT_60_tsangan_hhkb": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}] "layout": [
{"x":0, "y":0},
{"x":1, "y":0},
{"x":2, "y":0},
{"x":3, "y":0},
{"x":4, "y":0},
{"x":5, "y":0},
{"x":6, "y":0},
{"x":7, "y":0},
{"x":8, "y":0},
{"x":9, "y":0},
{"x":10, "y":0},
{"x":11, "y":0},
{"x":12, "y":0},
{"x":13, "y":0},
{"x":14, "y":0},
{"x":0, "y":1, "w":1.5},
{"x":1.5, "y":1},
{"x":2.5, "y":1},
{"x":3.5, "y":1},
{"x":4.5, "y":1},
{"x":5.5, "y":1},
{"x":6.5, "y":1},
{"x":7.5, "y":1},
{"x":8.5, "y":1},
{"x":9.5, "y":1},
{"x":10.5, "y":1},
{"x":11.5, "y":1},
{"x":12.5, "y":1},
{"x":13.5, "y":1, "w":1.5},
{"x":0, "y":2, "w":1.75},
{"x":1.75, "y":2},
{"x":2.75, "y":2},
{"x":3.75, "y":2},
{"x":4.75, "y":2},
{"x":5.75, "y":2},
{"x":6.75, "y":2},
{"x":7.75, "y":2},
{"x":8.75, "y":2},
{"x":9.75, "y":2},
{"x":10.75, "y":2},
{"x":11.75, "y":2},
{"x":12.75, "y":2, "w":2.25},
{"x":0, "y":3, "w":2.25},
{"x":2.25, "y":3},
{"x":3.25, "y":3},
{"x":4.25, "y":3},
{"x":5.25, "y":3},
{"x":6.25, "y":3},
{"x":7.25, "y":3},
{"x":8.25, "y":3},
{"x":9.25, "y":3},
{"x":10.25, "y":3},
{"x":11.25, "y":3},
{"x":12.25, "y":3, "w":1.75},
{"x":14, "y":3},
{"x":0, "y":4, "w":1.5},
{"x":1.5, "y":4},
{"x":2.5, "y":4, "w":1.5},
{"x":4, "y":4, "w":7},
{"x":11, "y":4, "w":1.5},
{"x":12.5, "y":4},
{"x":13.5, "y":4, "w":1.5}
]
} }
} }
} }
@@ -1,37 +1,25 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#define _LAYER0 0
#define _LAYER1 1
#define _LAYER2 2
#define _LAYER3 3
#define _LAYER4 4
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LAYER0] = LAYOUT_60_tsangan_hhkb( /* Base */ [0] = LAYOUT_60_tsangan_hhkb(
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
CTL_T(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, CTL_T(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, MO(2), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(2),
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, MO(1), KC_RCTL), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL
[_LAYER1] = LAYOUT_60_tsangan_hhkb( /* FN */ ),
KC_GRAVE, 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_TRNS, KC_TRNS, [1] = LAYOUT_60_tsangan_hhkb(
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET , KC_GRV, 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_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, _______, _______, KC_UP, _______, _______, _______, KC_CALC, _______, KC_INS, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET,
KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, NK_TOGG, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN,KC_MNXT, KC_TRNS, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_MNXT, _______,
[_LAYER2] = LAYOUT_60_tsangan_hhkb( /* FN2 */ _______, _______, _______, _______, _______, _______, _______
KC_TRNS, 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_DEL ,KC_TRNS, ),
KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, RESET, [2] = LAYOUT_60_tsangan_hhkb(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, _______, 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_DEL, _______,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, RESET,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______,
}; _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
void matrix_init_user(void) { _______, _______, _______, _______, _______, _______, _______
//user initialization )
} };
void matrix_scan_user(void) {
//user matrix
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
+39 -19
View File
@@ -1,36 +1,56 @@
#pragma once #pragma once
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x1221 #define PRODUCT_ID 0x1221
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER DZTECH #define MANUFACTURER DZTECH
#define PRODUCT DZ60RGB_WKL #define PRODUCT DZ60RGB_WKL
#define DESCRIPTION DZ60 ARM RGB keyboard #define DESCRIPTION DZ60 ARM RGB keyboard
/* key matrix size */
#define MATRIX_ROWS 5 #define MATRIX_ROWS 5
#define MATRIX_COLS 14 #define MATRIX_COLS 14
/*
* 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 { B1, B10, B11, B14, B12 } #define MATRIX_ROW_PINS { B1, B10, B11, B14, B12 }
#define MATRIX_COL_PINS {A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14 } #define MATRIX_COL_PINS { A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14 }
#define UNUSED_PINS
/* #define UNUSED_PINS {A0,A1,A2, A3,A4,A9,A10,C15,A13,A14,B2}*/
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 3 #define DEBOUNCE 3
/* disable these deprecated features by default */
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
# define NO_ACTION_MACRO
# define NO_ACTION_FUNCTION
#endif
#ifdef RGB_MATRIX_ENABLE #ifdef RGB_MATRIX_ENABLE
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 4 # define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26 # define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define DISABLE_RGB_MATRIX_SPLASH # define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_MULTISPLASH # define DISABLE_RGB_MATRIX_MULTISPLASH
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b1010000 # define DRIVER_ADDR_1 0b1010000
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. # define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
#define DRIVER_COUNT 2 # define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 62 # define DRIVER_1_LED_TOTAL 62
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL # define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif
+21 -11
View File
@@ -1,16 +1,26 @@
# MCU name # MCU name
MCU = STM32F303 MCU = STM32F303
BACKLIGHT_ENABLE = no # Build Options
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration # change yes to no to disable
MOUSEKEY_ENABLE = yes # Mouse keys #
EXTRAKEY_ENABLE = yes # Audio control and System control BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
CONSOLE_ENABLE = no # Console for debug MOUSEKEY_ENABLE = yes # Mouse keys
COMMAND_ENABLE = no # Commands for debug and configuration EXTRAKEY_ENABLE = yes # Audio control and System control
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend CONSOLE_ENABLE = no # Console for debug
NKRO_ENABLE = yes # USB Nkey Rollover COMMAND_ENABLE = no # Commands for debug and configuration
AUDIO_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support
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
RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
LAYOUTS = 60_tsangan_hhkb LAYOUTS = 60_tsangan_hhkb
+49 -27
View File
@@ -1,44 +1,66 @@
#pragma once #pragma once
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x1221 #define PRODUCT_ID 0x1221
#define DEVICE_VER 0x0002 #define DEVICE_VER 0x0002
#define MANUFACTURER DZTECH #define MANUFACTURER DZTECH
#define PRODUCT DZ60RGB_WKL #define PRODUCT DZ60RGB_WKL
#define DESCRIPTION DZ60 AVR RGB keyboard #define DESCRIPTION DZ60 AVR RGB keyboard
/* key matrix size */
#define MATRIX_ROWS 5 #define MATRIX_ROWS 5
#define MATRIX_COLS 14 #define MATRIX_COLS 14
#define MATRIX_ROW_PINS {F5, F4, F1, B3, B2 } /*
#define MATRIX_COL_PINS {C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 } * 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 { F5, F4, F1, B3, B2 }
#define MATRIX_COL_PINS { C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 }
#define UNUSED_PINS #define UNUSED_PINS
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 3 #define DEBOUNCE 3
/* disable these deprecated features by default */
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
# define NO_ACTION_MACRO
# define NO_ACTION_FUNCTION
#endif
#ifdef RGB_MATRIX_ENABLE #ifdef RGB_MATRIX_ENABLE
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#define DISABLE_RGB_MATRIX_BAND_SAT # define DISABLE_RGB_MATRIX_BAND_SAT
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT # define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT # define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
#define DISABLE_RGB_MATRIX_SPLASH # define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_MULTISPLASH # define DISABLE_RGB_MATRIX_MULTISPLASH
#define DISABLE_RGB_MATRIX_SOLID_SPLASH # define DISABLE_RGB_MATRIX_SOLID_SPLASH
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
#define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DISABLE_RGB_MATRIX_DIGITAL_RAIN
#define DRIVER_ADDR_1 0b1010000 # define DRIVER_ADDR_1 0b1010000
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. # define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
#define DRIVER_COUNT 2 # define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 62 # define DRIVER_1_LED_TOTAL 62
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL # define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif
+22 -11
View File
@@ -1,3 +1,4 @@
# MCU name
MCU = atmega32u4 MCU = atmega32u4
# Bootloader selection # Bootloader selection
@@ -10,16 +11,26 @@ MCU = atmega32u4
# ATmega328P USBasp # ATmega328P USBasp
BOOTLOADER = atmel-dfu BOOTLOADER = atmel-dfu
BACKLIGHT_ENABLE = no # Build Options
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration # change yes to no to disable
MOUSEKEY_ENABLE = yes # Mouse keys #
EXTRAKEY_ENABLE = yes # Audio control and System control BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
CONSOLE_ENABLE = no # Console for debug MOUSEKEY_ENABLE = yes # Mouse keys
COMMAND_ENABLE = no # Commands for debug and configuration EXTRAKEY_ENABLE = yes # Audio control and System control
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend CONSOLE_ENABLE = no # Console for debug
NKRO_ENABLE = yes # USB Nkey Rollover COMMAND_ENABLE = no # Commands for debug and configuration
AUDIO_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support
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
RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
LAYOUTS = 60_tsangan_hhkb LAYOUTS = 60_tsangan_hhkb
+2 -1
View File
@@ -1,2 +1,3 @@
#pragma once #pragma once
#include "config_common.h"
#include "config_common.h"
+82 -9
View File
@@ -1,12 +1,85 @@
{ {
"keyboard_name": "dz65rgb", "keyboard_name": "dz65rgb",
"url": "", "url": "",
"maintainer": "dztch", "maintainer": "dztech",
"width": 15, "width": 16,
"height": 5, "height": 5,
"layouts": { "layouts": {
"LAYOUT_65_ansi": { "LAYOUT_65_ansi": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2},{"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5},{"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75},{"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] "layout": [
} {"x":0, "y":0},
} {"x":1, "y":0},
{"x":2, "y":0},
{"x":3, "y":0},
{"x":4, "y":0},
{"x":5, "y":0},
{"x":6, "y":0},
{"x":7, "y":0},
{"x":8, "y":0},
{"x":9, "y":0},
{"x":10, "y":0},
{"x":11, "y":0},
{"x":12, "y":0},
{"x":13, "y":0, "w":2},
{"x":15, "y":0},
{"x":0, "y":1, "w":1.5},
{"x":1.5, "y":1},
{"x":2.5, "y":1},
{"x":3.5, "y":1},
{"x":4.5, "y":1},
{"x":5.5, "y":1},
{"x":6.5, "y":1},
{"x":7.5, "y":1},
{"x":8.5, "y":1},
{"x":9.5, "y":1},
{"x":10.5, "y":1},
{"x":11.5, "y":1},
{"x":12.5, "y":1},
{"x":13.5, "y":1, "w":1.5},
{"x":15, "y":1},
{"x":0, "y":2, "w":1.75},
{"x":1.75, "y":2},
{"x":2.75, "y":2},
{"x":3.75, "y":2},
{"x":4.75, "y":2},
{"x":5.75, "y":2},
{"x":6.75, "y":2},
{"x":7.75, "y":2},
{"x":8.75, "y":2},
{"x":9.75, "y":2},
{"x":10.75, "y":2},
{"x":11.75, "y":2},
{"x":12.75, "y":2, "w":2.25},
{"x":15, "y":2},
{"x":0, "y":3, "w":2.25},
{"x":2.25, "y":3},
{"x":3.25, "y":3},
{"x":4.25, "y":3},
{"x":5.25, "y":3},
{"x":6.25, "y":3},
{"x":7.25, "y":3},
{"x":8.25, "y":3},
{"x":9.25, "y":3},
{"x":10.25, "y":3},
{"x":11.25, "y":3},
{"x":12.25, "y":3, "w":1.75},
{"x":14, "y":3},
{"x":15, "y":3},
{"x":0, "y":4, "w":1.25},
{"x":1.25, "y":4, "w":1.25},
{"x":2.5, "y":4, "w":1.25},
{"x":3.75, "y":4, "w":6.25},
{"x":10, "y":4},
{"x":11, "y":4},
{"x":12, "y":4},
{"x":13, "y":4},
{"x":14, "y":4},
{"x":15, "y":4}
]
}
}
} }
@@ -1,32 +1,18 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#define _LAYER0 0
#define _LAYER1 1
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LAYER0] = LAYOUT_65_ansi( /* Base */ [0] = LAYOUT_65_ansi(
KC_GESC, 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_HOME,\ KC_GESC, 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_HOME,
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_BSLASH, KC_PGUP,\ 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_PGUP,
CTL_T(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_PGDN,\ CTL_T(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_PGDN,
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_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_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
[_LAYER1] = LAYOUT_65_ansi( /* FN */ ),
KC_GESC, 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_DEL, KC_HOME,\ [1] = LAYOUT_65_ansi(
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_PGUP,\ KC_GESC, 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_DEL, KC_HOME,
CTL_T(KC_CAPS),RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, KC_PGDN,\ _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_PGUP,
KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, NK_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MUTE,\ CTL_T(KC_CAPS), RGB_SPI, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, KC_PGDN,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), KC_LSFT, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_VOLU, KC_MUTE,
_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT
)
}; };
void matrix_init_user(void)
{
//user initialization
}
void matrix_scan_user(void)
{
//user matrix
}
bool process_record_user(uint16_t keycode, keyrecord_t *record)
{
return true;
}
Loaded 100 of 248 files, more files were not shown because too many files have changed in this diff. Show more