Compare commits

...
76 Commits
Author SHA1 Message Date
QMK Bot 8b572de523 format code according to conventions [skip ci] 2020-06-20 03:37:04 +00:00
18e561b82c Fix incorrect delay when setting WS2812 (and similar) leds (#9302)
* Fix incorrect delay when setting WS2812 (and similar) leds

* Add documentation for WS2812_DELAY_MICROSECONDS

* Remove improper cast to uint8_t

Co-authored-by: Sergey Vlasov <[email protected]>

* Remove unneeded cast to uint8_t and correct math

Co-authored-by: Sergey Vlasov <[email protected]>

* microseconds -> µs

Co-authored-by: Ryan <[email protected]>

* Make documentation better match the spec sheet.

Co-authored-by: Ryan <[email protected]>

* Rename macro to match spec sheet

* Further correction to the delay maths for the SPI case.

Co-authored-by: Joel Challis <[email protected]>

* Move ws2812_common.h to the drivers directory

* Revert "Further correction to the delay maths for the SPI case."

This reverts commit e61b56a2cfc7dfec9992a7a3af92afa50e5b8ec0.

* Remove ws2812_setleds_pin(); consolidate ws2812.h

Co-authored-by: Sergey Vlasov <[email protected]>
Co-authored-by: Ryan <[email protected]>
Co-authored-by: Joel Challis <[email protected]>
2020-06-20 12:59:28 +10:00
Xelus22 c785148445 STM32 WS2812 Open Drain Configuration (#9414)
* update docs stm32 only and applies  to all 3 driver
* cformat
2020-06-20 08:35:32 +10:00
Rossman360 b43bdc1c69 rebound rev4, consolodated switch matrix from 5x12 to 7x8 (#9314) 2020-06-20 08:27:27 +10:00
Ryan 5a5ecd7dd9 Remove rules.mk for gboards/engine and gboards/g (#9444) 2020-06-19 15:51:50 +10:00
AlisGraveNil 60be8d9f24 [Keyboard] GameBuddy macropad (#9391)
* GameBuddy macropad

* Update config.h

* Update keyboards/clawsome/gamebuddy/config.h

* Update keyboards/clawsome/gamebuddy/readme.md

* Update keyboards/clawsome/gamebuddy/readme.md

* Update keyboards/clawsome/gamebuddy/readme.md

* Update readme.md

* Update keyboards/clawsome/gamebuddy/rules.mk

* Update keyboards/clawsome/gamebuddy/readme.md
2020-06-18 20:31:51 -07:00
Ryan 3f85e90126 Fix Eon87 info.json (#9460)
* Fix Eon87 info.json

* Adjust bottom row sizes
2020-06-18 20:16:57 -07:00
Niclas 3eefe31a54 Keymap: Add custom keymap for Planck (#9417)
* Keymap: Add custom keymap for Planck

* Fixup buffet's planck keymap
2020-06-18 18:32:27 -07:00
Rozakiin 7be65f2cd0 Add VIA support to Noxary 220 and Update Noxary 280 for readability (#9348)
* Update noxary 220 readme.md

* Update Noxary 280 readme.md 

add heading and spelling

* Update spelling of Noxary 280 keymap copyright

* Update Noxary 280 config.h

change product ID and product name, remove commented code

* Change  MCU name and disable Mousekey

* Update Noxary 220 config.h

Change vendor ID, Product ID, Product name and desc, remove commented code

* Update 220.h

change LAYOUT_ortho_6x4 to LAYOUT, change copyrght to Rozakiin

* Change LED indicator function

update copyright to Rozakiin

* Add via keymap

* Update  Noxary 220 default keymap for readability and numpad codes

* Update all Noxary 220 readme.md to conform to QMK templates

* Update Noxary 280 readme.md to conform to QMK template

* Disable console and command, and enable link time optimisation for VIA

* Update Noxary 280 keymaps for better readability

* Update keyboards/noxary/220/keymaps/default/keymap.c

* Update keyboards/noxary/220/220.h

* Update keyboards/noxary/220/keymaps/default/keymap.c

* Update keyboards/noxary/220/keymaps/default/keymap.c

* Update keyboards/noxary/220/keymaps/via/rules.mk

* Update keyboards/noxary/280/keymaps/default/keymap.c

* Update keyboards/noxary/280/keymaps/via/rules.mk

* Update keyboards/noxary/220/rules.mk

* Update keyboards/noxary/280/keymaps/via/keymap.c

* Update keyboards/noxary/220/keymaps/default/keymap.c

* Update keyboards/noxary/220/keymaps/default/keymap.c

* Update keyboards/noxary/220/keymaps/via/keymap.c

* Update keyboards/noxary/220/keymaps/via/keymap.c

* Update keyboards/noxary/220/keymaps/via/keymap.c

* Update keyboards/noxary/220/keymaps/via/keymap.c

* Update keyboards/noxary/220/keymaps/via/keymap.c

* Update keyboards/noxary/280/config.h

* Update keyboards/noxary/220/rules.mk

* Update keyboards/noxary/220/config.h

* Update keyboards/noxary/280/readme.md

Change layout links to ones with background removed
2020-06-18 13:14:09 -07:00
Takeshi ISHII 016b4be751 Update docs/ja/feature_backlight.md: apply #9043's change (#9454) 2020-06-19 04:53:16 +09:00
Ryan db80209e69 Parse version better in qmk doctor GCC version checks (#9324) 2020-06-18 19:37:47 +01:00
Brad Arnett 716924de3e [Keyboard] Added ymdk split64 based on walston's work (#9183)
* Added ymdk split64 based on walson's work

* Commented out features on walston's keymap as it was too big to compile

* Update keyboards/ymdk_sp64/config.h

* Update keyboards/ymdk_sp64/keymaps/daed/keymap.c

* Update keyboards/ymdk_sp64/matrix.c

* Update keyboards/ymdk_sp64/matrix.c

* Update keyboards/ymdk_sp64/matrix.c

* keymap changes

* Update keyboards/ymdk_sp64/matrix.c

* Update keyboards/ymdk_sp64/matrix.c

* Update keyboards/ymdk_sp64/rules.mk

* Update keyboards/ymdk_sp64/config.h

* Update keyboards/ymdk_sp64/config.h

* Update keyboards/ymdk_sp64/readme.md

* Update keyboards/ymdk_sp64/rules.mk

* Update keyboards/ymdk_sp64/config.h

* Update keyboards/ymdk_sp64/rules.mk

* Update keyboards/ymdk_sp64/ymdk_sp64.c

* Update keyboards/ymdk_sp64/keymaps/walston/rules.mk

* Update keyboards/ymdk_sp64/readme.md

* Made requested changes and moved keyboard under ymdk directory

* Update keyboards/ymdk/ymdk_sp64/keymaps/walston/keymap.c

* Update keyboards/ymdk/ymdk_sp64/config.h

* Update keyboards/ymdk/ymdk_sp64/config.h

* Update keyboards/ymdk/ymdk_sp64/keymaps/default/keymap.c

* Update keyboards/ymdk/ymdk_sp64/keymaps/default/keymap.c

* updated changes for pr 9183

* updated changes for pr 9183

* updated changes for pr 9183

* Removed redundant "QMK_KEYBOARD_H" include
2020-06-18 03:01:22 -07:00
James Young d88dca3ca7 YMD75: move MCU/Bootloader rules to revision level (#9452)
Work-around for an issue with QMK Configurator's API.
2020-06-18 00:15:22 -07:00
Joshua Diamond 9c1097e768 Fix for One Shot Layer not being cleaned up after some actions (#8832) 2020-06-18 08:07:48 +01:00
Jason LaquaandKonstantin Đorđević f7eb030e91 Standardize how unicode is processed (fixes #8768) (#8770)
Co-authored-by: Konstantin Đorđević <[email protected]>
2020-06-18 08:07:34 +01:00
Yasha Mostofi aae1814319 [Keyboard] Add Via support for Let's Split v2 (#9448)
* initial let's split with rgb

* Revert default

* Add Via keymap

* Remove my keymap

* Remove trailing slashes
2020-06-18 00:06:11 -07:00
78fdd40622 [Keymap] Dcompact for iris (#9406)
Co-authored-by: Dan Herrera <[email protected]>
Co-authored-by: Ryan <[email protected]>
2020-06-17 22:20:45 -07:00
Pierre Chevalier 43b6f031b1 [Keymap] Add pierrec83's Kyria keymap (#9401) 2020-06-17 22:18:16 -07:00
3e27ceee42 [Keyboard] Nebula12 keyboard (#9397)
Co-authored-by: Ryan <[email protected]>
Co-authored-by: Drashna Jaelre <[email protected]>
2020-06-17 22:16:26 -07:00
unicorn855andDrashna Jaelre 67f374029d [Keyboard] added VIA support for HotDox (#9377)
* added VIA support for HotDox

* Update keyboards/hotdox/keymaps/via/keymap.c

Thank you drashna :)

Co-authored-by: Drashna Jaelre <[email protected]>

Co-authored-by: Drashna Jaelre <[email protected]>
2020-06-17 21:52:33 -07:00
GregorioandRyan 30fd69886d [Keyboard] Add Mixi (#9364)
* [Keyboard] Add Mixi

Co-authored-by: Ryan <[email protected]>

Co-authored-by: Ryan <[email protected]>
2020-06-17 21:39:16 -07:00
Maarten DekkersandMaarten Dekkers ed528403fd [Keyboard] Add Eon87 (#9337)
Co-authored-by: Maarten Dekkers <[email protected]>
2020-06-17 21:30:34 -07:00
Ryan faae375ccd Fix error_log complaint about Preonic layouts (#9443) 2020-06-17 21:23:09 -07:00
James Young b0fd064491 Fix Kudox Columner Configurator key ordering (#9427) 2020-06-17 20:47:52 -07:00
James Young abf466e57d Add Configurator layout support for westfoxtrot/prophet (#9428) 2020-06-17 20:47:25 -07:00
157319fbd0 [Keyboard] Jian keyboard (#8914)
Co-authored-by: Joel Challis <[email protected]>
Co-authored-by: Drashna Jaelre <[email protected]>
Co-authored-by: Ryan <[email protected]>
Co-authored-by: Nick Brassel <[email protected]>
2020-06-17 19:17:30 -07:00
Dan 39ff121d73 Implement game mode layer for dcompact on planck (#9402) 2020-06-17 18:53:36 -07:00
Hybridandgrousselle 8018f4db2d [Keymap] new keymap for XD75 (#8675)
Co-authored-by: grousselle <[email protected]>
2020-06-17 18:32:02 -07:00
Ryan 1a159a38ed Clean up Tap Dance docs (#9372)
* Clean up Tap Dance docs

* Add heading IDs for translation
2020-06-17 17:10:35 -07:00
Erovia a0bf235644 CLI: Add ATmega328 and ATtiny85 to supported CPUs (#9371)
* CLI: Add ATmega328 to supported CPUs

Support for ATmega328 was added in #9043.

* Update lib/python/qmk/constants.py
2020-06-17 15:45:53 -07:00
Ryan f420741f9b Fix error_log complaint about clueboard/66_hotswap/gen1 layout macro (#9400)
* Fix error_log complaint about clueboard/66_hotswap/gen1 layout macro

* Remove gen1 info.json in favour of higher level file

* Split into revision-specific info.json
2020-06-17 00:30:54 -07:00
0b7b74f56a Nebula65 (#9368)
* Initial nebula65 commit

* Use PWM driver

* Polishing

* Remove random rgblight settings

* Spelling fix

* Update keyboards/nebula65/keymaps/default/readme.md

Co-authored-by: Ryan <[email protected]>

* Update keyboards/nebula65/keymaps/via/readme.md

Co-authored-by: Ryan <[email protected]>

* Update keyboards/nebula65/readme.md

Co-authored-by: Ryan <[email protected]>

* Update keyboards/nebula65/readme.md

Co-authored-by: Ryan <[email protected]>

* Clean includes in .h file

* Update keyboards/nebula65/readme.md

Co-authored-by: Drashna Jaelre <[email protected]>

* Further cleanup

Co-authored-by: Ryan <[email protected]>
Co-authored-by: Drashna Jaelre <[email protected]>
2020-06-16 14:02:01 -07:00
80b2b710da added 4x12 (#9411)
Co-authored-by: Ryan <[email protected]>
Co-authored-by: Drashna Jaelre <[email protected]>
2020-06-16 20:08:30 +01:00
MURAMATSU Atshshi 3814dacf27 [Keymap] Add froggy keymap with 106/109 (JP) settings for helix keyboard (#8967)
* initial commit for froggy 106 key mode

* add mode indicator on OLED

* use #pragma once instead of include guard

* remove unusable codes

* remove audio codes, because helix rev.2 has no audio feature

* use set_single_persistent_default_layer

* remove eeprom update check
2020-06-15 21:46:12 -07:00
csc027 7576f6162e [Keymap] csc027/keymap-updates (#9420) 2020-06-15 03:48:21 -07:00
Thomas Lim e8a02afc8c Add VIA support to keebio/nyquist (#9399) 2020-06-15 20:45:56 +10:00
Drashna Jaelre 357a888d80 [Keymap] Drashna's Keymap Update - Display Edition (#9282)
OLED Display fixes
Add support for RGBLIGHT Layers
Add gaming layer to corn and kyria
RGBLight Startup Animation fixes and improvements (uses matrix_scan now!)
Pimoroni Trackball support added (IT'S RGB!!!)
Fix issues due to code changes
2020-06-15 03:41:28 -07:00
William LindvallandRyan 7f5656996c [Keymap] Add "shwilliam" Preonic keymap (#9409)
Co-authored-by: Ryan <[email protected]>
2020-06-15 03:26:58 -07:00
James Young b008a9afe6 HID Liberation Device Refactor and Configurator layout support (#9394) 2020-06-15 03:11:19 -07:00
James Young d8e3294aea [Keyboard] Fix Configurator layout data for handwired/1800fl (#9393) 2020-06-15 03:10:15 -07:00
James Young a8d073368f [Keyboard] Fix Configurator layout data for acheron/elongate (#9392) 2020-06-15 03:09:48 -07:00
Ryan 44d93285d1 Change ?= to = in keyboard rules.mk (#9390) 2020-06-15 03:06:10 -07:00
Reed 8e0af2f5ba [Docs] Fix link to mod_tap.md in the one_shot_keys.md file (#9380) 2020-06-15 02:55:00 -07:00
Josh Johnson da76734fe0 [Keyboard] Hub16 keymap bugfix (#9345) 2020-06-15 02:17:30 -07:00
c029c5b187 [Keyboard] Add Eon75 (#9333)
Co-authored-by: Drashna Jaelre <[email protected]>
Co-authored-by: Maarten Dekkers <[email protected]>
2020-06-15 02:09:24 -07:00
jems-lee 294cfd8d33 Delete trailing period in documentation (#9416) 2020-06-15 02:49:36 +10:00
George Mao 622e94c6cd [Keyboard] Add S7 Elephant Rev2 Support (#9398)
* Add S7 Elephant Rev2 Support

* Apply suggestions from code review

I tested the changes on my board as well, thanks for the suggestions!

* Added a default folder in the makefile so that this would no longer be a breaking change
2020-06-13 23:45:47 -07:00
cole smith ba7f52aaeb Boardsource 3x4 info json fix (#9266)
* added bordsource 3x4 macro pad

* added bordsource 3x4 macro pad

* Update keyboards/boardsource/3x4/3x4.h

* Update keyboards/boardsource/3x4/3x4.c

* Update keyboards/boardsource/3x4/config.h

* Update keyboards/boardsource/3x4/config.h

* Update keyboards/boardsource/3x4/config.h

* Update keyboards/boardsource/3x4/config.h

* added link to readme

* Update keyboards/boardsource/3x4/keymaps/default/keymap.c

* Apply suggestions from code review

* changed the layout to refelect the keyboard

* Update keyboards/boardsource/3x4/info.json

Oh your right my bad. In the future is there an easier way for me to test the info.json and the confiscator before doing my pr?

* Apply suggestions from code review

* got 3x4 building again

* Apply suggestions from code review

* applied requested change on readme

* Update keyboards/boardsource/3x4/readme.md

* Apply suggestions from code review
2020-06-13 12:08:54 -07:00
Sid Carter 307013a2f8 [Keymap] Personal keymaps for Prime_E, Corne, Space65 and updates (#9234)
* initial draft maps

* updates to the keymap to enable LED

* does one still have to do these shenanigans?

* update keymap with lights

* update OLED stuff

* update corne config

* update singav3 pcb config

* update ilpse config and map

* update prime keymap as well

* update the keymap for prime_e

* update tapping term and keymap

* switch numbers to the raise layer

* move nav to lower

* add mousekeys as well

* some fixes

* update keymap

* add my layout for space65

* update map

* update keymap

* add grave key

* update  config for my keymap

* update keymap

* switch to newer mechanisms

* grave on capslock

* cleanup

* udpate config

* update keymap

* Update keyboards/gray_studio/space65/keymaps/madhatter/rules.mk

* Update keyboards/gray_studio/space65/keymaps/madhatter/keymap.c

* Update keyboards/crkbd/keymaps/madhatter/rules.mk

* Update keyboards/crkbd/keymaps/madhatter/rules.mk

* Update keyboards/gray_studio/space65/keymaps/madhatter/keymap.c

* Update keyboards/crkbd/keymaps/madhatter/keymap.c

* Update keyboards/primekb/prime_e/keymaps/madhatter/config.h

* Update keyboards/gray_studio/space65/keymaps/madhatter/config.h

* Update keyboards/crkbd/keymaps/madhatter/keymap.c

* Update keyboards/wilba_tech/wt75_b/keymaps/madhatter/config.h

* Update keyboards/crkbd/keymaps/madhatter/keymap.c

* Update keyboards/crkbd/keymaps/madhatter/keymap.c

* Update keyboards/gray_studio/space65/keymaps/madhatter/config.h

* Update keyboards/primekb/prime_e/keymaps/madhatter/config.h

* Update keyboards/wilba_tech/wt75_b/keymaps/madhatter/config.h

* Update keyboards/crkbd/keymaps/madhatter/keymap.c

* Update keyboards/crkbd/keymaps/madhatter/keymap.c

* Update keyboards/primekb/prime_e/keymaps/madhatter/keymap.c

* Update keyboards/crkbd/keymaps/madhatter/readme.md

* remove file I don't use
2020-06-13 12:03:11 -07:00
QMK Bot f68abbf6c8 format code according to conventions [skip ci] 2020-06-13 18:51:08 +00:00
qunguyentk 897c4cd175 [Keyboard] Add Batpad 2x4 PCB (#9295)
* Add files via upload

* Update config.h

* Update config.h

* Update keyboards/Yncognito/batpad/batpad.c

* Update batpad.c

* Update keyboards/Yncognito/batpad/keymaps/default/keymap.c

* Update keyboards/Yncognito/batpad/batpad.h

* Update keyboards/Yncognito/batpad/keymaps/default/keymap.c

* Update keyboards/Yncognito/batpad/keymaps/default/keymap.c

* Update keyboards/Yncognito/batpad/keymaps/via/keymap.c

* Update keyboards/Yncognito/batpad/keymaps/via/keymap.c

* Update keyboards/Yncognito/batpad/keymaps/via/keymap.c

* Update keyboards/Yncognito/batpad/batpad.c

* Rename keyboards/Yncognito/batpad/rules.mk to keyboards/yncognito/batpad/rules.mk

* Rename keyboards/Yncognito/batpad/readme.md to keyboards/yncognito/batpad/readme.md

* Rename keyboards/Yncognito/batpad/info.json to keyboards/yncognito/batpad/info.json

* Rename keyboards/Yncognito/batpad/config.h to keyboards/yncognito/batpad/config.h

* Rename keyboards/Yncognito/batpad/batpad.h to keyboards/yncognito/batpad/batpad.h

* Rename keyboards/Yncognito/batpad/batpad.c to keyboards/yncognito/batpad/batpad.c

* Rename keyboards/Yncognito/batpad/keymaps/default/readme.md to keyboards/yncognito/batpad/keymaps/default/readme.md

* Rename keyboards/Yncognito/batpad/keymaps/default/keymap.c to keyboards/yncognito/batpad/keymaps/default/keymap.c

* Rename keyboards/Yncognito/batpad/keymaps/default/config.h to keyboards/yncognito/batpad/keymaps/default/config.h

* Rename keyboards/Yncognito/batpad/keymaps/via/rules.mk to keyboards/yncognito/batpad/keymaps/via/rules.mk

* Rename keyboards/Yncognito/batpad/keymaps/via/keymap.c to keyboards/yncognito/batpad/keymaps/via/keymap.c

* Rename keyboards/Yncognito/batpad/keymaps/via/config.h to keyboards/yncognito/batpad/keymaps/via/config.h

* Update keyboards/yncognito/batpad/readme.md

* Update keyboards/yncognito/batpad/readme.md

* Update keyboards/yncognito/batpad/rules.mk

* Delete config.h

* Delete config.h

* Update readme.md

* Update keyboards/yncognito/batpad/batpad.c

* Update keyboards/yncognito/batpad/readme.md

* Update keyboards/yncognito/batpad/keymaps/via/keymap.c

* Update keyboards/yncognito/batpad/info.json

* Update keyboards/yncognito/batpad/batpad.h
2020-06-13 11:48:48 -07:00
elmo-space 1f2807c2de Add ANSI and ISO layout for KBD67mkII soldered PCB (#9340)
* add ansi and iso layouts

* fix iso map mistake

* fix mistake again...

* Update keyboards/kbdfans/kbd67/mkii_soldered/keymaps/iso/keymap.c

* rename layout macros to the blocker variants and add ansi_split_bs

* Apply suggestions from code review
2020-06-13 11:45:03 -07:00
mechlovin b160913309 [Keyboard] Add new PCB Infinity87 (#9287)
* Add new PCB Infinity87

* Update keymap.c

* Update readme.md

* Update rules.mk

* update

* Update info.json
2020-06-13 11:43:04 -07:00
Maarten Dekkers 867fded980 [Keyboard] Add OmronTKL (#9346)
* Add OmronTKL

* Fix column pins
2020-06-13 11:41:53 -07:00
Callum Oakley d1730ec760 [keymap] upstreaming a minor keymap update (#9366) 2020-06-13 21:11:28 +10:00
Gautham Yerroju 4057d44989 [Keymap] Add Kyria keymap (#9224)
* Add Kyria keymap

* clean split hand detection code

* rename "joystick" to "thumbstick"

* thumbstick overhaul

* removed angle correction, seems buggy

* save some memory

* Remove deprecated config option

* Use the correct types for getting host led states

* Fix include path

* Made .h files for encoder and oled code

* Increase speed cap on thumbstick
2020-06-13 01:24:13 -07:00
Gautham Yerroju 2bfcb6bfc5 [Keymap] Add custom corne keymap (#9283)
* Add custom corne keymap

* Clean up rules.mk

* Clean up base layer on keymap.c

* Clean up lower layer on keymap.c

* Clean up raise layer on keymap.c

* Clean up adjust layer in keymap.c
2020-06-13 01:18:33 -07:00
mcarni 1f42071238 dz60 iso split - cleaned up the readme and replaced normal key with numpad key on numpad layer (#9339)
* README cleanup

* replaced "normal" numbers with "keypad" numbers:
KC_P4 replaced by KC_KP_P4

* replaced "normal" keys on Numpad Layer with the "KeyPad" keys
KC_1 replaced by KC_P1 etc.
2020-06-13 00:29:22 -07:00
MechMerlin 400423d10b VIA Support: Noxary 260 (#9349)
* add VIA support to noxary 260

* change the layout macro to be 60_ansi as thats going to be the base VIA layout

* update readme
2020-06-13 00:16:07 -07:00
Andrew Kannan 54ef02dead Fix project alice indicators (#9342) 2020-06-13 00:06:38 -07:00
umi 044b4aaf01 [Docs] Japanese translation of docs/feature_split_keyboard.md (#9031)
* add feature_split_keyboard.md translation

* add header for git

* update based on comment

* update based on comment
2020-06-12 23:50:19 -07:00
Catriel MüllerandRyan ccb4b81b3f Fix my personal keymap // Custom keymap for Kbdfans/kbd67/rev2 with improvements on Accessibility (#9207)
Co-authored-by: Ryan <[email protected]>
2020-06-11 22:39:56 +10:00
Adrian e269977387 Murcielago: improve default keymap (#9363)
* Squashed new default keymap for murcielago
2020-06-11 04:45:53 -07:00
Sergey Vlasov 0cb4da2c74 Really fix Ubuntu/Debian setup when $PATH contains spaces (#9370)
PR #9307 fixed the immediately visible problem (the command that was
added to $HOME/.bashrc was incorrect because of missing quotes around
paths with spaces).  However, the modified command is still wrong - it
captures the value of $PATH at the setup time, and the resulting command
written out to $HOME/.bashrc will overwrite $PATH with that captured
value, ignoring any changes in the environment.  This may be especially
important for WSL, where the initial value of $PATH in Linux includes
everything which has been added to %PATH% on the Windows side; after
adding that command to $HOME/.bashrc the WSL environment will no longer
pick up any changes made by newly installed Windows software.

Instead of that, use single quotes around the command, so that the
environment variables are not expanded at the setup time, and the
command that is added to $HOME/.bashrc becomes exactly this:

    PATH="$HOME/.local/bin:$PATH"

This command will use the $HOME and $PATH environment variable values at
the time the command is executed, not at the time the QMK setup is
performed, so any further updates to $PATH are taken into account.
Double quotes also ensure that the command is safe even if the values of
those environment variables contain spaces.
2020-06-11 12:26:10 +01:00
James Young 9b0c734733 Fix Configurator layout data for clueboard/2x1800/2019 (#9373) 2020-06-11 12:07:15 +01:00
George Mao fffee6ade1 Fixing Iron165 VIA Keymap (#9298)
* Fixing via issues

* Fixing whitespace issues on the keymap

* Fixed the default via layer 1 keymap, was a little weird before

* Removing redundant declarations in via/rules.mk
2020-06-11 00:12:53 +01:00
neon4272andRyan 97ddc7ea18 Fix Ubuntu/Debian setup when $PATH contains spaces (#9307)
* Change `echo` to `export`

* Add `export` as a note under the `echo` command

* Remove note from last commit

Co-authored-by: Ryan <[email protected]>

* Update docs/newbs_getting_started.md

Co-authored-by: Ryan <[email protected]>

* Update docs/newbs_getting_started.md

Add 1 line of whitespace under note

Co-authored-by: Ryan <[email protected]>

Co-authored-by: Ryan <[email protected]>
2020-06-10 23:46:13 +01:00
3afd2d81b8 Add documentation for selecting an Arm MCU (#9046)
* Initial doco write-up.

* Update docs/platformdev_selecting_arm_mcu.md

Co-authored-by: James Young <[email protected]>

* Apply suggestions from code review

Co-authored-by: Ryan <[email protected]>

Co-authored-by: James Young <[email protected]>
Co-authored-by: Ryan <[email protected]>
2020-06-10 23:32:58 +01:00
precondition 2543bad250 [Docs] Fixed the hyperlink to /users/_example/. (#9326) 2020-06-10 15:27:25 -07:00
a056d94561 [keyboard] Project Keyboard Signature 87 (#9062)
* preliminary check in, basically a copy from 159's github with a few additions to get it to compile

* update readme

* fixup the LAYOUT macro labels to be more reasonable

* add tkl_ansi LAYOUT macro for community layout support

* clean up rules.mk, add community layout suport, and add in bootloader

* add a tsangan layout macro

* spruce up readme

* add VIA keymap

* add qmk configurator support

* Update keyboards/projectkb/signature87/rules.mk

Co-authored-by: Joel Challis <[email protected]>

* Update keyboards/projectkb/signature87/rules.mk

Co-authored-by: Joel Challis <[email protected]>

* Update keyboards/projectkb/signature87/rules.mk

Co-authored-by: Joel Challis <[email protected]>

* remove unneeded file

* Update keyboards/projectkb/signature87/config.h

Co-authored-by: Joel Challis <[email protected]>

* Update keyboards/projectkb/signature87/rules.mk

Co-authored-by: Ryan <[email protected]>

* Update keyboards/projectkb/signature87/config.h

Co-authored-by: Joel Challis <[email protected]>
Co-authored-by: Ryan <[email protected]>
2020-06-10 23:26:21 +01:00
Drashna Jaelre 573d1fbb92 Include pointing_device_send in docs (#9185) 2020-06-10 23:18:53 +01:00
Tsan-Kuang LeeandTsan-Kuang Lee 437446ba8f Fix one shot swaphands compiler error when NO_ACTION_ONESHOT is defined (#9296)
* init

* add RETRO_TAP; tap anyway after TAP_TERM, if no interruption

* RETRO_TAP works for other types of taps

* revert to upstream/master

* explain this fork in readme

* use one readme.md file instaed

* fix the error if NO_ACTION_ONESHOT is defined

* restore readme.md to upstream master

Co-authored-by: Tsan-Kuang Lee <[email protected]>
2020-06-10 22:40:17 +01:00
8640b43214 [Keymap] WPM-responsive OLED animation in personal keymap (#9264)
Using the wpm feature, I create a responsive OLED animation that changes based on how fast the user types. As written there are three phases (It's bongo cat!) but can easily be reconfigured and replaced with other images.

Multiple byte arrays consume considerable space so choose your usage wisely. When customized, the smaller the byte array used, the better, due to space limitations on most microcontrollers.

I made this with no prior knowledge of C, so I'm looking forward to any and all suggested improvements.

Credit is owed to obosob for laying the foundation for this little script as well to /u/pixelbenny for graciously providing the bongocat artwork I adapted for the animation.

The config.h includes a tweak to the Kyria's LED mapping, so that the order now reflects their physical positions, making animations smoother.

Co-authored-by: Ryan <[email protected]>
Co-authored-by: Drashna Jaelre <[email protected]>
Co-authored-by: Simon Schuster <[email protected]>
Co-authored-by: James Incandenza <[email protected]>
2020-06-10 14:39:07 -07:00
yfukuandRyan 09fc6cab34 Add bat43 rev2 (#9319)
* add rev2

* Update keyboards/bat43/rev1/rules.mk

Co-authored-by: Ryan <[email protected]>

* Update keyboards/bat43/rev2/rules.mk

Co-authored-by: Ryan <[email protected]>

Co-authored-by: Ryan <[email protected]>
2020-06-10 22:38:11 +01:00
7e8dc2e570 [Keymap] Add dual layer keymap for xd002 macropad (#9222)
Co-authored-by: Joel Challis <[email protected]>
Co-authored-by: Drashna Jaelre <[email protected]>
2020-06-10 14:33:26 -07:00
263536586d [Keyboard] Wazowski 23-19 PCB Support (#9198)
Co-authored-by: Joel Challis <[email protected]>
Co-authored-by: Ryan <[email protected]>
Co-authored-by: Chris Figueroa <[email protected]>
2020-06-10 14:32:03 -07:00
435 changed files with 27162 additions and 2578 deletions

No files matched your search

+1
View File
@@ -145,6 +145,7 @@
* Hardware Platform Development * Hardware Platform Development
* Arm/ChibiOS * Arm/ChibiOS
* [Selecting an MCU](platformdev_selecting_arm_mcu.md)
* [Early initialization](platformdev_chibios_earlyinit.md) * [Early initialization](platformdev_chibios_earlyinit.md)
* QMK Reference * QMK Reference
+1 -1
View File
@@ -5,7 +5,7 @@ If you've ever used Vim, you know what a Leader key is. If not, you're about to
That's what `KC_LEAD` does. Here's an example: That's what `KC_LEAD` does. Here's an example:
1. Pick a key on your keyboard you want to use as the Leader key. Assign it the keycode `KC_LEAD`. This key would be dedicated just for this -- it's a single action key, can't be used for anything else. 1. Pick a key on your keyboard you want to use as the Leader key. Assign it the keycode `KC_LEAD`. This key would be dedicated just for this -- it's a single action key, can't be used for anything else.
2. Include the line `#define LEADER_TIMEOUT 300` in your `config.h`. This sets the timeout for the `KC_LEAD` key. Specifically, when you press the `KC_LEAD` key, you only have a certain amount of time to complete the Leader Key sequence. The `300` here sets that to 300ms, and you can increase this value to give you more time to hit the sequence. But any keys pressed during this timeout are intercepted and not sent, so you may want to keep this value low. . 2. Include the line `#define LEADER_TIMEOUT 300` in your `config.h`. This sets the timeout for the `KC_LEAD` key. Specifically, when you press the `KC_LEAD` key, you only have a certain amount of time to complete the Leader Key sequence. The `300` here sets that to 300ms, and you can increase this value to give you more time to hit the sequence. But any keys pressed during this timeout are intercepted and not sent, so you may want to keep this value low.
* By default, this timeout is how long after pressing `KC_LEAD` to complete your entire sequence. This may be very low for some people. So you may want to increase this timeout. Optionally, you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped. This allows you to maintain a low value here, but still be able to use the longer sequences. To enable this option, add `#define LEADER_PER_KEY_TIMING` to your `config.h`. * By default, this timeout is how long after pressing `KC_LEAD` to complete your entire sequence. This may be very low for some people. So you may want to increase this timeout. Optionally, you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped. This allows you to maintain a low value here, but still be able to use the longer sequences. To enable this option, add `#define LEADER_PER_KEY_TIMING` to your `config.h`.
3. Within your `matrix_scan_user` function, add something like this: 3. Within your `matrix_scan_user` function, add something like this:
+6 -1
View File
@@ -21,7 +21,11 @@ Keep in mind that a report_mouse_t (here "mouseReport") has the following proper
* `mouseReport.h` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing horizontal scrolling (+ right, - left). * `mouseReport.h` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing horizontal scrolling (+ right, - left).
* `mouseReport.buttons` - this is a uint8_t in which the last 5 bits are used. These bits represent the mouse button state - bit 3 is mouse button 5, and bit 7 is mouse button 1. * `mouseReport.buttons` - this is a uint8_t in which the last 5 bits are used. These bits represent the mouse button state - bit 3 is mouse button 5, and bit 7 is mouse button 1.
When the mouse report is sent, the x, y, v, and h values are set to 0 (this is done in "pointing_device_send()", which can be overridden to avoid this behavior). This way, button states persist, but movement will only occur once. For further customization, both `pointing_device_init` and `pointing_device_task` can be overridden. Once you have made the necessary changes to the mouse report, you need to send it:
* `pointing_device_send()` - Sends the mouse report to the host and zeroes out the report.
When the mouse report is sent, the x, y, v, and h values are set to 0 (this is done in `pointing_device_send()`, which can be overridden to avoid this behavior). This way, button states persist, but movement will only occur once. For further customization, both `pointing_device_init` and `pointing_device_task` can be overridden.
In the following example, a custom key is used to click the mouse and scroll 127 units vertically and horizontally, then undo all of that when released - because that's a totally useful function. Listen, this is an example: In the following example, a custom key is used to click the mouse and scroll 127 units vertically and horizontally, then undo all of that when released - because that's a totally useful function. Listen, this is an example:
@@ -38,6 +42,7 @@ case MS_SPECIAL:
currentReport.buttons &= ~MOUSE_BTN1; currentReport.buttons &= ~MOUSE_BTN1;
} }
pointing_device_set_report(currentReport); pointing_device_set_report(currentReport);
pointing_device_send();
break; break;
``` ```
+261 -273
View File
@@ -1,31 +1,24 @@
# Tap Dance: A Single Key Can Do 3, 5, or 100 Different Things # Tap Dance: A Single Key Can Do 3, 5, or 100 Different Things
## Introduction ## Introduction :id=introduction
Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. It's one of the nicest community-contributed features in the firmware, conceived and created by [algernon](https://github.com/algernon) in [#451](https://github.com/qmk/qmk_firmware/pull/451). Here's how algernon describes the feature: Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. It's one of the nicest community-contributed features in the firmware, conceived and created by [algernon](https://github.com/algernon) in [#451](https://github.com/qmk/qmk_firmware/pull/451). Here's how algernon describes the feature:
With this feature one can specify keys that behave differently, based on the amount of times they have been tapped, and when interrupted, they get handled before the interrupter. With this feature one can specify keys that behave differently, based on the amount of times they have been tapped, and when interrupted, they get handled before the interrupter.
## Explanatory Comparison with `ACTION_FUNCTION_TAP` ## How to Use Tap Dance :id=how-to-use
`ACTION_FUNCTION_TAP` can offer similar functionality to Tap Dance, but it's worth noting some important differences. To do this, let's explore a certain setup! We want one key to send `Space` on single-tap, but `Enter` on double-tap.
With `ACTION_FUNCTION_TAP`, it is quite a rain-dance to set this up, and has the problem that when the sequence is interrupted, the interrupting key will be sent first. Thus, `SPC a` will result in `a SPC` being sent, if `SPC` and `a` are both typed within `TAPPING_TERM`. With the Tap Dance feature, that'll come out correctly as `SPC a` (even if both `SPC` and `a` are typed within the `TAPPING_TERM`. First, you will need `TAP_DANCE_ENABLE = yes` in your `rules.mk`, because the feature is disabled by default. This adds a little less than 1k to the firmware size.
To achieve this correct handling of interrupts, the implementation of Tap Dance hooks into two parts of the system: `process_record_quantum()`, and the matrix scan. These two parts are explained below, but for now the point to note is that we need the latter to be able to time out a tap sequence even when a key is not being pressed. That way, `SPC` alone will time out and register after `TAPPING_TERM` time.
## How to Use Tap Dance
But enough of the generalities; lets look at how to actually use Tap Dance!
First, you will need `TAP_DANCE_ENABLE=yes` in your `rules.mk`, because the feature is disabled by default. This adds a little less than 1k to the firmware size.
Optionally, you might want to set a custom `TAPPING_TERM` time by adding something like this in you `config.h`: Optionally, you might want to set a custom `TAPPING_TERM` time by adding something like this in you `config.h`:
``` ```c
#define TAPPING_TERM 175 #define TAPPING_TERM 175
``` ```
The `TAPPING_TERM` time is the maximum time allowed between taps of your Tap Dance key, and is measured in milliseconds. For example, if you used the above `#define` statement and set up a Tap Dance key that sends `Space` on single-tap and `Enter` on double-tap, then this key will send `ENT` only if you tap this key twice in less than 175ms. If you tap the key, wait more than 175ms, and tap the key again you'll end up sending `SPC SPC` instead. The `TAPPING_TERM` time is the maximum time allowed between taps of your Tap Dance key, and is measured in milliseconds. For example, if you used the above `#define` statement and set up a Tap Dance key that sends `Space` on single-tap and `Enter` on double-tap, then this key will send `ENT` only if you tap this key twice in less than 175ms. If you tap the key, wait more than 175ms, and tap the key again you'll end up sending `SPC SPC` instead.
Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()` - takes a number, which will later be used as an index into the `tap_dance_actions` array. Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that takes a number which will later be used as an index into the `tap_dance_actions` array.
After this, you'll want to use the `tap_dance_actions` array to specify what actions shall be taken when a tap-dance key is in action. Currently, there are five possible options: After this, you'll want to use the `tap_dance_actions` array to specify what actions shall be taken when a tap-dance key is in action. Currently, there are five possible options:
@@ -43,11 +36,12 @@ The first option is enough for a lot of cases, that just want dual roles. For ex
Similar to the first option, the second option is good for simple layer-switching cases. Similar to the first option, the second option is good for simple layer-switching cases.
For more complicated cases, use the third or fourth options (examples of each are listed below). For more complicated cases, use the third or fourth options (examples of each are listed below).
Finally, the fifth option is particularly useful if your non-Tap-Dance keys start behaving weirdly after adding the code for your Tap Dance keys. The likely problem is that you changed the `TAPPING_TERM` time to make your Tap Dance keys easier for you to use, and that this has changed the way your other keys handle interrupts. Finally, the fifth option is particularly useful if your non-Tap-Dance keys start behaving weirdly after adding the code for your Tap Dance keys. The likely problem is that you changed the `TAPPING_TERM` time to make your Tap Dance keys easier for you to use, and that this has changed the way your other keys handle interrupts.
## Implementation Details ## Implementation Details :id=implementation
Well, that's the bulk of it! You should now be able to work through the examples below, and to develop your own Tap Dance functionality. But if you want a deeper understanding of what's going on behind the scenes, then read on for the explanation of how it all works! Well, that's the bulk of it! You should now be able to work through the examples below, and to develop your own Tap Dance functionality. But if you want a deeper understanding of what's going on behind the scenes, then read on for the explanation of how it all works!
The main entry point is `process_tap_dance()`, called from `process_record_quantum()`, which is run for every keypress, and our handler gets to run early. This function checks whether the key pressed is a tap-dance key. If it is not, and a tap-dance was in action, we handle that first, and enqueue the newly pressed key. If it is a tap-dance key, then we check if it is the same as the already active one (if there's one active, that is). If it is not, we fire off the old one first, then register the new one. If it was the same, we increment the counter and reset the timer. The main entry point is `process_tap_dance()`, called from `process_record_quantum()`, which is run for every keypress, and our handler gets to run early. This function checks whether the key pressed is a tap-dance key. If it is not, and a tap-dance was in action, we handle that first, and enqueue the newly pressed key. If it is a tap-dance key, then we check if it is the same as the already active one (if there's one active, that is). If it is not, we fire off the old one first, then register the new one. If it was the same, we increment the counter and reset the timer.
@@ -58,9 +52,9 @@ Our next stop is `matrix_scan_tap_dance()`. This handles the timeout of tap-danc
For the sake of flexibility, tap-dance actions can be either a pair of keycodes, or a user function. The latter allows one to handle higher tap counts, or do extra things, like blink the LEDs, fiddle with the backlighting, and so on. This is accomplished by using an union, and some clever macros. For the sake of flexibility, tap-dance actions can be either a pair of keycodes, or a user function. The latter allows one to handle higher tap counts, or do extra things, like blink the LEDs, fiddle with the backlighting, and so on. This is accomplished by using an union, and some clever macros.
# Examples ## Examples :id=examples
## Simple Example ### Simple Example :id=simple-example
Here's a simple example for a single definition: Here's a simple example for a single definition:
@@ -69,23 +63,26 @@ Here's a simple example for a single definition:
3. In your `keymap.c` file, define the variables and definitions, then add to your keymap: 3. In your `keymap.c` file, define the variables and definitions, then add to your keymap:
```c ```c
//Tap Dance Declarations // Tap Dance declarations
enum { enum {
TD_ESC_CAPS = 0 TD_ESC_CAPS,
}; };
//Tap Dance Definitions // Tap Dance definitions
qk_tap_dance_action_t tap_dance_actions[] = { qk_tap_dance_action_t tap_dance_actions[] = {
//Tap once for Esc, twice for Caps Lock // Tap once for Escape, twice for Caps Lock
[TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS) [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS),
// Other declarations would go here, separated by commas, if you have them
}; };
//In Layer declaration, add tap dance item in place of a key code // Add tap dance item in place of a key code
TD(TD_ESC_CAPS) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ...
TD(TD_ESC_CAPS)
// ...
};
``` ```
## Complex Examples ### Complex Examples :id=complex-examples
This section details several complex tap dance examples. This section details several complex tap dance examples.
All the enums used in the examples are declared like this: All the enums used in the examples are declared like this:
@@ -93,104 +90,105 @@ All the enums used in the examples are declared like this:
```c ```c
// Enums defined for all examples: // Enums defined for all examples:
enum { enum {
CT_SE = 0, CT_SE,
CT_CLN, CT_CLN,
CT_EGG, CT_EGG,
CT_FLSH, CT_FLSH,
X_TAP_DANCE X_TAP_DANCE
}; };
``` ```
### Example 1: Send `:` on Single Tap, `;` on Double Tap
#### Example 1: Send `:` on Single Tap, `;` on Double Tap :id=example-1
```c ```c
void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) { void dance_cln_finished(qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) { if (state->count == 1) {
register_code (KC_RSFT); register_code16(KC_COLN);
register_code (KC_SCLN); } else {
} else { register_code(KC_SCLN);
register_code (KC_SCLN); }
}
} }
void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) { void dance_cln_reset(qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) { if (state->count == 1) {
unregister_code (KC_RSFT); unregister_code16(KC_COLN);
unregister_code (KC_SCLN); } else {
} else { unregister_code(KC_SCLN);
unregister_code (KC_SCLN); }
}
} }
//All tap dance functions would go here. Only showing this one. // All tap dance functions would go here. Only showing this one.
qk_tap_dance_action_t tap_dance_actions[] = { qk_tap_dance_action_t tap_dance_actions[] = {
[CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset) [CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_cln_finished, dance_cln_reset),
}; };
``` ```
### Example 2: Send "Safety Dance!" After 100 Taps
#### Example 2: Send "Safety Dance!" After 100 Taps :id=example-2
```c ```c
void dance_egg (qk_tap_dance_state_t *state, void *user_data) { void dance_egg(qk_tap_dance_state_t *state, void *user_data) {
if (state->count >= 100) { if (state->count >= 100) {
SEND_STRING ("Safety dance!"); SEND_STRING("Safety dance!");
reset_tap_dance (state); reset_tap_dance(state);
} }
} }
qk_tap_dance_action_t tap_dance_actions[] = { qk_tap_dance_action_t tap_dance_actions[] = {
[CT_EGG] = ACTION_TAP_DANCE_FN (dance_egg) [CT_EGG] = ACTION_TAP_DANCE_FN(dance_egg),
}; };
``` ```
### Example 3: Turn LED Lights On Then Off, One at a Time #### Example 3: Turn LED Lights On Then Off, One at a Time :id=example-3
```c ```c
// on each tap, light up one led, from right to left // On each tap, light up one LED, from right to left
// on the forth tap, turn them off from right to left // On the fourth tap, turn them off from right to left
void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) { void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) {
switch (state->count) { switch (state->count) {
case 1: case 1:
ergodox_right_led_3_on(); ergodox_right_led_3_on();
break; break;
case 2: case 2:
ergodox_right_led_2_on(); ergodox_right_led_2_on();
break; break;
case 3: case 3:
ergodox_right_led_1_on(); ergodox_right_led_1_on();
break; break;
case 4: case 4:
ergodox_right_led_3_off(); ergodox_right_led_3_off();
_delay_ms(50); wait_ms(50);
ergodox_right_led_2_off(); ergodox_right_led_2_off();
_delay_ms(50); wait_ms(50);
ergodox_right_led_1_off(); ergodox_right_led_1_off();
} }
} }
// on the fourth tap, set the keyboard on flash state // On the fourth tap, set the keyboard on flash state
void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) { void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) {
if (state->count >= 4) { if (state->count >= 4) {
reset_keyboard(); reset_keyboard();
reset_tap_dance(state); }
}
} }
// if the flash state didn't happen, then turn off LEDs, left to right // If the flash state didn't happen, then turn off LEDs, left to right
void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) { void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) {
ergodox_right_led_1_off(); ergodox_right_led_1_off();
_delay_ms(50); wait_ms(50);
ergodox_right_led_2_off(); ergodox_right_led_2_off();
_delay_ms(50); wait_ms(50);
ergodox_right_led_3_off(); ergodox_right_led_3_off();
} }
//All tap dances now put together. Example 3 is "CT_FLASH" // All tap dances now put together. Example 3 is "CT_FLASH"
qk_tap_dance_action_t tap_dance_actions[] = { qk_tap_dance_action_t tap_dance_actions[] = {
[CT_SE] = ACTION_TAP_DANCE_DOUBLE (KC_SPC, KC_ENT) [CT_SE] = ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT),
,[CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset) [CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_cln_finished, dance_cln_reset),
,[CT_EGG] = ACTION_TAP_DANCE_FN (dance_egg) [CT_EGG] = ACTION_TAP_DANCE_FN(dance_egg),
,[CT_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED (dance_flsh_each, dance_flsh_finished, dance_flsh_reset) [CT_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED(dance_flsh_each, dance_flsh_finished, dance_flsh_reset)
}; };
``` ```
### Example 4: 'Quad Function Tap-Dance' #### Example 4: 'Quad Function Tap-Dance' :id=example-4
By [DanielGGordon](https://github.com/danielggordon) By [DanielGGordon](https://github.com/danielggordon)
@@ -201,40 +199,37 @@ Below is a specific example:
* Double Tap = Send `Escape` * Double Tap = Send `Escape`
* Double Tap and Hold = Send `Alt` * Double Tap and Hold = Send `Alt`
## Setup
You will need a few things that can be used for 'Quad Function Tap-Dance'. You will need a few things that can be used for 'Quad Function Tap-Dance'.
You'll need to add these to the top of your `keymap.c` file, before your keymap. You'll need to add these to the top of your `keymap.c` file, before your keymap.
```c ```c
typedef struct { typedef struct {
bool is_press_action; bool is_press_action;
int state; uint8_t state;
} tap; } tap;
enum { enum {
SINGLE_TAP = 1, SINGLE_TAP = 1,
SINGLE_HOLD = 2, SINGLE_HOLD,
DOUBLE_TAP = 3, DOUBLE_TAP,
DOUBLE_HOLD = 4, DOUBLE_HOLD,
DOUBLE_SINGLE_TAP = 5, //send two single taps DOUBLE_SINGLE_TAP, // Send two single taps
TRIPLE_TAP = 6, TRIPLE_TAP,
TRIPLE_HOLD = 7 TRIPLE_HOLD
}; };
//Tap dance enums // Tap dance enums
enum { enum {
X_CTL = 0, X_CTL,
SOME_OTHER_DANCE SOME_OTHER_DANCE
}; };
int cur_dance (qk_tap_dance_state_t *state); uint8_t cur_dance(qk_tap_dance_state_t *state);
//for the x tap dance. Put it here so it can be used in any keymap
void x_finished (qk_tap_dance_state_t *state, void *user_data);
void x_reset (qk_tap_dance_state_t *state, void *user_data);
// For the x tap dance. Put it here so it can be used in any keymap
void x_finished(qk_tap_dance_state_t *state, void *user_data);
void x_reset(qk_tap_dance_state_t *state, void *user_data);
``` ```
Now, at the bottom of your `keymap.c` file, you'll need to add the following: Now, at the bottom of your `keymap.c` file, you'll need to add the following:
@@ -267,65 +262,62 @@ Now, at the bottom of your `keymap.c` file, you'll need to add the following:
* For the third point, there does exist the 'DOUBLE_SINGLE_TAP', however this is not fully tested * For the third point, there does exist the 'DOUBLE_SINGLE_TAP', however this is not fully tested
* *
*/ */
int cur_dance (qk_tap_dance_state_t *state) { uint8_t cur_dance(qk_tap_dance_state_t *state) {
if (state->count == 1) { if (state->count == 1) {
if (state->interrupted || !state->pressed) return SINGLE_TAP; if (state->interrupted || !state->pressed) return SINGLE_TAP;
//key has not been interrupted, but they key is still held. Means you want to send a 'HOLD'. // Key has not been interrupted, but the key is still held. Means you want to send a 'HOLD'.
else return SINGLE_HOLD; else return SINGLE_HOLD;
} } else if (state->count == 2) {
else if (state->count == 2) { // DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap
/* // action when hitting 'pp'. Suggested use case for this return value is when you want to send two
* DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap // keystrokes of the key, and not the 'double tap' action/macro.
* action when hitting 'pp'. Suggested use case for this return value is when you want to send two if (state->interrupted) return DOUBLE_SINGLE_TAP;
* keystrokes of the key, and not the 'double tap' action/macro. else if (state->pressed) return DOUBLE_HOLD;
*/ else return DOUBLE_TAP;
if (state->interrupted) return DOUBLE_SINGLE_TAP; }
else if (state->pressed) return DOUBLE_HOLD;
else return DOUBLE_TAP; // Assumes no one is trying to type the same letter three times (at least not quickly).
} // If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add
//Assumes no one is trying to type the same letter three times (at least not quickly). // an exception here to return a 'TRIPLE_SINGLE_TAP', and define that enum just like 'DOUBLE_SINGLE_TAP'
//If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add if (state->count == 3) {
//an exception here to return a 'TRIPLE_SINGLE_TAP', and define that enum just like 'DOUBLE_SINGLE_TAP' if (state->interrupted || !state->pressed) return TRIPLE_TAP;
if (state->count == 3) { else return TRIPLE_HOLD;
if (state->interrupted || !state->pressed) return TRIPLE_TAP; } else return 8; // Magic number. At some point this method will expand to work for more presses
else return TRIPLE_HOLD;
}
else return 8; //magic number. At some point this method will expand to work for more presses
} }
//instanalize an instance of 'tap' for the 'x' tap dance. // Create an instance of 'tap' for the 'x' tap dance.
static tap xtap_state = { static tap xtap_state = {
.is_press_action = true, .is_press_action = true,
.state = 0 .state = 0
}; };
void x_finished (qk_tap_dance_state_t *state, void *user_data) { void x_finished(qk_tap_dance_state_t *state, void *user_data) {
xtap_state.state = cur_dance(state); xtap_state.state = cur_dance(state);
switch (xtap_state.state) { switch (xtap_state.state) {
case SINGLE_TAP: register_code(KC_X); break; case SINGLE_TAP: register_code(KC_X); break;
case SINGLE_HOLD: register_code(KC_LCTRL); break; case SINGLE_HOLD: register_code(KC_LCTRL); break;
case DOUBLE_TAP: register_code(KC_ESC); break; case DOUBLE_TAP: register_code(KC_ESC); break;
case DOUBLE_HOLD: register_code(KC_LALT); break; case DOUBLE_HOLD: register_code(KC_LALT); break;
case DOUBLE_SINGLE_TAP: register_code(KC_X); unregister_code(KC_X); register_code(KC_X); // Last case is for fast typing. Assuming your key is `f`:
//Last case is for fast typing. Assuming your key is `f`: // For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`.
//For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`. // In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms.
//In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms. case DOUBLE_SINGLE_TAP: tap_code(KC_X); register_code(KC_X);
} }
} }
void x_reset (qk_tap_dance_state_t *state, void *user_data) { void x_reset(qk_tap_dance_state_t *state, void *user_data) {
switch (xtap_state.state) { switch (xtap_state.state) {
case SINGLE_TAP: unregister_code(KC_X); break; case SINGLE_TAP: unregister_code(KC_X); break;
case SINGLE_HOLD: unregister_code(KC_LCTRL); break; case SINGLE_HOLD: unregister_code(KC_LCTRL); break;
case DOUBLE_TAP: unregister_code(KC_ESC); break; case DOUBLE_TAP: unregister_code(KC_ESC); break;
case DOUBLE_HOLD: unregister_code(KC_LALT); case DOUBLE_HOLD: unregister_code(KC_LALT);
case DOUBLE_SINGLE_TAP: unregister_code(KC_X); case DOUBLE_SINGLE_TAP: unregister_code(KC_X);
} }
xtap_state.state = 0; xtap_state.state = 0;
} }
qk_tap_dance_action_t tap_dance_actions[] = { qk_tap_dance_action_t tap_dance_actions[] = {
[X_CTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,x_finished, x_reset) [X_CTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, x_finished, x_reset)
}; };
``` ```
@@ -335,90 +327,91 @@ If you want to implement this in your userspace, then you may want to check out
> In this configuration "hold" takes place **after** tap dance timeout (see `ACTION_TAP_DANCE_FN_ADVANCED_TIME`). To achieve instant hold, remove `state->interrupted` checks in conditions. As a result you may use comfortable longer tapping periods to have more time for taps and not to wait too long for holds (try starting with doubled `TAPPING_TERM`). > In this configuration "hold" takes place **after** tap dance timeout (see `ACTION_TAP_DANCE_FN_ADVANCED_TIME`). To achieve instant hold, remove `state->interrupted` checks in conditions. As a result you may use comfortable longer tapping periods to have more time for taps and not to wait too long for holds (try starting with doubled `TAPPING_TERM`).
### Example 5: Using tap dance for advanced mod-tap and layer-tap keys :id=example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys #### Example 5: Using tap dance for advanced mod-tap and layer-tap keys :id=example-5
Tap dance can be used to emulate `MT()` and `LT()` behavior when the tapped code is not a basic keycode. This is useful to send tapped keycodes that normally require `Shift`, such as parentheses or curly braces—or other modified keycodes, such as `Control + X`. Tap dance can be used to emulate `MT()` and `LT()` behavior when the tapped code is not a basic keycode. This is useful to send tapped keycodes that normally require `Shift`, such as parentheses or curly braces—or other modified keycodes, such as `Control + X`.
Below your layers and custom keycodes, add the following: Below your layers and custom keycodes, add the following:
```c ```c
// tapdance keycodes // Tap Dance keycodes
enum td_keycodes { enum td_keycodes {
ALT_LP // Our example key: `LALT` when held, `(` when tapped. Add additional keycodes for each tapdance. ALT_LP // Our example key: `LALT` when held, `(` when tapped. Add additional keycodes for each tapdance.
}; };
// define a type containing as many tapdance states as you need // Define a type containing as many tapdance states as you need
typedef enum { typedef enum {
SINGLE_TAP, SINGLE_TAP,
SINGLE_HOLD, SINGLE_HOLD,
DOUBLE_SINGLE_TAP DOUBLE_SINGLE_TAP
} td_state_t; } td_state_t;
// create a global instance of the tapdance state type // Create a global instance of the tapdance state type
static td_state_t td_state; static td_state_t td_state;
// declare your tapdance functions: // Declare your tapdance functions:
// function to determine the current tapdance state // Function to determine the current tapdance state
int cur_dance (qk_tap_dance_state_t *state); uint8_t cur_dance(qk_tap_dance_state_t *state);
// `finished` and `reset` functions for each tapdance keycode // `finished` and `reset` functions for each tapdance keycode
void altlp_finished (qk_tap_dance_state_t *state, void *user_data); void altlp_finished(qk_tap_dance_state_t *state, void *user_data);
void altlp_reset (qk_tap_dance_state_t *state, void *user_data); void altlp_reset(qk_tap_dance_state_t *state, void *user_data);
``` ```
Below your `LAYOUT`, define each of the tapdance functions: Below your `LAYOUT`, define each of the tapdance functions:
```c ```c
// determine the tapdance state to return // Determine the tapdance state to return
int cur_dance (qk_tap_dance_state_t *state) { uint8_t cur_dance(qk_tap_dance_state_t *state) {
if (state->count == 1) { if (state->count == 1) {
if (state->interrupted || !state->pressed) { return SINGLE_TAP; } if (state->interrupted || !state->pressed) return SINGLE_TAP;
else { return SINGLE_HOLD; } else return SINGLE_HOLD;
} }
if (state->count == 2) { return DOUBLE_SINGLE_TAP; }
else { return 3; } // any number higher than the maximum state value you return above
}
// handle the possible states for each tapdance keycode you define:
void altlp_finished (qk_tap_dance_state_t *state, void *user_data) { if (state->count == 2) return DOUBLE_SINGLE_TAP;
td_state = cur_dance(state); else return 3; // Any number higher than the maximum state value you return above
switch (td_state) {
case SINGLE_TAP:
register_code16(KC_LPRN);
break;
case SINGLE_HOLD:
register_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_on(_MY_LAYER)` here
break;
case DOUBLE_SINGLE_TAP: // allow nesting of 2 parens `((` within tapping term
tap_code16(KC_LPRN);
register_code16(KC_LPRN);
}
} }
void altlp_reset (qk_tap_dance_state_t *state, void *user_data) { // Handle the possible states for each tapdance keycode you define:
switch (td_state) {
case SINGLE_TAP: void altlp_finished(qk_tap_dance_state_t *state, void *user_data) {
unregister_code16(KC_LPRN); td_state = cur_dance(state);
break; switch (td_state) {
case SINGLE_HOLD: case SINGLE_TAP:
unregister_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_off(_MY_LAYER)` here register_code16(KC_LPRN);
break; break;
case DOUBLE_SINGLE_TAP: case SINGLE_HOLD:
unregister_code16(KC_LPRN); register_mods(MOD_BIT(KC_LALT)); // For a layer-tap key, use `layer_on(_MY_LAYER)` here
} break;
case DOUBLE_SINGLE_TAP: // Allow nesting of 2 parens `((` within tapping term
tap_code16(KC_LPRN);
register_code16(KC_LPRN);
}
} }
// define `ACTION_TAP_DANCE_FN_ADVANCED()` for each tapdance keycode, passing in `finished` and `reset` functions void altlp_reset(qk_tap_dance_state_t *state, void *user_data) {
switch (td_state) {
case SINGLE_TAP:
unregister_code16(KC_LPRN);
break;
case SINGLE_HOLD:
unregister_mods(MOD_BIT(KC_LALT)); // For a layer-tap key, use `layer_off(_MY_LAYER)` here
break;
case DOUBLE_SINGLE_TAP:
unregister_code16(KC_LPRN);
}
}
// Define `ACTION_TAP_DANCE_FN_ADVANCED()` for each tapdance keycode, passing in `finished` and `reset` functions
qk_tap_dance_action_t tap_dance_actions[] = { qk_tap_dance_action_t tap_dance_actions[] = {
[ALT_LP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altlp_finished, altlp_reset) [ALT_LP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altlp_finished, altlp_reset)
}; };
``` ```
Wrap each tapdance keycode in `TD()` when including it in your keymap, e.g. `TD(ALT_LP)`. Wrap each tapdance keycode in `TD()` when including it in your keymap, e.g. `TD(ALT_LP)`.
### Example 6: Using tap dance for momentary-layer-switch and layer-toggle keys #### Example 6: Using tap dance for momentary-layer-switch and layer-toggle keys :id=example-6
Tap Dance can be used to mimic MO(layer) and TG(layer) functionality. For this example, we will set up a key to function as `KC_QUOT` on single-tap, as `MO(_MY_LAYER)` on single-hold, and `TG(_MY_LAYER)` on double-tap. Tap Dance can be used to mimic MO(layer) and TG(layer) functionality. For this example, we will set up a key to function as `KC_QUOT` on single-tap, as `MO(_MY_LAYER)` on single-hold, and `TG(_MY_LAYER)` on double-tap.
@@ -426,97 +419,92 @@ The first step is to include the following code towards the beginning of your `k
```c ```c
typedef struct { typedef struct {
bool is_press_action; bool is_press_action;
int state; uint8_t state;
} tap; } tap;
//Define a type for as many tap dance states as you need // Define a type for as many tap dance states as you need
enum { enum {
SINGLE_TAP = 1, SINGLE_TAP = 1,
SINGLE_HOLD = 2, SINGLE_HOLD,
DOUBLE_TAP = 3 DOUBLE_TAP
}; };
enum { enum {
QUOT_LAYR = 0 //Our custom tap dance key; add any other tap dance keys to this enum QUOT_LAYR, // Our custom tap dance key; add any other tap dance keys to this enum
}; };
//Declare the functions to be used with your tap dance key(s) // Declare the functions to be used with your tap dance key(s)
//Function associated with all tap dances // Function associated with all tap dances
int cur_dance (qk_tap_dance_state_t *state); uint8_t cur_dance(qk_tap_dance_state_t *state);
//Functions associated with individual tap dances // Functions associated with individual tap dances
void ql_finished (qk_tap_dance_state_t *state, void *user_data); void ql_finished(qk_tap_dance_state_t *state, void *user_data);
void ql_reset (qk_tap_dance_state_t *state, void *user_data); void ql_reset(qk_tap_dance_state_t *state, void *user_data);
``` ```
Towards the bottom of your `keymap.c`, include the following code: Towards the bottom of your `keymap.c`, include the following code:
```c ```c
//Determine the current tap dance state // Determine the current tap dance state
int cur_dance (qk_tap_dance_state_t *state) { uint8_t cur_dance(qk_tap_dance_state_t *state) {
if (state->count == 1) { if (state->count == 1) {
if (!state->pressed) { if (!state->pressed) return SINGLE_TAP;
return SINGLE_TAP; else return SINGLE_HOLD;
} else { } else if (state->count == 2) return DOUBLE_TAP;
return SINGLE_HOLD; else return 8;
}
} else if (state->count == 2) {
return DOUBLE_TAP;
}
else return 8;
} }
//Initialize tap structure associated with example tap dance key // Initialize tap structure associated with example tap dance key
static tap ql_tap_state = { static tap ql_tap_state = {
.is_press_action = true, .is_press_action = true,
.state = 0 .state = 0
}; };
//Functions that control what our tap dance key does // Functions that control what our tap dance key does
void ql_finished (qk_tap_dance_state_t *state, void *user_data) { void ql_finished(qk_tap_dance_state_t *state, void *user_data) {
ql_tap_state.state = cur_dance(state); ql_tap_state.state = cur_dance(state);
switch (ql_tap_state.state) { switch (ql_tap_state.state) {
case SINGLE_TAP: case SINGLE_TAP:
tap_code(KC_QUOT); tap_code(KC_QUOT);
break; break;
case SINGLE_HOLD: case SINGLE_HOLD:
layer_on(_MY_LAYER); layer_on(_MY_LAYER);
break; break;
case DOUBLE_TAP: case DOUBLE_TAP:
//check to see if the layer is already set // Check to see if the layer is already set
if (layer_state_is(_MY_LAYER)) { if (layer_state_is(_MY_LAYER)) {
//if already set, then switch it off // If already set, then switch it off
layer_off(_MY_LAYER);
} else {
// If not already set, then switch the layer on
layer_on(_MY_LAYER);
}
break;
}
}
void ql_reset(qk_tap_dance_state_t *state, void *user_data) {
// If the key was held down and now is released then switch off the layer
if (ql_tap_state.state == SINGLE_HOLD) {
layer_off(_MY_LAYER); layer_off(_MY_LAYER);
} else { }
//if not already set, then switch the layer on ql_tap_state.state = 0;
layer_on(_MY_LAYER);
}
break;
}
} }
void ql_reset (qk_tap_dance_state_t *state, void *user_data) { // Associate our tap dance key with its functionality
//if the key was held down and now is released then switch off the layer
if (ql_tap_state.state==SINGLE_HOLD) {
layer_off(_MY_LAYER);
}
ql_tap_state.state = 0;
}
//Associate our tap dance key with its functionality
qk_tap_dance_action_t tap_dance_actions[] = { qk_tap_dance_action_t tap_dance_actions[] = {
[QUOT_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, ql_finished, ql_reset, 275) [QUOT_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, ql_finished, ql_reset, 275)
}; };
``` ```
The above code is similar to that used in previous examples. The one point to note is that we need to be able to check which layers are active at any time so we can toggle them if needed. To do this we use the `layer_state_is( layer )` function which returns `true` if the given `layer` is active. The above code is similar to that used in previous examples. The one point to note is that we need to be able to check which layers are active at any time so we can toggle them if needed. To do this we use the `layer_state_is(layer)` function which returns `true` if the given `layer` is active.
The use of `cur_dance()` and `ql_tap_state` mirrors the above examples. The use of `cur_dance()` and `ql_tap_state` mirrors the above examples.
The `case:SINGLE_TAP` in `ql_finished` is similar to the above examples. The `case:SINGLE_HOLD` works in conjunction with `ql_reset()` to switch to `_MY_LAYER` while the tap dance key is held, and to switch away from `_MY_LAYER` when the key is released. This mirrors the use of `MO(_MY_LAYER)`. The `case:DOUBLE_TAP` works by checking whether `_MY_LAYER` is the active layer, and toggling it on or off accordingly. This mirrors the use of `TG(_MY_LAYER)`. The `case:SINGLE_TAP` in `ql_finished` is similar to the above examples. The `SINGLE_HOLD` case works in conjunction with `ql_reset()` to switch to `_MY_LAYER` while the tap dance key is held, and to switch away from `_MY_LAYER` when the key is released. This mirrors the use of `MO(_MY_LAYER)`. The `DOUBLE_TAP` case works by checking whether `_MY_LAYER` is the active layer, and toggling it on or off accordingly. This mirrors the use of `TG(_MY_LAYER)`.
`tap_dance_actions[]` works similar to the above examples. Note that I used `ACTION_TAP_DANCE_FN_ADVANCED_TIME()` instead of `ACTION_TAP_DANCE_FN_ADVANCED()`. This is because I like my `TAPPING_TERM` to be short (~175ms) for my non-tap-dance keys but find that this is too quick for me to reliably complete tap dance actions - thus the increased time of 275ms here. `tap_dance_actions[]` works similar to the above examples. Note that I used `ACTION_TAP_DANCE_FN_ADVANCED_TIME()` instead of `ACTION_TAP_DANCE_FN_ADVANCED()`. This is because I like my `TAPPING_TERM` to be short (\~175ms) for my non-tap-dance keys but find that this is too quick for me to reliably complete tap dance actions - thus the increased time of 275ms here.
Finally, to get this tap dance key working, be sure to include `TD(QUOT_LAYR)` in your `keymaps[]`. Finally, to get this tap dance key working, be sure to include `TD(QUOT_LAYR)` in your `keymaps[]`.
+8 -5
View File
@@ -66,13 +66,16 @@ Then define a table like this in your keymap file:
```c ```c
const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE( const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE(
UCIS_SYM("poop", 0x1F4A9), // 💩 UCIS_SYM("poop", 0x1F4A9), // 💩
UCIS_SYM("rofl", 0x1F923), // 🤣 UCIS_SYM("rofl", 0x1F923), // 🤣
UCIS_SYM("kiss", 0x1F619) // 😙 UCIS_SYM("cuba", 0x1F1E8, 0x1F1FA), // 🇨🇺
UCIS_SYM("look", 0x0CA0, 0x005F, 0x0CA0), // ಠ_ಠ
); );
``` ```
To use it, call `qk_ucis_start()`. Then, type the mnemonic for the character (such as "rofl"), and hit Space or Enter. QMK should erase the "rofl" text and insert the laughing emoji. By default, each table entry may be up to 3 code points long. This number can be changed by adding `#define UCIS_MAX_CODE_POINTS n` to your `config.h` file.
To use UCIS input, call `qk_ucis_start()`. Then, type the mnemonic for the character (such as "rofl") and hit Space, Enter or Esc. QMK should erase the "rofl" text and insert the laughing emoji.
### Customization ### Customization
@@ -90,7 +93,7 @@ Unicode input in QMK works by inputting a sequence of characters to the OS, sort
The following input modes are available: The following input modes are available:
* **`UC_MAC`**: macOS built-in Unicode hex input. Supports code points up to `0xFFFF` (`0x10FFFF` with Unicode Map). * **`UC_MAC`**: macOS built-in Unicode hex input. Supports code points up to `0x10FFFF` (all possible code points).
To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar. To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar.
By default, this mode uses the left Option key (`KC_LALT`) for Unicode input, but this can be changed by defining [`UNICODE_KEY_MAC`](#input-key-configuration) with another keycode. By default, this mode uses the left Option key (`KC_LALT`) for Unicode input, but this can be changed by defining [`UNICODE_KEY_MAC`](#input-key-configuration) with another keycode.
+1 -1
View File
@@ -111,7 +111,7 @@ This is ideal for when you want ensure everything compiles successfully when pre
## Examples ## Examples
For a brief example, checkout [`/users/_example/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna). For a brief example, checkout [`/users/_example/`](https://github.com/qmk/qmk_firmware/tree/master/users/_example).
For a more complicated example, checkout [`/users/drashna/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna)'s userspace. For a more complicated example, checkout [`/users/drashna/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna)'s userspace.
+29 -29
View File
@@ -1,8 +1,8 @@
# バックライト # バックライト
<!--- <!---
original document: 5d5ff80:docs/feature_backlight.md original document: 0.9.10:docs/feature_backlight.md
git diff 5d5ff80 HEAD -- docs/feature_backlight.md | cat git diff 0.9.10 HEAD -- docs/feature_backlight.md | cat
--> -->
多くのキーボードは、キースイッチを貫通して配置されたり、キースイッチの下に配置された個々の LED によって、バックライトキーをサポートします。この機能は通常スイッチごとに単一の色しか使用できないため、[RGB アンダーグロー](ja/feature_rgblight.md)および [RGB マトリックス](ja/feature_rgb_matrix.md)機能のどちらとも異なりますが、キーボードに複数の異なる単一色の LED を取り付けることは当然可能です。 多くのキーボードは、キースイッチを貫通して配置されたり、キースイッチの下に配置された個々の LED によって、バックライトキーをサポートします。この機能は通常スイッチごとに単一の色しか使用できないため、[RGB アンダーグロー](ja/feature_rgblight.md)および [RGB マトリックス](ja/feature_rgb_matrix.md)機能のどちらとも異なりますが、キーボードに複数の異なる単一色の LED を取り付けることは当然可能です。
@@ -94,29 +94,29 @@ BACKLIGHT_DRIVER = pwm
ハードウェア PWM は以下の表に従ってサポートされます: ハードウェア PWM は以下の表に従ってサポートされます:
| バックライトピン | AT90USB64/128 | ATmega16/32U4 | ATmega16/32U2 | ATmega32A | ATmega328P | | バックライトピン | AT90USB64/128 | ATmega16/32U4 | ATmega16/32U2 | ATmega32A | ATmega328/P |
|-------------|-------------|-------------|-------------|---------|----------| |-------------|-------------|-------------|-------------|---------|----------|
| `B1` | | | | | Timer 1 | | `B1` | | | | | Timer 1 |
| `B2` | | | | | Timer 1 | | `B2` | | | | | Timer 1 |
| `B5` | Timer 1 | Timer 1 | | | | | `B5` | Timer 1 | Timer 1 | | | |
| `B6` | Timer 1 | Timer 1 | | | | | `B6` | Timer 1 | Timer 1 | | | |
| `B7` | Timer 1 | Timer 1 | Timer 1 | | | | `B7` | Timer 1 | Timer 1 | Timer 1 | | |
| `C4` | Timer 3 | | | | | | `C4` | Timer 3 | | | | |
| `C5` | Timer 3 | | Timer 1 | | | | `C5` | Timer 3 | | Timer 1 | | |
| `C6` | Timer 3 | Timer 3 | Timer 1 | | | | `C6` | Timer 3 | Timer 3 | Timer 1 | | |
| `D4` | | | | Timer 1 | | | `D4` | | | | Timer 1 | |
| `D5` | | | | Timer 1 | | | `D5` | | | | Timer 1 | |
他の全てのピンはソフトウェア PWM を使います。[オーディオ](ja/feature_audio.md)機能が無効あるいは1つのタイマだけを使っている場合は、ハードウェアタイマによってバックライト PWM を引き起こすことができます: 他の全てのピンはソフトウェア PWM を使います。[オーディオ](ja/feature_audio.md)機能が無効あるいは1つのタイマだけを使っている場合は、ハードウェアタイマによってバックライト PWM を引き起こすことができます:
| オーディオピン | オーディオタイマ | ソフトウェア PWM タイマ | | オーディオピン | オーディオタイマ | ソフトウェア PWM タイマ |
|---------|-----------|------------------| |---------|-----------|------------------|
| `C4` | Timer 3 | Timer 1 | | `C4` | Timer 3 | Timer 1 |
| `C5` | Timer 3 | Timer 1 | | `C5` | Timer 3 | Timer 1 |
| `C6` | Timer 3 | Timer 1 | | `C6` | Timer 3 | Timer 1 |
| `B5` | Timer 1 | Timer 3 | | `B5` | Timer 1 | Timer 3 |
| `B6` | Timer 1 | Timer 3 | | `B6` | Timer 1 | Timer 3 |
| `B7` | Timer 1 | Timer 3 | | `B7` | Timer 1 | Timer 3 |
両方のタイマーがオーディオのために使われている場合、バックライト PWM はハードウェアタイマを使いませんが、代わりにマトリックススキャンの間に引き起こされます。この場合、PWM の計算は十分なタイミングの精度で呼ばれないかもしれないため、バックライトの明滅はサポートされず、バックライトもちらつくかもしれません。 両方のタイマーがオーディオのために使われている場合、バックライト PWM はハードウェアタイマを使いませんが、代わりにマトリックススキャンの間に引き起こされます。この場合、PWM の計算は十分なタイミングの精度で呼ばれないかもしれないため、バックライトの明滅はサポートされず、バックライトもちらつくかもしれません。
@@ -126,13 +126,13 @@ BACKLIGHT_DRIVER = pwm
| 定義 | デフォルト | 説明 | | 定義 | デフォルト | 説明 |
|---------------------|-------------|--------------------------------------------------------------------------------------------------------------| |---------------------|-------------|--------------------------------------------------------------------------------------------------------------|
| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | | `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
| `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください | | `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください |
| `BACKLIGHT_LEVELS` | `3` | 輝度のレベルの数 (オフを除いて最大 31) | | `BACKLIGHT_LEVELS` | `3` | 輝度のレベルの数 (オフを除いて最大 31) |
| `BACKLIGHT_CAPS_LOCK` | *定義なし* | バックライトを使って Caps Lock のインジケータを有効にする (専用 LED の無いキーボードのため) | | `BACKLIGHT_CAPS_LOCK` | *定義なし* | バックライトを使って Caps Lock のインジケータを有効にする (専用 LED の無いキーボードのため) |
| `BACKLIGHT_BREATHING` | *定義なし* | サポートされる場合は、バックライトの明滅動作を有効にする | | `BACKLIGHT_BREATHING` | *定義なし* | サポートされる場合は、バックライトの明滅動作を有効にする |
| `BREATHING_PERIOD` | `6` | 各バックライトの "明滅" の長さ(秒) | | `BREATHING_PERIOD` | `6` | 各バックライトの "明滅" の長さ(秒) |
| `BACKLIGHT_ON_STATE` | `1` | バックライトが "オン" の時のバックライトピンの状態 - high の場合は `1`、low の場合は `0` | | `BACKLIGHT_ON_STATE` | `1` | バックライトが "オン" の時のバックライトピンの状態 - high の場合は `1`、low の場合は `0` |
### バックライトオン状態 ### バックライトオン状態
@@ -192,10 +192,10 @@ BACKLIGHT_DRIVER = pwm
| 定義 | デフォルト | 説明 | | 定義 | デフォルト | 説明 |
|------------------------|-------------|-------------------------------------------------------------------------------------------------------------| |------------------------|-------------|-------------------------------------------------------------------------------------------------------------|
| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | | `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
| `BACKLIGHT_PWM_DRIVER` | `PWMD4` | 使用する PWM ドライバ。ピンから PWM タイマへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | | `BACKLIGHT_PWM_DRIVER` | `PWMD4` | 使用する PWM ドライバ。ピンから PWM タイマへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
| `BACKLIGHT_PWM_CHANNEL` | `3` | 使用する PWM チャンネル。ピンから PWM チャンネルへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | | `BACKLIGHT_PWM_CHANNEL` | `3` | 使用する PWM チャンネル。ピンから PWM チャンネルへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
| `BACKLIGHT_PAL_MODE` | `2` | 使用するピンの代替機能。ピンの AF マッピングについては ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | | `BACKLIGHT_PAL_MODE` | `2` | 使用するピンの代替機能。ピンの AF マッピングについては ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
## Software PWM Driver :id=software-pwm-driver ## Software PWM Driver :id=software-pwm-driver
@@ -210,7 +210,7 @@ BACKLIGHT_DRIVER = software
| 定義 | デフォルト | 説明 | | 定義 | デフォルト | 説明 |
|-----------------|-------------|-------------------------------------------------------------------------------------------------------------| |-----------------|-------------|-------------------------------------------------------------------------------------------------------------|
| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | | `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
| `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください | | `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください |
### 複数のバックライトピン ### 複数のバックライトピン
+232
View File
@@ -0,0 +1,232 @@
# 分割キーボード
<!---
original document:0.9.5:docs/feature_split_keyboard.md
git diff 0.9.5 HEAD -- docs/feature_split_keyboard.md | cat
-->
QMK ファームウェアリポジトリの多くのキーボードは、"分割"キーボードです。それらは2つのコントローラを使います — 1つは USB に接続し、もう1つは TRRS または同様のケーブルを介してシリアルまたは I<sup>2</sup>C 接続で接続します。
分割キーボードには多くの利点がありますが、有効にするには追加の作業が必要です。
QMK ファームウェアには、任意のキーボードで使用可能な一般的な実装と、多くのキーボード固有の実装があります。
このため、主に Let's Split とその他のキーボードで使われる一般的な実装について説明します。
!> ARM はまだ完全には分割キーボードをサポートしておらず、様々な制限があります。進捗はしていますが、機能の100%にはまだ達していません。
## 互換性の概要
| Transport | AVR | ARM |
|------------------------------|--------------------|--------------------|
| ['serial'](serial_driver.md) | :heavy_check_mark: | :white_check_mark: <sup>1</sup> |
| I2C | :heavy_check_mark: | |
注意:
1. ハードウェアとソフトウェアの両方の制限は、[ドライバーのドキュメント](serial_driver.md)の中で説明されます。
## ハードウェア設定
2つの Pro Micro 互換のコントローラを使っており、キーボードの左右を接続するために TRRS ジャックを使っていることを前提とします。
### ハードウェア要件
左右それぞれのキーボードマトリックスのためのダイオードとスイッチとは別に、2個の TRRS ソケットと 1本の TRRS ケーブルが必要です。
あるいは、少なくとも3本のワイヤがあるケーブルとソケットを使うことができます。
キーボードの左右間で通信するために I<sup>2</sup>C を使いたい場合は、少なくとも4本のワイヤを備えたケーブルと 2個の 4.7kΩ プルアップ抵抗が必要です。
#### 考慮事項
最も一般的に使われる接続は、TRRS ケーブルとジャックです。これらは4本のワイヤを提供し、分割キーボードに非常に有用で、簡単に見つけることができます。
ただし、ワイヤのうちの1本が Vcc を供給するため、キーボードはホットプラグ不可能です。TRRS ケーブルを抜き差しする前に、必ずキーボードのUSB接続をはずす必要があります。そうしなければ、コントローラを短絡させたり、もっと悪いことが起こるかもしれません。
別のオプションは電話ケーブルを使うことです (例えば、旧式の RJ-11/RJ-14 ケーブル)。実際に4本のワイヤ/レーンをサポートするものを使うようにしてください。
ただし、USB ケーブル、SATA ケーブル、そして単に4本の電線でもコントローラ間の通信に使用できることがわかっています。
!> コントローラ間の通信に USB ケーブルを使っても問題ありませんが、コネクタは通常の USB 接続と間違えられるかもしれず、配線方法によってはキーボードが短絡する可能性があります。このため、分割キーボードの接続のためにはお勧めできません。
### シリアル配線
2つの Pro Micro 間で GND、Vcc、D0 (別名 PDO あるいは pin 3) を TRS/TRRS ケーブルの3本のワイヤで接続します。
?> ここで使われるピンは実際には以下の `SOFT_SERIAL_PIN` によって設定されることに注意してください。
![シリアル配線](https://i.imgur.com/C3D1GAQ.png)
### I<sup>2</sup>C 配線
2つの Pro Micro 間で GND、Vcc、さらに SCL と SDA (それぞれ 別名 PD0/ピン3 および PD1/ピン2) を TRRS ケーブルの4本のワイヤで接続します。
プルアップ抵抗はキーボードの左右どちら側にも配置することができます。もし各側を単独で使いたい場合は、4つの抵抗を使い、両側にプルアップ抵抗を配置することもできます。
![I2C 配線](https://i.imgur.com/Hbzhc6E.png)
## ファームウェア設定
分割キーボード機能を有効にするには、以下を `rules.mk` に追加してください:
```make
SPLIT_KEYBOARD = yes
```
カスタムトランスポート (通信メソッド)を使っている場合は、以下を追加する必要もあります:
```make
SPLIT_TRANSPORT = custom
```
### 左右の設定
デフォルトでは、ファームウェアはどちら側がどちらであるかを認識しません; 決定するには幾つかの助けが必要です。これを行うには幾つかの方法があり、以下に優先順に列挙します。
#### ピンによる左右の設定
左右を決定するためにコントローラ上のピンを読むようにファームウェアを設定することができます。これを行うには、以下を `config.h` ファイルに追加します:
```c
#define SPLIT_HAND_PIN B7
```
これは指定されたピンを読み込みます。high の場合、コントローラはそれを左側だと仮定し、low の場合、それは右側であると仮定します。
#### EEPROM による左右の設定
このメソッドは永続ストレージ(`EEPROM`)のフラグを設定することで、キーボードの左右を設定します。これはコントローラが最初に起動する時にチェックされ、キーボードのどちら側であるかとキーボードのレイアウトの向きを決定します。
このメソッドを有効にするには、以下を `config.h` ファイルに追加します:
```c
#define EE_HANDS
```
ただし、各コントローラに正しい側の EEPROM ファイルを書き込む必要があります。これを手動で行うこともできますが、ファームウェアを書き込む時にこれを行う avrdude および dfu のターゲットが存在します。
* `:avrdude-split-left`
* `:avrdude-split-right`
* `:dfu-split-left`
* `:dfu-split-right`
* `:dfu-util-split-left`
* `:dfu-util-split-right`
この設定は、`EEP_RST` キーや `eeconfig_init()` 関数を使って EEPROM を再初期化する時には変更されません。ただし、ファームウェアの組み込みオプション以外で EEPROM をリセット([QMK Toolbox]() の "Reset EEPROM" ボタンの動作のように、`EEPROM` を上書きするファイルを書きこむなど)した場合、`EEPROM` ファイルを再書き込みする必要があります。
`EEPROM` ファイルは、QMK ファームウェアのリポジトリ内の[ここ](https://github.com/qmk/qmk_firmware/tree/master/quantum/split_common)にあります。
#### `#define` による左右の設定
コンパイル時に左右を設定することができます。これは以下を `config.h` ファイルに追加することで行うことができます:
```c
#define MASTER_RIGHT
```
あるいは
```c
#define MASTER_LEFT
```
どちらも定義されていない場合、左右のデフォルトは `MASTER_LEFT` になります。
### 通信オプション
全ての分割キーボードが同一であるとは限らないため、`config.h` ファイル内で設定することができる多くの追加のオプションがあります。
```c
#define USE_I2C
```
これは分割キーボードの I<sup>2</sup>C サポートを有効にします。これは厳密には通信用ではありませんが、OLED あるいは I<sup>2</sup>C ベースのデバイスに使うことができます。
```c
#define SOFT_SERIAL_PIN D0
```
これはシリアル通信用に使われるピンを設定します。シリアルを使っていない場合は、これを定義する必要はありません。
ただし、キーボード上でシリアルおよび I<sup>2</sup>C を使っている場合は、これを設定し、D0 および D1 以外の値に設定する必要があります (これらは I<sup>2</sup>C 通信のために使われます)。
```c
#define SELECT_SOFT_SERIAL_SPEED {#}`
```
シリアル通信に問題がある場合は、この値を変更して、シリアル用の通信速度を制御することができます。デフォルトは1で、可能な値は以下の通りです:
* **`0`**: 約189kbps (実験用途専用)
* **`1`**: 約137kbps (デフォルト)
* **`2`**: 約75kbps
* **`3`**: 約39kbps
* **`4`**: 約26kbps
* **`5`**: 約20kbps
### ハードウェア設定オプション
ハードウェアのセットアップ方法に基づいて、設定する必要のある設定が幾つかあります。
```c
#define MATRIX_ROW_PINS_RIGHT { <row pins> }
#define MATRIX_COL_PINS_RIGHT { <col pins> }
```
これにより、右側のマトリックスに異なるピンのセットを指定することができます。これは、左右の形が違うキーボード (Keebio の Quefrency など)で、左右で別の構成が必要な場合に便利です。
```c
#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }
```
これにより右側のための異なる直接ピンのセットを指定することができます。
```c
#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a }
#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b }
```
これにより右側のための異なるエンコーダピンのセットを指定することができます。
```c
#define RGBLIGHT_SPLIT
```
このオプションは、分割キーボードのコントローラ間で RGB ライトモードの同期を有効にします。これはコントローラに直接配線されている RGB LED を持つキーボード用です (つまり、それらは TRRS ケーブルで "追加データ"オプションを使っていません)。
```c
#define RGBLED_SPLIT { 6, 6 }
```
これは各コントローラに直接接続されている LED の数を設定します。最初の数は左側、2番目の数は右側です。
?> この設定は `RGBLIGHT_SPLIT` が有効になっていることを意味し、有効になっていない場合は強制的に有効にします。
```c
#define SPLIT_USB_DETECT
```
このオプションは、スタートアップの挙動を変更して、マスタ/スレーブの決定時にアクティブな USB 接続を検出します。このオプションがタイムアウトになった場合、その片側はスレーブと見なされます。これは ARM のデフォルトの挙動で、AVR Teensy ボードに必要です (ハードウェアの制限のため)。
?> この設定はバッテリパックを使ったデモの機能を停止します。
```c
#define SPLIT_USB_TIMEOUT 2000
```
これは、`SPLIT_USB_DETECT` を使う時のマスタ/スレーブを検出する場合の最大タイムアウトを設定します。
```c
#define SPLIT_USB_TIMEOUT_POLL 10
```
これは `SPLIT_USB_DETECT` を使う時のマスタ/スレーブを検出する場合のポーリング頻度を設定します
## 追加のリソース(英語)
Nicinabox には Let's Split キーボードのための[非常に優れた詳細なガイド](https://github.com/nicinabox/lets-split-guide)があり、トラブルシューティング情報を含む知っておくべきほとんど全てをカバーします。
ただし、RGB ライトセクションは、RGB Split コードが QMK ファームウェアに追加されるずっと前に書かれたため、古くなっています。ガイドに従う代わりに、各 LED テーブ(訳注: LED strip とも呼びます)を直接コントローラに配線します。
<!-- I may port this information later, but for now ... it's very nice, and covers everything -->
+1 -1
View File
@@ -97,7 +97,7 @@ In most situations you will want to answer Yes to all of the prompts.
It's possible, that you will get an error saying something like: `bash: qmk: command not found`. It's possible, that you will get an error saying something like: `bash: qmk: command not found`.
This is due to a [bug](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839155) Debian introduced with their Bash 4.4 release, which removed `$HOME/.local/bin` from the PATH. This bug was later fixed on Debian and Ubuntu. This is due to a [bug](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839155) Debian introduced with their Bash 4.4 release, which removed `$HOME/.local/bin` from the PATH. This bug was later fixed on Debian and Ubuntu.
Sadly, Ubuntu reitroduced this bug and is [yet to fix it](https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1588562). Sadly, Ubuntu reitroduced this bug and is [yet to fix it](https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1588562).
Luckily, the fix is easy. Run this as your user: `echo "PATH=$HOME/.local/bin:$PATH" >> $HOME/.bashrc && source $HOME/.bashrc` Luckily, the fix is easy. Run this as your user: `echo 'PATH="$HOME/.local/bin:$PATH"' >> $HOME/.bashrc && source $HOME/.bashrc`
?>**Note on FreeBSD**: ?>**Note on FreeBSD**:
It is suggested to run `qmk setup` as a non-`root` user to start with, but this will likely identify packages that need to be installed to your It is suggested to run `qmk setup` as a non-`root` user to start with, but this will likely identify packages that need to be installed to your
+1 -1
View File
@@ -15,7 +15,7 @@ You can control the behavior of one shot keys by defining these in `config.h`:
#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */ #define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
``` ```
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes. * `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](mod_tap.md), not the `KC_*` codes.
* `OSL(layer)` - momentary switch to *layer*. * `OSL(layer)` - momentary switch to *layer*.
Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine. Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine.
+58
View File
@@ -0,0 +1,58 @@
# Choosing an Arm MCU :id=choose-arm-mcu
This page outlines the selection criteria to ensure compatibility with Arm/ChibiOS.
QMK uses the Hardware Abstraction Layer of ChibiOS in order to run on Arm devices. ChibiOS in general is best supported on STM32 devices, both in the perspective of base MCU support, as well as on-MCU peripheral support. As an extension to the core ChibiOS MCU support, QMK also utilises ChibiOS-Contrib (which includes the Kinetis MCU support layer, as an example), but it does not provide as great a level of peripheral support or general testing for supported devices.
Adding support for new MCU families must go through ChibiOS or ChibiOS-Contrib -- QMK does not have the bandwidth, resources, nor the inclination to maintain long-term MCU support for your board of choice.
To be clear: this also includes commercial boards -- unless agreed upon by all parties, QMK will not take over maintenance of a bespoke MCU support package. Even if MCU support is upstreamed into ChibiOS/ChibiOS-Contrib, QMK reserves the right to deprecate and/or remove keyboards utilising support packages that aren't kept up to date with upstream ChibiOS itself.
## Selecting an already-supported MCU :id=selecting-already-supported-mcu
### STM32 families
As outlined earlier, STM32 is the preferred option to ensure greatest compatibility with the subsystems already implemented in QMK. Not all subsystems are compatible yet, but for the most widely-used support is already present.
The simplest solution to determine if an STM32 MCU is compatible is to navigate to the list of supported STM32 ports in QMK's [ChibiOS fork](https://github.com/qmk/ChibiOS/tree/master/os/hal/ports/STM32). Inside this directory, each of the supported STM32 families will be listed, and inside each family a file called `stm32_registry.h` will be present. Scanning through these files will show `#define`s such as the following, which can be used to determine if ChibiOS supports a particular MCU:
```c
#if defined(STM32F303xC) || defined(__DOXYGEN__)
```
The example shows that STM32F303xC devices are supported by ChibiOS.
The next step is to ensure that USB is supported on those devices by ChibiOS -- you can confirm this by checking inside the same section guarded by the `#define` above, specifically for the following to be `TRUE`:
```c
#define STM32_HAS_USB TRUE
```
or one of the following being `TRUE`:
```c
#define STM32_HAS_OTG1 TRUE
#define STM32_HAS_OTG2 TRUE
```
For the most part, this is the bare minimum to be able to have a high confidence that QMK will be able to run on your MCU. After that, it's all up to configuration.
### Non-STM32 families
ChibiOS does have support for a handful of non-STM32 devices, and the list can be found in QMK's [ChibiOS fork](https://github.com/qmk/ChibiOS/tree/master/os/hal/ports) and [ChibiOS-Contrib fork](https://github.com/qmk/ChibiOS-Contrib/tree/master/os/hal/ports). Non-STM32 support is likely out of date, and only supports ancient MCUs -- whilst it might be possible to use these, it's not recommended.
Do note that there are sometimes licensing restrictions with respect to redistribution. As an example, binaries built for nRF5 are not able to be redistributed via QMK Configurator, due to the licensing of their board support package.
## Adding support for a new STM32 MCU (for an existing family) :id=add-new-stm32-mcu
Usually, one can "masquerade" as an existing MCU of the same family, especially if the only difference is RAM or Flash size. As an example, some MCUs within the same family are virtually identical, with the exception of adding a cryptographic peripheral -- STM32L072 vs. STM32L082 for instance. Given the unlikely use of the cryptographic peripheral, L082 chips can actually run as if they're an L072, and can be targeted accordingly.
Adding proper support for new MCUs within an existing STM32 family should ideally be upstreamed to ChibiOS. In general, this will require modifications of the `stm32_registry.h` file, providing correct responses for the same `#define`s provided for the other MCUs in that family.
## Adding support for a new STM32 Family :id=add-new-stm32-family
If this is a requirement, this needs to go through upstream ChibiOS before QMK would consider accepting boards targeting the new family. More information for porting should be sought by approaching ChibiOS directly, rather than through QMK.
## Adding support for a new MCU Family :id=add-new-mcu-family
As stated earlier, in order for a new MCU family to be supported by QMK, it needs to be upstreamed into ChibiOS-Contrib before QMK will consider accepting boards using it. The same principle applies for development -- you're best approaching the ChibiOS-Contrib maintainers to get a bit more of an idea on what's involved with upstreaming your contribution.
+20
View File
@@ -19,6 +19,15 @@ These LEDs are called "addressable" because instead of using a wire per color, e
## Driver configuration ## Driver configuration
### All drivers
Different versions of the addressable LEDs have differing requirements for the T<sub>RST</sub> period between frames.
The default setting is 280 µs, which should work for most cases, but this can be overridden in your config.h. e.g.:
```c
#define WS2812_TRST_US 80
```
### Bitbang ### Bitbang
Default driver, the absence of configuration assumes this driver. To configure it, add this to your rules.mk: Default driver, the absence of configuration assumes this driver. To configure it, add this to your rules.mk:
@@ -99,3 +108,14 @@ While not an exhaustive list, the following table provides the scenarios that ha
| f401/f411 | :heavy_check_mark: | | f401/f411 | :heavy_check_mark: |
*Other supported ChibiOS boards and/or pins may function, it will be highly chip and configuration dependent.* *Other supported ChibiOS boards and/or pins may function, it will be highly chip and configuration dependent.*
### Push Pull and Open Drain Configuration
The default configuration is a push pull on the defined pin.
This can be configured for bitbang, PWM and SPI.
Note: This only applies to STM32 boards.
To configure the `RGB_DI_PIN` to open drain configuration add this to your config.h file:
```c
#define WS2812_EXTERNAL_PULLUP
```
+5 -15
View File
@@ -36,25 +36,15 @@
static inline void ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t masklo, uint8_t maskhi); static inline void ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t masklo, uint8_t maskhi);
// Setleds for standard RGB void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds) {
void inline ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds) { DDRx_ADDRESS(RGB_DI_PIN) |= pinmask(RGB_DI_PIN);
// wrap up usage of RGB_DI_PIN
ws2812_setleds_pin(ledarray, number_of_leds, RGB_DI_PIN);
}
void ws2812_setleds_pin(LED_TYPE *ledarray, uint16_t number_of_leds, uint8_t pin) { uint8_t masklo = ~(pinmask(RGB_DI_PIN)) & PORTx_ADDRESS(RGB_DI_PIN);
DDRx_ADDRESS(RGB_DI_PIN) |= pinmask(pin); uint8_t maskhi = pinmask(RGB_DI_PIN) | PORTx_ADDRESS(RGB_DI_PIN);
uint8_t masklo = ~(pinmask(pin)) & PORTx_ADDRESS(pin);
uint8_t maskhi = pinmask(pin) | PORTx_ADDRESS(pin);
ws2812_sendarray_mask((uint8_t *)ledarray, number_of_leds * sizeof(LED_TYPE), masklo, maskhi); ws2812_sendarray_mask((uint8_t *)ledarray, number_of_leds * sizeof(LED_TYPE), masklo, maskhi);
#ifdef RGBW _delay_us(WS2812_TRST_US);
_delay_us(80);
#else
_delay_us(50);
#endif
} }
/* /*
+10 -2
View File
@@ -14,6 +14,14 @@
# endif # endif
#endif #endif
// Push Pull or Open Drain Configuration
// Default Push Pull
#ifndef WS2812_EXTERNAL_PULLUP
# define WS2812_OUTPUT_MODE PAL_MODE_OUTPUT_PUSHPULL
#else
# define WS2812_OUTPUT_MODE PAL_MODE_OUTPUT_OPENDRAIN
#endif
#define NUMBER_NOPS 6 #define NUMBER_NOPS 6
#define CYCLES_PER_SEC (STM32_SYSCLK / NUMBER_NOPS * NOP_FUDGE) #define CYCLES_PER_SEC (STM32_SYSCLK / NUMBER_NOPS * NOP_FUDGE)
#define NS_PER_SEC (1000000000L) // Note that this has to be SIGNED since we want to be able to check for negative values of derivatives #define NS_PER_SEC (1000000000L) // Note that this has to be SIGNED since we want to be able to check for negative values of derivatives
@@ -43,7 +51,7 @@
// The reset gap can be 6000 ns, but depending on the LED strip it may have to be increased // The reset gap can be 6000 ns, but depending on the LED strip it may have to be increased
// to values like 600000 ns. If it is too small, the pixels will show nothing most of the time. // to values like 600000 ns. If it is too small, the pixels will show nothing most of the time.
#define RES 10000 // Width of the low gap between bits to cause a frame to latch #define RES (1000 * WS2812_TRST_US) // Width of the low gap between bits to cause a frame to latch
void sendByte(uint8_t byte) { void sendByte(uint8_t byte) {
// WS2812 protocol wants most significant bits first // WS2812 protocol wants most significant bits first
@@ -66,7 +74,7 @@ void sendByte(uint8_t byte) {
} }
} }
void ws2812_init(void) { setPinOutput(RGB_DI_PIN); } void ws2812_init(void) { palSetLineMode(RGB_DI_PIN, WS2812_OUTPUT_MODE); }
// Setleds for standard RGB // Setleds for standard RGB
void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) { void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) {
-16
View File
@@ -1,16 +0,0 @@
#pragma once
#include "quantum/color.h"
/* User Interface
*
* Input:
* ledarray: An array of GRB data describing the LED colors
* number_of_leds: The number of LEDs to write
*
* The functions will perform the following actions:
* - Set the data-out pin as output
* - Send out the LED data
* - Wait 50us to reset the LEDs
*/
void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds);
+20 -9
View File
@@ -24,6 +24,22 @@
# define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP # define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP
#endif #endif
// Push Pull or Open Drain Configuration
// Default Push Pull
#ifndef WS2812_EXTERNAL_PULLUP
# if defined(USE_GPIOV1)
# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL
# else
# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING
# endif
#else
# if defined(USE_GPIOV1)
# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN
# else
# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING
# endif
#endif
#ifndef WS2812_PWM_TARGET_PERIOD #ifndef WS2812_PWM_TARGET_PERIOD
//# define WS2812_PWM_TARGET_PERIOD 800000 // Original code is 800k...? //# define WS2812_PWM_TARGET_PERIOD 800000 // Original code is 800k...?
# define WS2812_PWM_TARGET_PERIOD 80000 // TODO: work out why 10x less on f303/f4x1 # define WS2812_PWM_TARGET_PERIOD 80000 // TODO: work out why 10x less on f303/f4x1
@@ -37,11 +53,10 @@
/** /**
* @brief Number of bit-periods to hold the data line low at the end of a frame * @brief Number of bit-periods to hold the data line low at the end of a frame
* *
* The reset period for each frame must be at least 50 uS; so we add in 50 bit-times * The reset period for each frame is defined in WS2812_TRST_US.
* of zeroes at the end. (50 bits)*(1.25 uS/bit) = 62.5 uS, which gives us some * Calculate the number of zeroes to add at the end assuming 1.25 uS/bit:
* slack in the timing requirements
*/ */
#define WS2812_RESET_BIT_N (50) #define WS2812_RESET_BIT_N (1000 * WS2812_TRST_US / 1250)
#define WS2812_COLOR_BIT_N (RGBLED_NUM * 24) /**< Number of data bits */ #define WS2812_COLOR_BIT_N (RGBLED_NUM * 24) /**< Number of data bits */
#define WS2812_BIT_N (WS2812_COLOR_BIT_N + WS2812_RESET_BIT_N) /**< Total number of bits in a frame */ #define WS2812_BIT_N (WS2812_COLOR_BIT_N + WS2812_RESET_BIT_N) /**< Total number of bits in a frame */
@@ -142,11 +157,7 @@ void ws2812_init(void) {
for (i = 0; i < WS2812_COLOR_BIT_N; i++) ws2812_frame_buffer[i] = WS2812_DUTYCYCLE_0; // All color bits are zero duty cycle for (i = 0; i < WS2812_COLOR_BIT_N; i++) ws2812_frame_buffer[i] = WS2812_DUTYCYCLE_0; // All color bits are zero duty cycle
for (i = 0; i < WS2812_RESET_BIT_N; i++) ws2812_frame_buffer[i + WS2812_COLOR_BIT_N] = 0; // All reset bits are zero for (i = 0; i < WS2812_RESET_BIT_N; i++) ws2812_frame_buffer[i + WS2812_COLOR_BIT_N] = 0; // All reset bits are zero
#if defined(USE_GPIOV1) palSetLineMode(RGB_DI_PIN, WS2812_OUTPUT_MODE);
palSetLineMode(RGB_DI_PIN, PAL_MODE_STM32_ALTERNATE_PUSHPULL);
#else
palSetLineMode(RGB_DI_PIN, PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING);
#endif
// PWM Configuration // PWM Configuration
//#pragma GCC diagnostic ignored "-Woverride-init" // Turn off override-init warning for this struct. We use the overriding ability to set a "default" channel config //#pragma GCC diagnostic ignored "-Woverride-init" // Turn off override-init warning for this struct. We use the overriding ability to set a "default" channel config
+18 -6
View File
@@ -16,11 +16,27 @@
# define WS2812_SPI_MOSI_PAL_MODE 5 # define WS2812_SPI_MOSI_PAL_MODE 5
#endif #endif
// Push Pull or Open Drain Configuration
// Default Push Pull
#ifndef WS2812_EXTERNAL_PULLUP
# if defined(USE_GPIOV1)
# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL
# else
# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL
# endif
#else
# if defined(USE_GPIOV1)
# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN
# else
# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN
# endif
#endif
#define BYTES_FOR_LED_BYTE 4 #define BYTES_FOR_LED_BYTE 4
#define NB_COLORS 3 #define NB_COLORS 3
#define BYTES_FOR_LED (BYTES_FOR_LED_BYTE * NB_COLORS) #define BYTES_FOR_LED (BYTES_FOR_LED_BYTE * NB_COLORS)
#define DATA_SIZE (BYTES_FOR_LED * RGBLED_NUM) #define DATA_SIZE (BYTES_FOR_LED * RGBLED_NUM)
#define RESET_SIZE 200 #define RESET_SIZE (1000 * WS2812_TRST_US / (2 * 1250))
#define PREAMBLE_SIZE 4 #define PREAMBLE_SIZE 4
static uint8_t txbuf[PREAMBLE_SIZE + DATA_SIZE + RESET_SIZE] = {0}; static uint8_t txbuf[PREAMBLE_SIZE + DATA_SIZE + RESET_SIZE] = {0};
@@ -52,11 +68,7 @@ static void set_led_color_rgb(LED_TYPE color, int pos) {
} }
void ws2812_init(void) { void ws2812_init(void) {
#if defined(USE_GPIOV1) palSetLineMode(RGB_DI_PIN, WS2812_OUTPUT_MODE);
palSetLineMode(RGB_DI_PIN, PAL_MODE_STM32_ALTERNATE_PUSHPULL);
#else
palSetLineMode(RGB_DI_PIN, PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL);
#endif
// TODO: more dynamic baudrate // TODO: more dynamic baudrate
static const SPIConfig spicfg = { static const SPIConfig spicfg = {
+9 -9
View File
@@ -1,11 +1,4 @@
/* /*
* light weight WS2812 lib include
*
* Version 2.3 - Nev 29th 2015
* Author: Tim (cpldcpu@gmail.com)
*
* Please do not change this file! All configuration is handled in "ws2812_config.h"
*
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or * the Free Software Foundation, either version 2 of the License, or
@@ -24,12 +17,20 @@
#include "quantum/color.h" #include "quantum/color.h"
/*
* Older WS2812s can handle a reset time (TRST) of 50us, but recent
* component revisions require a minimum of 280us.
*/
#if !defined(WS2812_TRST_US)
#define WS2812_TRST_US 280
#endif
/* User Interface /* User Interface
* *
* Input: * Input:
* ledarray: An array of GRB data describing the LED colors * ledarray: An array of GRB data describing the LED colors
* number_of_leds: The number of LEDs to write * number_of_leds: The number of LEDs to write
* pin (optional): A pin_t definition for the line to drive
* *
* The functions will perform the following actions: * The functions will perform the following actions:
* - Set the data-out pin as output * - Set the data-out pin as output
@@ -37,4 +38,3 @@
* - Wait 50us to reset the LEDs * - Wait 50us to reset the LEDs
*/ */
void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds); void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds);
void ws2812_setleds_pin(LED_TYPE *ledarray, uint16_t number_of_leds, uint8_t pin);
+3 -3
View File
@@ -5,7 +5,7 @@
"width": 15.5, "width": 15.5,
"height": 4.25, "height": 4.25,
"layouts": { "layouts": {
"LAYOUT_all": { "LAYOUT": {
"layout": [ "layout": [
{"label":"Tab", "x":0, "y":0}, {"label":"Tab", "x":0, "y":0},
{"label":"Q", "x":1, "y":0}, {"label":"Q", "x":1, "y":0},
@@ -33,7 +33,7 @@
{"label":"J", "x":7.25, "y":1}, {"label":"J", "x":7.25, "y":1},
{"label":"K", "x":8.25, "y":1}, {"label":"K", "x":8.25, "y":1},
{"label":"L", "x":9.25, "y":1}, {"label":"L", "x":9.25, "y":1},
{"label":"Enter", "x":10.25, "y":1.75}, {"label":"Enter", "x":10.25, "y":1, "w":1.75},
{"label":"4", "x":12.5, "y":1}, {"label":"4", "x":12.5, "y":1},
{"label":"5", "x":13.5, "y":1}, {"label":"5", "x":13.5, "y":1},
{"label":"6", "x":14.5, "y":1}, {"label":"6", "x":14.5, "y":1},
@@ -47,7 +47,7 @@
{"label":"N", "x":6.75, "y":2}, {"label":"N", "x":6.75, "y":2},
{"label":"M", "x":7.75, "y":2}, {"label":"M", "x":7.75, "y":2},
{"label":"<", "x":8.75, "y":2}, {"label":"<", "x":8.75, "y":2},
{"label":"Fn1", "x":9.75, "y":2}, {"label":"Fn1", "x":9.75, "y":2, "w":1.25},
{"label":"Up", "x":11.25, "y":2.25}, {"label":"Up", "x":11.25, "y":2.25},
{"label":"1", "x":12.5, "y":2}, {"label":"1", "x":12.5, "y":2},
{"label":"2", "x":13.5, "y":2}, {"label":"2", "x":13.5, "y":2},
+10 -10
View File
@@ -14,13 +14,13 @@ BOOTLOADER = atmel-dfu
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.
# #
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
MOUSEKEY_ENABLE ?= no # Mouse keys MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE ?= yes # Audio control and System control EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE ?= no # Console for debug CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE ?= no # Commands for debug and configuration COMMAND_ENABLE = no # Commands for debug and configuration
SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
AUDIO_ENABLE ?= no AUDIO_ENABLE = no
RGBLIGHT_ENABLE ?= yes RGBLIGHT_ENABLE = yes
+12 -12
View File
@@ -14,15 +14,15 @@ BOOTLOADER = atmel-dfu
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.
# #
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE ?= no # Mouse keys MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE ?= yes # Audio control and System control EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE ?= yes # Console for debug CONSOLE_ENABLE = yes # Console for debug
COMMAND_ENABLE ?= yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE ?= no # MIDI controls MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE ?= no AUDIO_ENABLE = no
UNICODE_ENABLE ?= no # Unicode UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+7 -43
View File
@@ -1,46 +1,10 @@
/* Copyright 2020 yfuku
*
* 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 #pragma once
#ifdef KEYBOARD_bat43_rev1
#include "rev1.h"
#endif
#ifdef KEYBOARD_bat43_rev2
#include "rev2.h"
#endif
#include "quantum.h" #include "quantum.h"
/* This is 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( \
k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \
k10, k11, k12, k13, k14, k15, k30, k50, k51, k52, k53, k54, k55, \
k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \
k33, k34, k35, k70, k71, k72, \
k74, k75, k73, k31, k32 \
) { \
{ k00, k01, k02, k03, k04, k05 }, \
{ k10, k11, k12, k13, k14, k15 }, \
{ k20, k21, k22, k23, k24, k25 }, \
{ k30, k31, k32, k33, k34, k35 }, \
{ k40, k41, k42, k43, k44, k45 }, \
{ k50, k51, k52, k53, k54, k55 }, \
{ k60, k61, k62, k63, k64, k65 }, \
{ k70, k71, k72, k73, k74, k75 }, \
}
File renamed without changes.
+17
View File
@@ -0,0 +1,17 @@
/* Copyright 2020 yfuku
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "rev1.h"
+46
View File
@@ -0,0 +1,46 @@
/* Copyright 2020 yfuku
*
* 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 is 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( \
k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \
k10, k11, k12, k13, k14, k15, k30, k50, k51, k52, k53, k54, k55, \
k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \
k33, k34, k35, k70, k71, k72, \
k74, k75, k73, k31, k32 \
) { \
{ k00, k01, k02, k03, k04, k05 }, \
{ k10, k11, k12, k13, k14, k15 }, \
{ k20, k21, k22, k23, k24, k25 }, \
{ k30, k31, k32, k33, k34, k35 }, \
{ k40, k41, k42, k43, k44, k45 }, \
{ k50, k51, k52, k53, k54, k55 }, \
{ k60, k61, k62, k63, k64, k65 }, \
{ k70, k71, k72, k73, k74, k75 }, \
}
+1
View File
@@ -0,0 +1 @@
+71
View File
@@ -0,0 +1,71 @@
{
"keyboard_name": "bat43",
"url": "",
"maintainer": "yfuku",
"width": 15,
"height": 5.1,
"layouts": {
"LAYOUT": {
"layout": [
{"label":"k00", "x":0, "y":1.43},
{"label":"k01", "x":1, "y":1.11},
{"label":"k02", "x":2, "y":0.38},
{"label":"k03", "x":3, "y":0},
{"label":"k04", "x":4, "y":0.05},
{"label":"k05", "x":5, "y":0.16},
{"label":"k40", "x":9, "y":0.16},
{"label":"k41", "x":10, "y":0.05},
{"label":"k42", "x":11, "y":0},
{"label":"k43", "x":12, "y":0.38},
{"label":"k44", "x":13, "y":1.11},
{"label":"k45", "x":14, "y":1.43},
{"label":"k10", "x":0, "y":2.43},
{"label":"k11", "x":1, "y":2.11},
{"label":"k12", "x":2, "y":1.38},
{"label":"k13", "x":3, "y":1},
{"label":"k14", "x":4, "y":1.05},
{"label":"k15", "x":5, "y":1.16},
{"label":"k30", "x":7, "y":1.16},
{"label":"k50", "x":9, "y":1.16},
{"label":"k51", "x":10, "y":1.05},
{"label":"k52", "x":11, "y":1},
{"label":"k53", "x":12, "y":1.38},
{"label":"k54", "x":13, "y":2.11},
{"label":"k55", "x":14, "y":2.43},
{"label":"k20", "x":0, "y":3.43},
{"label":"k21", "x":1, "y":3.11},
{"label":"k22", "x":2, "y":2.38},
{"label":"k23", "x":3, "y":2},
{"label":"k24", "x":4, "y":2.05},
{"label":"k25", "x":5, "y":2.16},
{"label":"k60", "x":9, "y":2.16},
{"label":"k61", "x":10, "y":2.05},
{"label":"k62", "x":11, "y":2},
{"label":"k63", "x":12, "y":2.38},
{"label":"k64", "x":13, "y":3.11},
{"label":"k65", "x":14, "y":3.43},
{"label":"k33", "x":4, "y":3.3},
{"label":"k34", "x":5, "y":3.3},
{"label":"k35", "x":6, "y":3.3},
{"label":"k70", "x":8, "y":3.3},
{"label":"k71", "x":9, "y":3.3},
{"label":"k72", "x":10, "y":3.3},
{"label":"k75", "x":5.1, "y":4.3, "w":0.8, "h":0.8},
{"label":"k74", "x":6.1, "y":4.3, "w":0.8, "h":0.8},
{"label":"k73", "x":8.1, "y":4.3, "w":0.8, "h":0.8},
{"label":"k31", "x":9.1, "y":4.3, "w":0.8, "h":0.8},
{"label":"k32", "x":10.1, "y":4.3, "w":0.8, "h":0.8}
]
}
}
}
+17
View File
@@ -0,0 +1,17 @@
/* Copyright 2020 yfuku
*
* 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 "rev2.h"
+46
View File
@@ -0,0 +1,46 @@
/* Copyright 2020 yfuku
*
* 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 is 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( \
k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \
k10, k11, k12, k13, k14, k15, k30, k50, k51, k52, k53, k54, k55, \
k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \
k33, k34, k35, k70, k71, k72, \
k75, k74, k73, k31, k32 \
) { \
{ k00, k01, k02, k03, k04, k05 }, \
{ k10, k11, k12, k13, k14, k15 }, \
{ k20, k21, k22, k23, k24, k25 }, \
{ k30, k31, k32, k33, k34, k35 }, \
{ k40, k41, k42, k43, k44, k45 }, \
{ k50, k51, k52, k53, k54, k55 }, \
{ k60, k61, k62, k63, k64, k65 }, \
{ k70, k71, k72, k73, k74, k75 }, \
}
+1
View File
@@ -0,0 +1 @@
+2
View File
@@ -30,3 +30,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6 AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs HD44780_ENABLE = no # Enable support for HD44780 based LCDs
DEFAULT_FOLDER = bat43/rev2
+11 -10
View File
@@ -5,23 +5,24 @@
"width": 4, "width": 4,
"height": 3, "height": 3,
"layouts": { "layouts": {
"LAYOUT": { "LAYOUT": {
"layout": [ "layout": [
{ "label": "K01", "x": 0, "y": 0 }, { "label": "K01", "x": 0, "y": 0 },
{ "label": "K02", "x": 1, "y": 0 }, { "label": "K02", "x": 1, "y": 0 },
{ "label": "K03", "x": 2, "y": 0 }, { "label": "K03", "x": 2, "y": 0 },
{ "label": "K04", "x": 3, "y": 0 },
{ "label": "K04", "x": 0, "y": 1 }, { "label": "K05", "x": 0, "y": 1 },
{ "label": "K05", "x": 1, "y": 1 }, { "label": "K06", "x": 1, "y": 1 },
{ "label": "K06", "x": 2, "y": 1 }, { "label": "K07", "x": 2, "y": 1 },
{ "label": "K08", "x": 3, "y": 1 },
{ "label": "K07", "x": 0, "y": 2 }, { "label": "K09", "x": 0, "y": 2 },
{ "label": "K08", "x": 1, "y": 2 }, { "label": "K10", "x": 1, "y": 2 },
{ "label": "K09", "x": 2, "y": 2 }, { "label": "K11", "x": 2, "y": 2 },
{ "label": "K12", "x": 3, "y": 2 }
{ "label": "K10", "x": 0, "y": 3 },
{ "label": "K11", "x": 1, "y": 3 },
{ "label": "K12", "x": 2, "y": 3 }
] ]
} }
} }
@@ -1,9 +1,10 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#define _MAIN 0 enum layers {
#define _RAISE 1 _MAIN,
#define _LOWER 2 _RAISE,
_LOWER,
};
// Readability keycodes // Readability keycodes
#define LOWER MO(_LOWER) #define LOWER MO(_LOWER)
+2 -1
View File
@@ -1,5 +1,6 @@
# 3x4 # 3x4
![Boardsource 3x4 macro](https://i.imgur.com/EiPF1hh.jpg)
![Boardsource 3x4 macro](https://i.imgur.com/EiPF1hhl.jpg)
this macro pad / small 12 key was inspired by the plaid look this macro pad / small 12 key was inspired by the plaid look
+1
View File
@@ -0,0 +1 @@
#include "4x12.h"
+14
View File
@@ -0,0 +1,14 @@
#pragma once
#include "quantum.h"
#define LAYOUT_ortho_4x12( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, \
K12, K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, \
K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, \
K36, K37, K38, K39, K40, K41, K42, K43, K44, K45, K46, K47 \
) { \
{K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11}, \
{K12, K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23}, \
{K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35}, \
{K36, K37, K38, K39, K40, K41, K42, K43, K44, K45, K46, K47} \
}
+142
View File
@@ -0,0 +1,142 @@
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xF7E0
#define PRODUCT_ID 0x0412
#define DEVICE_VER 0x0000
#define MANUFACTURER Boardsource
#define PRODUCT 4x12
#define DESCRIPTION 40 percent ortho keyboard
/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 12
#define MATRIX_ROW_PINS { D2, D3, D1, D0}
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, B5, B4, E6, D7 }
#define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
/* 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.
*
*/
/* 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_HELP1 H
//#define MAGIC_KEY_HELP2 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_ALT1 ESC
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
//#define MAGIC_KEY_LAYER0 0
//#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 PAUSE
//#define MAGIC_KEY_LOCK CAPS
//#define MAGIC_KEY_EEPROM E
//#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
+64
View File
@@ -0,0 +1,64 @@
{
"keyboard_name": "Boardsource 4x12",
"url": "https://boardsource.xyz",
"maintainer": "Boardsource",
"width": 12,
"height": 4,
"layouts": {
"LAYOUT_ortho_4x12": {
"layout": [
{ "label": "K01", "x": 0, "y": 0 },
{ "label": "K02", "x": 1, "y": 0 },
{ "label": "K03", "x": 2, "y": 0 },
{ "label": "K04", "x": 3, "y": 0 },
{ "label": "K05", "x": 4, "y": 0 },
{ "label": "K06", "x": 5, "y": 0 },
{ "label": "K07", "x": 6, "y": 0 },
{ "label": "K08", "x": 7, "y": 0 },
{ "label": "K09", "x": 8, "y": 0 },
{ "label": "K010", "x": 9, "y": 0 },
{ "label": "K011", "x": 10, "y": 0 },
{ "label": "K012", "x": 11, "y": 0 },
{ "label": "K11", "x": 0, "y": 1 },
{ "label": "K12", "x": 1, "y": 1 },
{ "label": "K13", "x": 2, "y": 1 },
{ "label": "K14", "x": 3, "y": 1 },
{ "label": "K15", "x": 4, "y": 1 },
{ "label": "K16", "x": 5, "y": 1 },
{ "label": "K17", "x": 6, "y": 1 },
{ "label": "K18", "x": 7, "y": 1 },
{ "label": "K19", "x": 8, "y": 1 },
{ "label": "K110", "x": 9, "y": 1 },
{ "label": "K111", "x": 10, "y": 1 },
{ "label": "K112", "x": 11, "y": 1 },
{ "label": "K21", "x": 0, "y": 2 },
{ "label": "K22", "x": 1, "y": 2 },
{ "label": "K23", "x": 2, "y": 2 },
{ "label": "K24", "x": 3, "y": 2 },
{ "label": "K25", "x": 4, "y": 2 },
{ "label": "K26", "x": 5, "y": 2 },
{ "label": "K27", "x": 6, "y": 2 },
{ "label": "K28", "x": 7, "y": 2 },
{ "label": "K29", "x": 8, "y": 2 },
{ "label": "K210", "x": 9, "y": 2 },
{ "label": "K211", "x": 10, "y": 2 },
{ "label": "K212", "x": 11, "y": 2 },
{ "label": "K31", "x": 0, "y": 3 },
{ "label": "K32", "x": 1, "y": 3 },
{ "label": "K33", "x": 2, "y": 3 },
{ "label": "K34", "x": 3, "y": 3 },
{ "label": "K35", "x": 4, "y": 3 },
{ "label": "K36", "x": 5, "y": 3 },
{ "label": "K37", "x": 6, "y": 3 },
{ "label": "K38", "x": 7, "y": 3 },
{ "label": "K39", "x": 8, "y": 3 },
{ "label": "K310", "x": 9, "y": 3 },
{ "label": "K311", "x": 10, "y": 3 },
{ "label": "K312", "x": 11, "y": 3 }
]
}
}
}
@@ -0,0 +1,36 @@
#include QMK_KEYBOARD_H
enum layers {
_MAIN,
_RAISE,
_LOWER,
};
// Readability keycodes
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_MAIN] = LAYOUT_ortho_4x12(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_ESC, 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_ENT ,
KC_PIPE, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
[_RAISE] = LAYOUT_ortho_4x12(
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
[_LOWER] = LAYOUT_ortho_4x12(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
)
};
+12
View File
@@ -0,0 +1,12 @@
# 4x12
![boardsource 4x12](https://i.imgur.com/rVtAEq5.jpg)
* Keyboard Maintainer: [Boardsource](https://github.com/daysgobye)
* Hardware Supported: 4x12 v1
* Hardware Availability: this keyboard is available from the [Boardsource store](https://boardsource.xyz/store/5ecb7dad86879c9a0c22db32)
Make example for this keyboard (after setting up your build environment):
make boardsource/4x12: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).
+32
View File
@@ -0,0 +1,32 @@
# 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 = caterina
# 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 = yes # Console for debug
COMMAND_ENABLE = yes # 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
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
LAYOUTS = ortho_4x12
@@ -24,23 +24,41 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
enum layer_names { enum layer_names {
_BASE, _BASE,
_FN1, _FN1,
_FN2,
_FN3
}; };
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT_default( [_BASE] = LAYOUT_default(
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_GRV, KC_BSLS, 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_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_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_BSLS, KC_DEL,
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_NUBS, KC_ENT, KC_PGUP, 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_NUBS, KC_ENT, KC_PGUP,
KC_LSFT, KC_NUHS, 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_LSFT, KC_NUHS, 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
), ),
[_FN1] = LAYOUT_default( [_FN1] = LAYOUT_default(
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_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_TRNS, KC_TRNS, KC_UP, 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_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, 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_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
BL_INC, BL_DEC, BL_TOGG, 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_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[_FN2] = LAYOUT_default(
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, 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, KC_TRNS, KC_TRNS, KC_TRNS
),
[_FN3] = LAYOUT_default(
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, 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, KC_TRNS, KC_TRNS, KC_TRNS
) )
}; };
@@ -1,5 +1,2 @@
# rules.mk overrides to enable VIA VIA_ENABLE = yes
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
+13 -13
View File
@@ -14,20 +14,20 @@ BOOTLOADER = halfkay
# Build Options # Build Options
# change yes to no to disable # change yes to no to disable
# #
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE ?= yes # Mouse keys MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE ?= yes # Audio control and System control EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE ?= yes # Console for debug CONSOLE_ENABLE = yes # Console for debug
COMMAND_ENABLE ?= yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend 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 # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE ?= no # USB Nkey Rollover NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
MIDI_ENABLE ?= no # MIDI support MIDI_ENABLE = no # MIDI support
UNICODE_ENABLE ?= no # Unicode UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE ?= no # Audio output on port C6 AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
LAYOUTS = numpad_5x4 LAYOUTS = numpad_5x4
+37
View File
@@ -0,0 +1,37 @@
/*
Copyright 2020 AAClawson (AlisGraveNil)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x17B9
#define DEVICE_VER 0x0001
#define MANUFACTURER AlisGraveNil
#define PRODUCT GameBuddy
#define DESCRIPTION A 26-key QMK-powered macropad designed for gaming!
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 7
#define MATRIX_ROW_PINS { D1, D0, E6, B3, B2 }
#define MATRIX_COL_PINS { F5, F6, F7, B1, C6, D7, B6 }
#define DIODE_DIRECTION COL2ROW
+16
View File
@@ -0,0 +1,16 @@
/* Copyright 2020 AAClawson (AlisGraveNil)
*
* 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 "gamebuddy.h"
+32
View File
@@ -0,0 +1,32 @@
/* Copyright 2020 AAClawson (AlisGraveNil)
*
* 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"
#define LAYOUT( \
K00, K01, K02, K03, K04, K05, \
K10, K11, K12, K13, K14, K15, \
K20, K22, K23, K24, K25, \
K30, K31, K32, K33, K34, K35, K46, \
K44, K45 \
) { \
{ K00, K01, K02, K03, K04, K05, KC_NO }, \
{ K10, K11, K12, K13, K14, K15, KC_NO }, \
{ K20, KC_NO, K22, K23, K24, K25, KC_NO }, \
{ K30, K31, K32, K33, K34, K35, KC_NO }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, K44, K45, K46 }, \
}
+41
View File
@@ -0,0 +1,41 @@
{
"keyboard_name": "GameBuddy",
"url": "",
"maintainer": "qmk",
"width": 7,
"height": 5,
"layouts": {
"LAYOUT": {
"layout": [
{"label":"K00 (D1,F5)", "x":0, "y":0},
{"label":"K01 (D1,F6)", "x":1, "y":0},
{"label":"K02 (D1,F7)", "x":2, "y":0},
{"label":"K03 (D1,B1)", "x":3, "y":0},
{"label":"K04 (D1,C6)", "x":4, "y":0},
{"label":"K05 (D1,D7)", "x":5, "y":0},
{"label":"K10 (D0,F5)", "x":0, "y":1},
{"label":"K11 (D0,F6)", "x":1, "y":1},
{"label":"K12 (D0,F7)", "x":2, "y":1},
{"label":"K13 (D0,B1)", "x":3, "y":1},
{"label":"K14 (D0,C6)", "x":4, "y":1},
{"label":"K15 (D0,D7)", "x":5, "y":1},
{"label":"K20 (E6,F5)", "x":0, "y":2, "w":2},
{"label":"K22 (E6,F7)", "x":2, "y":2},
{"label":"K23 (E6,B1)", "x":3, "y":2},
{"label":"K24 (E6,C6)", "x":4, "y":2},
{"label":"K25 (E6,D7)", "x":5, "y":2},
{"label":"K30 (B3,F5)", "x":0, "y":3},
{"label":"K31 (B3,F6)", "x":1, "y":3},
{"label":"K32 (B3,F7)", "x":2, "y":3},
{"label":"K33 (B3,B1)", "x":3, "y":3},
{"label":"K34 (B3,C6)", "x":4, "y":3},
{"label":"K35 (B3,D7)", "x":5, "y":3},
{"label":"K46 (B2,B6)", "x":6, "y":3, "h":2},
{"label":"K44 (B2,C6)", "x":4, "y":4},
{"label":"K45 (B2,D7)", "x":5, "y":4}
]
}
}
,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/"
}
@@ -0,0 +1,41 @@
/* Copyright 2020 AAClawson (AlisGraveNil)
*
* 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] = {
/*
* -------------------------------
* |ESC | 1 | 2 | 3 | 4 | 5 |
* -------------------------------
* |TAB | V | Q | W | E | R |
* ------------------------------|
* |LSFT | A | S | D | G |
* ------------------------------------
* |LCTL| N | X | F | C | M |SPC |
* ------------------------------| |
* |LALT|LGUI| |
* ----------------
*/
[0] = LAYOUT(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5,
KC_TAB, KC_V, KC_Q, KC_W, KC_E, KC_R,
KC_LSFT, KC_A, KC_S, KC_D, KC_G,
KC_LCTL, KC_N, KC_X, KC_F, KC_C, KC_M, KC_SPC,
KC_LALT, KC_LGUI
),
};
+13
View File
@@ -0,0 +1,13 @@
# GameBuddy
This is a 5x7 macropad designed for left-hand usage for videogames, with special focus on FPS layouts!
* Keyboard Maintainer: [AAClawson](https://github.com/AlisGraveNil)
* Hardware Supported: GameBuddy, Pro Micro, Elite-C
* Hardware Availability: www.clawboards.xyz
Make example for this keyboard (after setting up your build environment):
make clawsome/gamebuddy: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).
+25
View File
@@ -0,0 +1,25 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
BOOTLOADER = caterina
# 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 = yes # Console for debug
COMMAND_ENABLE = yes # 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 = no # 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
File diff suppressed because it is too large. Load diff
+161 -7
View File
@@ -1,11 +1,165 @@
{ {
"layouts": { "keyboard_name": "Clueboard 66% HotSwap Gen1",
"LAYOUT": { "maintainer": "skullydazed",
"layout": [{"x": 0, "y": 0, "w": 1, "label": "GRAVE"}, {"x": 1, "y": 0, "w": 1, "label": "1"}, {"x": 2, "y": 0, "w": 1, "label": "2"}, {"x": 3, "y": 0, "w": 1, "label": "3"}, {"x": 4, "y": 0, "w": 1, "label": "4"}, {"x": 5, "y": 0, "w": 1, "label": "5"}, {"x": 6, "y": 0, "w": 1, "label": "6"}, {"x": 7, "y": 0, "w": 1, "label": "7"}, {"x": 8, "y": 0, "w": 1, "label": "8"}, {"x": 9, "y": 0, "w": 1, "label": "9"}, {"x": 10, "y": 0, "w": 1, "label": "0"}, {"x": 11, "y": 0, "w": 1, "label": "DASH"}, {"x": 12, "y": 0, "w": 1, "label": "EQUALSIGN"}, {"x": 13, "y": 0, "w": 1, "label": "YEN"}, {"x": 14, "y": 0, "w": 1, "label": "BACKSPACE"}, {"x": 15.5, "y": 0, "w": 1, "label": "PAGEUP"}, {"x": 0, "y": 1, "w": 1.5, "label": "TAB"}, {"x": 1.5, "y": 1, "w": 1, "label": "Q"}, {"x": 2.5, "y": 1, "w": 1, "label": "W"}, {"x": 3.5, "y": 1, "w": 1, "label": "E"}, {"x": 4.5, "y": 1, "w": 1, "label": "R"}, {"x": 5.5, "y": 1, "w": 1, "label": "T"}, {"x": 6.5, "y": 1, "w": 1, "label": "Y"}, {"x": 7.5, "y": 1, "w": 1, "label": "U"}, {"x": 8.5, "y": 1, "w": 1, "label": "I"}, {"x": 9.5, "y": 1, "w": 1, "label": "O"}, {"x": 10.5, "y": 1, "w": 1, "label": "P"}, {"x": 11.5, "y": 1, "w": 1, "label": "LBRACKET"}, {"x": 12.5, "y": 1, "w": 1, "label": "RBRACKET"}, {"x": 13.5, "y": 1, "w": 1.5, "label": "BACKSLASH"}, {"x": 15.5, "y": 1, "w": 1, "label": "PAGEDOWN"}, {"x": 0, "y": 2, "w": 1.75, "label": "CAPSLOCK"}, {"x": 1.75, "y": 2, "w": 1, "label": "A"}, {"x": 2.75, "y": 2, "w": 1, "label": "S"}, {"x": 3.75, "y": 2, "w": 1, "label": "D"}, {"x": 4.75, "y": 2, "w": 1, "label": "F"}, {"x": 5.75, "y": 2, "w": 1, "label": "G"}, {"x": 6.75, "y": 2, "w": 1, "label": "H"}, {"x": 7.75, "y": 2, "w": 1, "label": "J"}, {"x": 8.75, "y": 2, "w": 1, "label": "K"}, {"x": 9.75, "y": 2, "w": 1, "label": "L"}, {"x": 10.75, "y": 2, "w": 1, "label": "SEMICOLON"}, {"x": 11.75, "y": 2, "w": 1, "label": "QUOTE"}, {"x": 13.75, "y": 2, "w": 1.25, "label": "ENTER"}, {"x": 0, "y": 3, "w": 1.25, "label": "LSHIFT"}, {"x": 2.25, "y": 3, "w": 1, "label": "Z"}, {"x": 3.25, "y": 3, "w": 1, "label": "X"}, {"x": 4.25, "y": 3, "w": 1, "label": "C"}, {"x": 5.25, "y": 3, "w": 1, "label": "V"}, {"x": 6.25, "y": 3, "w": 1, "label": "B"}, {"x": 7.25, "y": 3, "w": 1, "label": "N"}, {"x": 8.25, "y": 3, "w": 1, "label": "M"}, {"x": 9.25, "y": 3, "w": 1, "label": "COMMA"}, {"x": 10.25, "y": 3, "w": 1, "label": "PERIOD"}, {"x": 11.25, "y": 3, "w": 1, "label": "SLASH"}, {"x": 13.25, "y": 3, "w": 1.25, "label": "RSHIFT"}, {"x": 14.5, "y": 3, "w": 1, "label": "UP"}, {"x": 0, "y": 4, "w": 1.25, "label": "LCTRL"}, {"x": 1.25, "y": 4, "w": 1, "label": "LALT"}, {"x": 2.25, "y": 4, "w": 1.25, "label": "LCMD"}, {"x": 3.5, "y": 4, "w": 1.25, "label": "MUHENKAN"}, {"x": 4.75, "y": 4, "w": 2, "label": "SPACE1"}, {"x": 6.75, "y": 4, "w": 2, "label": "SPACE2"}, {"x": 8.75, "y": 4, "w": 1.25, "label": "HENKAN"}, {"x": 10, "y": 4, "w": 1.25, "label": "RCMD"}, {"x": 11.25, "y": 4, "w": 1, "label": "RCTRL"}, {"x": 12.25, "y": 4, "w": 1.25, "label": "FN"}, {"x": 13.5, "y": 4, "w": 1, "label": "LEFT"}, {"x": 14.5, "y": 4, "w": 1, "label": "DOWN"}, {"x": 15.5, "y": 4, "w": 1, "label": "RIGHT"}] "width": 16.5,
}, "height": 5,
"layouts": {
"LAYOUT": {
"layout": [
{"x": 0, "y": 0},
{"x": 1, "y": 0},
{"x": 2, "y": 0},
{"x": 3, "y": 0},
{"x": 4, "y": 0},
{"x": 5, "y": 0},
{"x": 6, "y": 0},
{"x": 7, "y": 0},
{"x": 8, "y": 0},
{"x": 9, "y": 0},
{"x": 10, "y": 0},
{"x": 11, "y": 0},
{"x": 12, "y": 0},
{"x": 13, "y": 0, "w": 2},
"LAYOUT_66_ansi": { {"x": 15.5, "y": 0},
"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}, {"x":15.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15.5, "y":1}, {"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.25}, {"x":14.5, "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, "w":1.25}, {"label":"Win", "x":11.25, "y":4}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}]
{"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.5, "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": 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.25},
{"x": 14.5, "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": 2.75},
{"x": 6.5, "y": 4, "w": 2.25},
{"x": 8.75, "y": 4, "w": 1.25},
{"x": 10, "y": 4, "w": 1.25},
{"x": 11.25, "y": 4},
{"x": 12.25, "y": 4, "w": 1.25},
{"x": 13.5, "y": 4},
{"x": 14.5, "y": 4},
{"x": 15.5, "y": 4}
]
},
"LAYOUT_66_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.5, "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.5, "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": 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.25},
{"x": 14.5, "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, "w": 1.25},
{"x": 11.25, "y": 4},
{"x": 12.25, "y": 4, "w": 1.25},
{"x": 13.5, "y": 4},
{"x": 14.5, "y": 4},
{"x": 15.5, "y": 4}
]
}
} }
}
} }
+1 -1
View File
@@ -21,4 +21,4 @@ AUDIO_ENABLE = yes
# project specific files # project specific files
SRC = led.c SRC = led.c
LAYOUTS += 66_ansi LAYOUTS = 66_ansi
-25
View File
@@ -1,25 +0,0 @@
{
"keyboard_name": "Clueboard 66% HotSwap",
"width": 16.5,
"height": 5,
"layouts": {
"LAYOUT": {
"layout": [
{"x": 0, "y": 0, "label": "GRAVE"}, {"x": 1, "y": 0, "label": "1"}, {"x": 2, "y": 0, "label": "2"}, {"x": 3, "y": 0, "label": "3"}, {"x": 4, "y": 0, "label": "4"}, {"x": 5, "y": 0, "label": "5"}, {"x": 6, "y": 0, "label": "6"}, {"x": 7, "y": 0, "label": "7"}, {"x": 8, "y": 0, "label": "8"}, {"x": 9, "y": 0, "label": "9"}, {"x": 10, "y": 0, "label": "0"}, {"x": 11, "y": 0, "label": "DASH"}, {"x": 12, "y": 0, "label": "EQUALSIGN"}, {"x": 13, "y": 0, "w": 2, "label": "BACKSPACE"}, {"x": 15.5, "y": 0, "label": "PAGEUP"},
{"x": 0, "y": 1, "w": 1.5, "label": "TAB"}, {"x": 1.5, "y": 1, "label": "Q"}, {"x": 2.5, "y": 1, "label": "W"}, {"x": 3.5, "y": 1, "label": "E"}, {"x": 4.5, "y": 1, "label": "R"}, {"x": 5.5, "y": 1, "label": "T"}, {"x": 6.5, "y": 1, "label": "Y"}, {"x": 7.5, "y": 1, "label": "U"}, {"x": 8.5, "y": 1, "label": "I"}, {"x": 9.5, "y": 1, "label": "O"}, {"x": 10.5, "y": 1, "label": "P"}, {"x": 11.5, "y": 1, "label": "LBRACKET"}, {"x": 12.5, "y": 1, "label": "RBRACKET"}, {"x": 13.5, "y": 1, "w": 1.5, "label": "BACKSLASH"}, {"x": 15.5, "y": 1, "label": "PAGEDOWN"},
{"x": 0, "y": 2, "w": 1.75, "label": "CAPS LOCK"}, {"x": 1.75, "y": 2, "label": "A"}, {"x": 2.75, "y": 2, "label": "S"}, {"x": 3.75, "y": 2, "label": "D"}, {"x": 4.75, "y": 2, "label": "F"}, {"x": 5.75, "y": 2, "label": "G"}, {"x": 6.75, "y": 2, "label": "H"}, {"x": 7.75, "y": 2, "label": "J"}, {"x": 8.75, "y": 2, "label": "K"}, {"x": 9.75, "y": 2, "label": "L"}, {"x": 10.75, "y": 2, "label": "SEMICOLON"}, {"x": 11.75, "y": 2, "label": "QUOTE"}, {"x": 12.75, "y": 2, "w": 2.25, "label": "ENTER"},
{"x": 0, "y": 3, "w": 2.25, "label": "LSHIFT"}, {"x": 2.25, "y": 3, "label": "Z"}, {"x": 3.25, "y": 3, "label": "X"}, {"x": 4.25, "y": 3, "label": "C"}, {"x": 5.25, "y": 3, "label": "V"}, {"x": 6.25, "y": 3, "label": "B"}, {"x": 7.25, "y": 3, "label": "N"}, {"x": 8.25, "y": 3, "label": "M"}, {"x": 9.25, "y": 3, "label": "COMMA"}, {"x": 10.25, "y": 3, "label": "PERIOD"}, {"x": 11.25, "y": 3, "label": "SLASH"}, {"x": 12.25, "y": 3, "w": 2.25, "label": "RSHIFT"}, {"x": 14.5, "y": 3, "label": "UP"},
{"x": 0, "y": 4, "w": 1.25, "label": "LCTRL"}, {"x": 1.25, "y": 4, "w": 1.25, "label": "LGUI"}, {"x": 2.5, "y": 4, "w": 1.25, "label": "LALT"}, {"x": 3.75, "y": 4, "w": 2.75, "label": "SPACE1"}, {"x": 6.5, "y": 4, "w": 2.25, "label": "SPACE2"}, {"x": 8.75, "y": 4, "w": 1.25, "label": "RGUI"}, {"x": 10, "y": 4, "w": 1.25, "label": "RALT"}, {"x": 11.25, "y": 4, "label": "FN"}, {"x": 12.25, "y": 4, "w": 1.25, "label": "RCTRL"}, {"x": 13.5, "y": 4, "label": "LEFT"}, {"x": 14.5, "y": 4, "label": "DOWN"}, {"x": 15.5, "y": 4, "label": "RIGHT"}
]
},
"LAYOUT_66_ansi": {
"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": "PAGEUP", "x": 15.5, "y": 0},
{"label": "Tab", "x": 0, "y": 1, "w": 1.5}, {"label": "Q", "x": 1.5, "y": 1}, {"label": "W", "x": 2.5, "y": 1}, {"label": "E", "x": 3.5, "y": 1}, {"label": "R", "x": 4.5, "y": 1}, {"label": "T", "x": 5.5, "y": 1}, {"label": "Y", "x": 6.5, "y": 1}, {"label": "U", "x": 7.5, "y": 1}, {"label": "I", "x": 8.5, "y": 1}, {"label": "O", "x": 9.5, "y": 1}, {"label": "P", "x": 10.5, "y": 1}, {"label": "{", "x": 11.5, "y": 1}, {"label": "}", "x": 12.5, "y": 1}, {"label": "|", "x": 13.5, "y": 1, "w": 1.5}, {"label": "PAGEDOWN", "x": 15.5, "y": 1},
{"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": "SEMICOLON", "x": 10.75, "y": 2}, {"label": "QUOTE", "x": 11.75, "y": 2}, {"label": "ENTER", "x": 12.75, "y": 2, "w": 2.25},
{"label": "LSHIFT", "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": "COMMA", "x": 9.25, "y": 3}, {"label": "PERIOD", "x": 10.25, "y": 3}, {"label": "SLASH", "x": 11.25, "y": 3}, {"label": "RSHIFT", "x": 12.25, "y": 3, "w": 2.25}, {"label": "UP", "x": 14.5, "y": 3},
{"label": "LCTRL", "x": 0, "y": 4, "w": 1.25}, {"label": "LGUI", "x": 1.25, "y": 4, "w": 1.25}, {"label": "LALT", "x": 2.5, "y": 4, "w": 1.25}, {"label": "SPACE", "x": 3.75, "y": 4, "w": 6.25}, {"label": "RALT", "x": 10, "y": 4, "w": 1.25}, {"label": "RGUI", "x": 11.25, "y": 4}, {"label": "FN", "x": 12.25, "y": 4, "w": 1.25}, {"label": "LEFT", "x": 13.5, "y": 4}, {"label": "DOWN", "x": 14.5, "y": 4}, {"label": "RIGHT", "x": 15.5, "y": 4}
]
}
}
}
@@ -0,0 +1,245 @@
{
"keyboard_name": "Clueboard 66% HotSwap Prototype",
"maintainer": "skullydazed",
"width": 16.5,
"height": 5,
"layouts": {
"LAYOUT_all": {
"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.5, "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.5, "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": 0, "y": 3, "w": 1.25},
{"x": 1.25, "y": 3},
{"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},
{"x": 13.25, "y": 3, "w": 1.25},
{"x": 14.5, "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": 2.75},
{"x": 6.5, "y": 4, "w": 2.25},
{"x": 8.75, "y": 4, "w": 1.25},
{"x": 10, "y": 4, "w": 1.25},
{"x": 11.25, "y": 4},
{"x": 12.25, "y": 4, "w": 1.25},
{"x": 13.5, "y": 4},
{"x": 14.5, "y": 4},
{"x": 15.5, "y": 4}
]
},
"LAYOUT": {
"layout": [
{"x": 0, "y": 0},
{"x": 1, "y": 0},
{"x": 2, "y": 0},
{"x": 3, "y": 0},
{"x": 4, "y": 0},
{"x": 5, "y": 0},
{"x": 6, "y": 0},
{"x": 7, "y": 0},
{"x": 8, "y": 0},
{"x": 9, "y": 0},
{"x": 10, "y": 0},
{"x": 11, "y": 0},
{"x": 12, "y": 0},
{"x": 13, "y": 0, "w": 2},
{"x": 15.5, "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.5, "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": 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.25},
{"x": 14.5, "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": 2.75},
{"x": 6.5, "y": 4, "w": 2.25},
{"x": 8.75, "y": 4, "w": 1.25},
{"x": 10, "y": 4, "w": 1.25},
{"x": 11.25, "y": 4},
{"x": 12.25, "y": 4, "w": 1.25},
{"x": 13.5, "y": 4},
{"x": 14.5, "y": 4},
{"x": 15.5, "y": 4}
]
},
"LAYOUT_66_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.5, "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.5, "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": 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.25},
{"x": 14.5, "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, "w": 1.25},
{"x": 11.25, "y": 4},
{"x": 12.25, "y": 4, "w": 1.25},
{"x": 13.5, "y": 4},
{"x": 14.5, "y": 4},
{"x": 15.5, "y": 4}
]
}
}
}
+11 -1
View File
@@ -121,7 +121,17 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
} }
#ifdef OLED_DRIVER_ENABLE #ifdef OLED_DRIVER_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } oled_rotation_t oled_init_user(oled_rotation_t rotation) {
# ifndef SPLIT_KEYBOARD
if (is_master) {
# endif
return OLED_ROTATION_270;
# ifndef SPLIT_KEYBOARD
} else {
return rotation;
}
# endif
}
#endif #endif
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
+16
View File
@@ -0,0 +1,16 @@
# Gotham's custom CRKBD Layout
My take on the 40% layout with programming in mind. Do read about the layers, it helps with forming a mental model to remember the keymap better than just memorization.
## Layers
- QWERTY: Base layer. The idea is to reduce thumb movement by placing commonly used keys and layers on resting thumb positions (center thumb keys). You might need to play around with TAPPING_TERM to find your perfect setting. Also, both Lower and Raise buttons appear on both halves for easy access (think of it as: middle thumb key is Lower, outer thumb key is Raise).
- LOWER: Numbers, common symbols and navigation. Easiest layer to reach (middle thumb button on both halves). The nav is shaped as a T instead of an inverted T for a few reasons. First, Left and Right needed to be on the home row (since I use them a lot to navigate through code). But the Up key can't be on the top row because numbers occupy that space. So I moved the Up and Down keys one key down. It takes some getting used to, but I find this a great balance without separating the nav and number rows. The nav cluster also contains Home and End keys below Left and Right, making it a breeze to navigate through code.
- RAISE: All symbols are here, arranged in a way that can be (kind of) deduced more by logic and less by memory. On the left hand, the first 2 cols contain the symbols for shifted numbers 1-6, with ! and @ in the home row instead of the top row. Think of the 3 rows as symbols for 3 and 4, 1 and 2, 5 and 6). The next 2 cols contain common brackets. On the right hand is everything else. Note that -, _ and = are close to the home row because of how common they are in code. Operators (&, | and !) are on the top row for convinience. Just try and remember where +, *, < and > located. Admitedlly, the locations for these symbols could use improvement.
- ADJUST: Contains settings and Function keys. This is placed on the bottom-right corner (triggerred by the pinky), since the thumb keys already have multiple uses.
## Custom OLED
This keymap includes custom OLED font and code. The font contains some logos and status indidcators for some of the features I use (RGB and Audio). Enable OLED in rukes.mk to check it out. Feel free to reuse the font or parts of it.
__KNOWN BUG:__ When the computer sleeps, one of the OLEDs is always on (they don't turn off on their own, and the timeout doesn't work). I haven't been able to figure out what's going on there and am open to suggestions/PRs.
## Flashing
Flash using `make crkbd:gotham:avrdude` for Pro Micro and `make crkbd:gotham:dfu` for Elite-C.
+88
View File
@@ -0,0 +1,88 @@
#pragma once
#define EE_HANDS
#define SPLIT_USB_DETECT
#undef USE_I2C
#undef SSD1306OLED
#define USE_SERIAL_PD2
#define IGNORE_MOD_TAP_INTERRUPT
#define PERMISSIVE_HOLD
#define TAPPING_TERM 250
#define NO_ACTION_ONESHOT
#ifdef AUDIO_ENABLE
# define B5_AUDIO
# define NO_MUSIC_MODE
# define AUDIO_CLICKY
#endif
#define OLED_FONT_H "keyboards/crkbd/keymaps/gotham/glcdfont.c"
#define RGBLIGHT_SLEEP
#ifdef RGBLIGHT_ENABLE
# undef RGBLED_NUM
# define RGBLED_NUM 6
# define RGBLIGHT_LIMIT_VAL 150
# define RGBLIGHT_HUE_STEP 16
# define RGBLIGHT_SAT_STEP 32
# define RGBLIGHT_VAL_STEP 32
# define RGBLIGHT_EFFECT_RAINBOW_MOOD
# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
# define RGBLIGHT_EFFECT_KNIGHT
#endif
#ifdef RGB_MATRIX_ENABLE
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
# 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 32
# define RGB_MATRIX_SAT_STEP 64
# define RGB_MATRIX_VAL_STEP 64
# define RGB_MATRIX_SPD_STEP 20
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
/* Disable the animations you don'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_BAND_SAT
# define DISABLE_RGB_MATRIX_BAND_VAL
# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
// #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_CYCLE_PINWHEEL
# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL
# 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
+18
View File
@@ -0,0 +1,18 @@
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
// See gfxfont.h for newer custom bitmap font info.
// https://helixfonteditor.netlify.com/
#include "progmem.h"
// 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, 0x60, 0x30, 0x18, 0xF8, 0x18, 0x00, 0xC0, 0x70, 0x1C, 0x06, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0xC3, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x08, 0x00, 0x1C, 0x22, 0x41, 0x41, 0x41, 0x22, 0x1C, 0x00, 0x08, 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0xF8, 0x0C, 0x04, 0xE7, 0xE4, 0xE4, 0x07, 0x04, 0xE4, 0xE7, 0xE4, 0x04, 0x07, 0xE4, 0xE4, 0xE7, 0x04, 0x0C, 0xF8, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x3E, 0x7F, 0x7F, 0x00, 0x14, 0x08, 0x14, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x3E, 0x7F, 0x7F, 0x00, 0x22, 0x1C, 0x41, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 0x0C, 0x06, 0x0C, 0x18, 0x30, 0x77, 0x77, 0x77, 0x00, 0x77, 0x77,
0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x4A, 0x4F, 0x4A, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x60, 0x70, 0x3E, 0x1F, 0x19, 0x18, 0x0C, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x0C, 0x06, 0x07, 0xFC, 0x00, 0xFF, 0x01, 0x00, 0x00, 0x00, 0xFF, 0x80, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x1C, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, 0x1C, 0x22, 0x00, 0x00, 0x1C, 0x3E, 0x7F, 0x63, 0x41, 0x22, 0x1C, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x49, 0xFF, 0x00, 0x00, 0x0F, 0x1F, 0x3F, 0x38, 0x30, 0xFF, 0xFF, 0xFF, 0x30, 0x38, 0x3F, 0x1F, 0x0F, 0x00, 0x00, 0xFF, 0x49, 0x49, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x40, 0x60, 0x6A, 0x64, 0x6A, 0x60, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x42, 0x69, 0x65, 0x65, 0x65, 0x69, 0x42, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x0C, 0x18, 0x30, 0x66, 0x66, 0x66, 0x00, 0x00, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x00, 0x00, 0x00, 0xF0, 0x90, 0x90, 0xF0, 0x90, 0x90, 0xF0, 0x98, 0x9C, 0xF2, 0x22, 0x21, 0xE1, 0x01, 0x01, 0x01, 0xF1, 0x91, 0x91, 0xFA, 0x4C, 0x4C, 0xF8, 0x48, 0x48, 0xF8, 0x48, 0x48, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0E, 0x18, 0x30, 0x21, 0x21, 0x31, 0x18, 0x10, 0x30, 0x20, 0x60, 0x41, 0x60, 0x20, 0x30, 0x18, 0x30, 0x60, 0x40, 0x40, 0x47, 0x4C, 0x48, 0x68, 0x38, 0x1C, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x63, 0x7F, 0x3E, 0x1C,
0x00, 0x00, 0x22, 0x1C, 0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x0F, 0x18, 0x10, 0x70, 0x10, 0x10, 0x70, 0x10, 0x13, 0x73, 0x13, 0x10, 0x70, 0x10, 0x10, 0x70, 0x10, 0x18, 0x0F, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x22, 0xC9, 0xD1, 0xC9, 0x22, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x38, 0xFC, 0xED, 0xFC, 0x38, 0x02, 0x10, 0x00, 0x00, 0x08, 0x0C, 0x7E, 0x7F, 0x7E, 0x0C, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x09, 0x09, 0x09, 0x0F, 0x09, 0x09, 0x0F, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0F, 0x09, 0x09, 0x0F, 0x09, 0x09, 0x09, 0x0F, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x07, 0x04, 0x04, 0x07, 0x04, 0x04, 0x0F, 0x09, 0x09, 0x0F, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x07, 0x02, 0x02, 0x03, 0x02, 0x02, 0x03, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
+28
View File
@@ -0,0 +1,28 @@
#pragma once
enum layers {
_QWERTY,
_LOWER,
_RAISE,
_ADJUST,
};
enum custom_keycodes { QWERTY = SAFE_RANGE, LOWER, RAISE, ADJUST, RGBRST };
#define SFT_EQ MT(MOD_LSFT, KC_EQL)
#define SFT_QT MT(MOD_RSFT, KC_QUOT)
#define SFT_A MT(MOD_LSFT, KC_A)
#define CTL_Z MT(MOD_LCTL, KC_Z)
#define SFT_SCLN MT(MOD_RSFT, KC_SCLN)
#define CTL_SLSH MT(MOD_RCTL, KC_SLSH)
#define LOW_SPC LT(_LOWER, KC_SPC)
#define RAI_EQ LT(_RAISE, KC_EQL)
#define RAI_ENT LT(_RAISE, KC_ENT)
#define LOW_BSP LT(_LOWER, KC_BSPC)
#define LOW_DEL LT(_LOWER, KC_DEL)
#define ADJ_GRV LT(_ADJUST, KC_GRV)
#define KC_ANGL LSFT(KC_COMM)
#define KC_ANGR LSFT(KC_DOT)
+143
View File
@@ -0,0 +1,143 @@
#include QMK_KEYBOARD_H
#include "keycodes.h"
#ifdef OLED_DRIVER_ENABLE
# include "oled.c"
#endif
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
# include "rgb.c"
#endif
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT(
//|-----------------------------------------------------| |-----------------------------------------------------|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
SFT_EQ, SFT_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SFT_SCLN,SFT_QT,
//---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LCTL, CTL_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, CTL_SLSH,ADJ_GRV,
//---------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LALT, LOW_SPC, RAI_EQ, RAI_ENT, LOW_BSP, KC_LGUI
//|--------------------------| |--------------------------|
),
[_LOWER] = LAYOUT(
//|-----------------------------------------------------| |-----------------------------------------------------|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
_______, KC_ANGL, KC_ANGR, KC_LPRN, KC_RPRN, KC_PGUP, KC_MINS, KC_LEFT, KC_UP, KC_RIGHT,KC_PLUS, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
_______, XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_PGDOWN, KC_UNDS, KC_HOME, KC_DOWN, KC_END, XXXXXXX, _______,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, LOW_DEL, _______
//|--------------------------| |--------------------------|
),
[_RAISE] = LAYOUT(
//|-----------------------------------------------------| |-----------------------------------------------------|
KC_ESC, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, XXXXXXX, XXXXXXX, KC_AMPR, KC_PIPE, KC_EXLM, KC_ASTR, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
_______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, XXXXXXX, XXXXXXX, KC_UNDS, KC_EQL, KC_ANGL, KC_ANGR, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
_______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_MINS, KC_PLUS, XXXXXXX, KC_BSLS, _______,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______
//|--------------------------| |--------------------------|
),
[_ADJUST] = LAYOUT(
//|-----------------------------------------------------| |-----------------------------------------------------|
XXXXXXX, CK_RST, CK_DOWN, CK_UP, CK_TOGG, RGB_TOG, MU_TOG, KC_F12, KC_F7, KC_F8, KC_F9, XXXXXXX,\
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, RGB_MOD, MU_MOD, KC_F11, KC_F4, KC_F5, KC_F6, RESET, \
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, RGBRST, AU_TOG, KC_F10, KC_F1, KC_F2, KC_F3, _______,\
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, KC_VOLD, KC_VOLU \
//|--------------------------| |--------------------------|
)
};
// clang-format off
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
layer_state_t layer_state_set_user(layer_state_t state) {
/* For any layer other than default, save current RGB state and switch to layer-based RGB */
if (layer_state_cmp(state, 0)) {
restore_rgb_config();
} else {
uint8_t layer = get_highest_layer(state);
if (layer_state_cmp(layer_state, 0)) save_rgb_config();
rgb_by_layer(layer);
}
return state;
}
#endif
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef OLED_DRIVER_ENABLE
if (record->event.pressed) {
oled_timer = timer_read();
add_keylog(keycode);
}
#endif
switch (keycode) {
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
} else {
layer_off(_LOWER);
}
return false;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
} else {
layer_off(_RAISE);
}
return false;
case ADJUST:
if (record->event.pressed) {
layer_on(_ADJUST);
} else {
layer_off(_ADJUST);
}
return false;
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
case RGB_MOD:
case RGB_TOG:
case RGB_HUI:
case RGB_HUD:
case RGB_SAI:
case RGB_SAD:
case RGB_VAI:
case RGB_VAD:
case RGB_SPI:
case RGB_SPD:
/* Override layer-based RGB and resume RGB effect to be able to preview changes */
if (record->event.pressed) {
restore_rgb_config();
process_rgb(keycode, record);
save_rgb_config();
}
return false;
case RGBRST:
if (record->event.pressed) {
# ifdef RGBLIGHT_ENABLE
eeconfig_update_rgblight_default();
rgblight_enable();
# elif RGB_MATRIX_ENABLE
eeconfig_update_rgb_matrix_default();
rgb_matrix_enable();
# endif
save_rgb_config();
}
return false;
#endif
}
return true;
}
+265
View File
@@ -0,0 +1,265 @@
#pragma once
extern uint8_t is_master;
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
# include "rgb.c"
#endif
#ifdef AUDIO_ENABLE
extern audio_config_t audio_config;
#endif
// 5x3 Logos
void render_corne_logo(void) {
static const char PROGMEM font_logo[16] = {0x80, 0x81, 0x82, 0x83, 0x84, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0};
oled_write_P(font_logo, false);
};
void render_qmk_logo(void) {
static const char PROGMEM font_qmk_logo[16] = {0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0};
oled_write_P(font_qmk_logo, false);
};
// 5x2 Keyboard, Controller logos
void render_keyboard(void) {
static const char PROGMEM font_keyboard[11] = {0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0};
oled_write_P(font_keyboard, false);
};
void render_kb_split(void) {
static const char PROGMEM font_kb_split[11] = {0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0};
oled_write_P(font_kb_split, false);
};
// 5x1 Layer indicator
void render_layer(void) {
static const char PROGMEM font_layer[4][6] = {
{0x85, 0x86, 0x87, 0x88, 0x89, 0},
{0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0},
{0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0},
{0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0},
};
uint8_t layer = 0;
if (layer_state_is(_LOWER)) {
layer = 1;
} else if (layer_state_is(_RAISE)) {
layer = 2;
} else if (layer_state_is(_ADJUST)) {
layer = 3;
}
oled_write_P(font_layer[layer], false);
};
// 2x1 Audio, clicky and RGB status indicators
#ifdef AUDIO_ENABLE
void render_audio_status(void) {
static const char PROGMEM font_audio_off[3] = {0x8f, 0x90, 0};
static const char PROGMEM font_audio_on[3] = {0x91, 0x92, 0};
oled_write_P(audio_config.enable ? font_audio_on : font_audio_off, false);
};
void render_clicky_status(void) {
static const char PROGMEM font_clicky_off[3] = {0xaf, 0xb0, 0};
static const char PROGMEM font_clicky_on[3] = {0xb1, 0xb2, 0};
oled_write_P(audio_config.clicky_enable ? font_clicky_on : font_clicky_off, false);
};
#endif
#if defined(RGB_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLE)
void render_rgb_status(void) {
static const char PROGMEM font_rgb_off[3] = {0xcf, 0xd0, 0};
static const char PROGMEM font_rgb_on[3] = {0xd1, 0xd2, 0};
# ifdef RGBLIGHT_ENABLE
bool rgb_enabled = rgblight_config.enable;
# elif RGB_MATRIX_ENABLE
bool rgb_enabled = rgb_matrix_config.enable;
# endif
oled_write_P(rgb_enabled ? font_rgb_on : font_rgb_off, false);
};
#endif
// 2x1 Ctrl, Alt, Shift, GUI, Mouse
void render_mod_ctrl(void) {
static const char PROGMEM font_ctrl[3] = {0x93, 0x94, 0};
oled_write_P(font_ctrl, false);
};
void render_mod_alt(void) {
static const char PROGMEM font_alt[3] = {0xb3, 0xb4, 0};
oled_write_P(font_alt, false);
};
void render_mod_shift(void) {
static const char PROGMEM font_shift[3] = {0xd3, 0xd4, 0};
oled_write_P(font_shift, false);
};
void render_mod_gui(void) {
static const char PROGMEM font_gui[3] = {0x95, 0x96, 0};
oled_write_P(font_gui, false);
};
#ifdef MOUSEKEY_ENABLE
void render_mod_mouse(void) {
static const char PROGMEM font_mouse[3] = {0x97, 0x98, 0};
oled_write_P(font_mouse, false);
};
#endif
// 5x2 Mod and feature indicator clusters
void render_mod_status(void) {
#ifdef NO_ACTION_ONESHOT
uint8_t modifiers = get_mods();
#else
uint8_t modifiers = get_mods() | get_oneshot_mods();
#endif
(modifiers & MOD_MASK_CTRL) ? render_mod_ctrl() : oled_write_P(PSTR(" "), false);
oled_write_P(PSTR(" "), false);
(modifiers & MOD_MASK_SHIFT) ? render_mod_shift() : oled_write_P(PSTR(" "), false);
(modifiers & MOD_MASK_ALT) ? render_mod_alt() : oled_write_P(PSTR(" "), false);
oled_write_P(PSTR(" "), false);
(modifiers & MOD_MASK_GUI) ? render_mod_gui() : oled_write_P(PSTR(" "), false);
}
void render_feature_status(void) {
#if defined(RGB_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLE)
render_rgb_status();
#endif
#ifdef AUDIO_ENABLE
oled_write_P(PSTR(" "), false);
render_audio_status();
#endif
};
// Keylogger
#define KEYLOGGER_LENGTH 5
static uint16_t oled_timer = 0;
static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"};
// clang-format off
static const char PROGMEM code_to_name[0xFF] = {
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x
'3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x
']','\\', '#', ';','\'', '`', ',', '.', '/', 128, ' ', ' ', ' ', ' ', ' ', ' ', // 3x
' ', ' ', ' ', ' ', ' ', ' ', 'P', 'S', ' ', ' ', ' ', ' ', 16, ' ', ' ', ' ', // 4x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx
'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx
};
void add_keylog(uint16_t keycode) {
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
keycode = keycode & 0xFF;
} else if (keycode > 0xFF) {
keycode = 0;
}
for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) {
keylog_str[i] = keylog_str[i - 1];
}
if (keycode < (sizeof(code_to_name) / sizeof(char))) {
keylog_str[0] = pgm_read_byte(&code_to_name[keycode]);
}
}
void render_keylogger_status(void) {
oled_write(keylog_str, false);
}
void render_prompt(void) {
bool blink = (timer_read() % 1000) < 500;
if (layer_state_is(_LOWER)) {
oled_write_ln_P(blink ? PSTR("> lo_") : PSTR("> lo "), false);
} else if (layer_state_is(_RAISE)) {
oled_write_ln_P(blink ? PSTR("> hi_") : PSTR("> hi "), false);
} else if (layer_state_is(_ADJUST)) {
oled_write_ln_P(blink ? PSTR("> aj_") : PSTR("> aj "), false);
} else {
oled_write_ln_P(blink ? PSTR("> _ ") : PSTR("> "), false);
}
};
void render_status_secondary(void) {
oled_write_ln("", false);
oled_write_ln("", false);
render_kb_split();
oled_write_ln("", false);
oled_write_ln("", false);
oled_write_ln("", false);
render_layer();
oled_write_ln("", false);
oled_write_ln("", false);
oled_write_ln("", false);
#if defined(RGB_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLE) || defined(AUDIO_ENABLE)
layer_state_is(_ADJUST) ? render_feature_status() : render_mod_status();
#else
render_mod_status();
#endif
};
void render_status_main(void) {
oled_write_ln("", false);
oled_write_ln("", false);
render_corne_logo();
oled_write_ln("", false);
oled_write_ln("", false);
oled_write_ln("", false);
render_qmk_logo();
oled_write_ln("", false);
oled_write_ln("", false);
oled_write_ln("", false);
render_prompt();
}
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_270;
}
void oled_task_user(void) {
if (timer_elapsed(oled_timer) > 10000) {
oled_off();
return;
}
#ifndef SPLIT_KEYBOARD
else {
oled_on();
}
#endif
if (is_master) {
render_status_main();
} else {
render_status_secondary();
}
}
+79
View File
@@ -0,0 +1,79 @@
#pragma once
#ifdef RGBLIGHT_ENABLE
extern rgblight_config_t rgblight_config;
rgblight_config_t RGB_current_config;
#endif
#ifdef RGB_MATRIX_ENABLE
extern rgb_config_t rgb_matrix_config;
rgb_config_t RGB_current_config;
#endif
void save_rgb_config(void) {
#ifdef RGBLIGHT_ENABLE
RGB_current_config.enable = rgblight_config.enable;
RGB_current_config.mode = rgblight_get_mode();
RGB_current_config.speed = rgblight_get_speed();
RGB_current_config.hue = rgblight_get_hue();
RGB_current_config.sat = rgblight_get_sat();
RGB_current_config.val = rgblight_get_val();
#elif RGB_MATRIX_ENABLE
RGB_current_config.enable = rgb_matrix_config.enable;
RGB_current_config.mode = rgb_matrix_get_mode();
RGB_current_config.speed = rgb_matrix_config.speed;
RGB_current_config.hsv = rgb_matrix_config.hsv;
#endif
}
void restore_rgb_config(void) {
#ifdef RGBLIGHT_ENABLE
rgblight_set_speed_noeeprom(RGB_current_config.speed);
if (rgblight_config.mode != RGB_current_config.mode) {
rgblight_mode_noeeprom(RGB_current_config.mode);
}
if ((RGB_current_config.hue != rgblight_config.hue) || (RGB_current_config.sat != rgblight_config.sat) || (RGB_current_config.val != rgblight_config.val)) {
rgblight_sethsv_noeeprom(RGB_current_config.hue, RGB_current_config.sat, RGB_current_config.val);
}
if (rgblight_config.enable) {
rgblight_enable_noeeprom();
} else {
rgblight_disable_noeeprom();
}
#elif RGB_MATRIX_ENABLE
rgb_matrix_config.speed = RGB_current_config.speed;
if (rgb_matrix_config.mode != RGB_current_config.mode) {
rgb_matrix_mode_noeeprom(RGB_current_config.mode);
}
if ((RGB_current_config.hsv.h != rgb_matrix_config.hsv.h) || (RGB_current_config.hsv.s != rgb_matrix_config.hsv.s) || (RGB_current_config.hsv.v != rgb_matrix_config.hsv.v)) {
rgb_matrix_sethsv_noeeprom(RGB_current_config.hsv.h, RGB_current_config.hsv.s, RGB_current_config.hsv.v);
}
if (rgb_matrix_config.enable) {
rgb_matrix_enable_noeeprom();
} else {
rgb_matrix_disable_noeeprom();
}
#endif
}
void rgb_by_layer(int layer) {
#ifdef RGBLIGHT_ENABLE
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
#elif RGB_MATRIX_ENABLE
rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
#endif
switch (layer) {
case _ADJUST:
rgblight_sethsv_noeeprom(9, 255, 255);
break;
case _RAISE:
rgblight_sethsv_noeeprom(HSV_CYAN);
break;
case _LOWER:
rgblight_sethsv_noeeprom(HSV_MAGENTA);
break;
default:
rgblight_sethsv_noeeprom(HSV_RED);
}
}
+6
View File
@@ -0,0 +1,6 @@
MOUSEKEY_ENABLE = no
EXTRAKEY_ENABLE = yes
AUDIO_ENABLE = yes
RGBLIGHT_ENABLE = yes
OLED_DRIVER_ENABLE = yes
LTO_ENABLE = yes
@@ -0,0 +1,18 @@
#pragma once
#define EE_HANDS
#define SSD1306OLED
#ifdef RGBLIGHT_ENABLE
# undef RGBLED_NUM
# define RGBLIGHT_ANIMATIONS
# 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
#undef PRODUCT
#define PRODUCT MadHatter Hacked Corne Keyboard
+215
View File
@@ -0,0 +1,215 @@
#include QMK_KEYBOARD_H
#ifdef OLED_DRIVER_ENABLE
# define KEYLOGGER_LENGTH 5
static uint32_t oled_timer = 0;
static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"};
static uint16_t log_timer = 0;
// clang-format off
static const char PROGMEM code_to_name[0xFF] = {
// 0 1 2 3 4 5 6 7 8 9 A B c D E F
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x
'3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x
']','\\', '#', ';','\'', '`', ',', '.', '/', 128, ' ', ' ', ' ', ' ', ' ', ' ', // 3x
' ', ' ', ' ', ' ', ' ', ' ', 'P', 'S', ' ', ' ', ' ', ' ', 16, ' ', ' ', ' ', // 4x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx
'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx
};
void add_keylog(uint16_t keycode);
#endif
extern uint8_t is_master;
enum corny_layers {
_QWERTY,
_LOWER,
_RAISE,
_ADJUST,
};
enum custom_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE,
ADJUST,
RGBRST
};
#define LY_LWR MO(_LOWER)
#define LY_RSE MO(_RAISE)
#define KY_CESC LCTL_T(KC_ESC)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = 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,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LALT, LY_LWR, KC_LCMD, KC_SPC, LY_RSE, KC_ENT
//`--------------------------' `--------------------------'
),
[_LOWER] = LAYOUT(
//,-----------------------------------------------------. ,-----------------------------------------------------.
KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LCTL, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LALT, LY_LWR, KC_LCMD, KC_SPC, LY_RSE, KC_ENT
//`--------------------------' `--------------------------'
),
[_RAISE] = 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,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LCTL, XXXXXXX, KC_PGUP, KC_HOME, KC_END,KC_PGDN, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LALT, LY_LWR, KC_LCMD, KC_SPC, LY_RSE, KC_ENT
//`--------------------------' `--------------------------'
),
[_ADJUST] = LAYOUT(
//,-----------------------------------------------------. ,-----------------------------------------------------.
RESET, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, RGBRST, EEP_RST, AG_TOGG, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LALT, LY_LWR, KC_LCMD, KC_SPC, LY_RSE, KC_ENT
//`--------------------------' `--------------------------'
)
};
layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}
int RGB_current_mode;
// Setting ADJUST layer RGB back to default
void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
layer_on(layer3);
} else {
layer_off(layer3);
}
}
void matrix_init_user(void) {
#ifdef RGBLIGHT_ENABLE
RGB_current_mode = rgblight_get_mode();
#endif
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
#ifdef SSD1306OLED
iota_gfx_init(!has_usb()); // turns on the display
#endif
}
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
#ifdef SSD1306OLED
// When add source files to SRC in rules.mk, you can use functions.
const char *read_layer_state(void);
const char *read_logo(void);
void set_keylog(uint16_t keycode, keyrecord_t *record);
const char *read_keylog(void);
const char *read_keylogs(void);
// const char *read_mode_icon(bool swap);
// const char *read_host_led_state(void);
// void set_timelog(void);
// const char *read_timelog(void);
void matrix_scan_user(void) {
iota_gfx_task();
}
void matrix_render_user(struct CharacterMatrix *matrix) {
if (is_master) {
// If you want to change the display of OLED, you need to change here
matrix_write_ln(matrix, read_layer_state());
matrix_write_ln(matrix, read_keylog());
//matrix_write_ln(matrix, read_keylogs());
//matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui));
//matrix_write_ln(matrix, read_host_led_state());
//matrix_write_ln(matrix, read_timelog());
} else {
matrix_write(matrix, read_logo());
}
}
void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) {
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
memcpy(dest->display, source->display, sizeof(dest->display));
dest->dirty = true;
}
}
void iota_gfx_task_user(void) {
struct CharacterMatrix matrix;
matrix_clear(&matrix);
matrix_render_user(&matrix);
matrix_update(&display, &matrix);
}
#endif//SSD1306OLED
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
#ifdef SSD1306OLED
set_keylog(keycode, record);
#endif
// set_timelog();
}
switch (keycode) {
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_LOWER);
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
}
return false;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_RAISE);
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
}
return false;
case ADJUST:
if (record->event.pressed) {
layer_on(_ADJUST);
} else {
layer_off(_ADJUST);
}
return false;
}
return true;
}
@@ -0,0 +1,11 @@
BOOTLOADER = atmel-dfu # Elite-C
MOUSEKEY_ENABLE = yes
RGBLIGHT_ENABLE = yes
# If you want to change the display of OLED, you need to change here
SRC += ./lib/glcdfont.c \
./lib/rgb_state_reader.c \
./lib/layer_state_reader.c \
./lib/logo_reader.c \
./lib/keylogger.c
@@ -1,69 +1,86 @@
# iso layout with a split spacebar # ISO layout with a split spacebar
i needed to have an ISO layout I needed to have an ISO layout
and i wanted to have a split spacebar and I wanted to have a split spacebar
i couldn't find anything ready so i cobbled this together I couldn't find anything ready
so i cobbled this together
---- Layer 0 - BL ## Layer 0 - BL
this is basically the standard iso layout with the addition of the split spacebar
standard ISO layout with the addition of the split spacebar
menu key (KC_APP) is used to move to the next layer menu key (KC_APP) is used to move to the next layer
the key in between the two spacebars is the function key the key in between the two spacebars is the function key
*,-----------------------------------------------------------.
*| ' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Backsp |
*|-----------------------------------------------------------|
*| Tab | q | w | e | r | t | y | u | i | o | p | [ | ] |enter|
*|------------------------------------------------------ |
*| Caps | a | s | d | f | g | h | j | k | l | ; | ' | # | |
*|-----------------------------------------------------------|
*|Shft| < | z | x | c | v | b | n | m | , | . | / | Shift |
*|-----------------------------------------------------------|
*|Ctrl|Gui |Alt | Space | FN | Space |Alt |Gui | NL |Ctrl |
*`-----------------------------------------------------------'
---- Layer 1 - FL ```
,-----------------------------------------------------------.
| ' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Backsp |
|-----------------------------------------------------------|
| Tab | q | w | e | r | t | y | u | i | o | p | [ | ] |enter|
|------------------------------------------------------ |
| Caps | a | s | d | f | g | h | j | k | l | ; | ' | # | |
|-----------------------------------------------------------|
|Shft| < | z | x | c | v | b | n | m | , | . | / | Shift |
|-----------------------------------------------------------|
|Ctrl|Gui |Alt | Space | FN | Space |Alt |Gui | NL |Ctrl |
`-----------------------------------------------------------'
```
## Layer 1 - FL
quite standard function layer quite standard function layer
arrow keys and mouse movement/buttons on the home row arrow keys and mouse movement/buttons on the home row
*,-----------------------------------------------------------.
*|ESC|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| DEL |
*|-----------------------------------------------------------|
*| | | | | | | | | | |prt| | | |
*|------------------------------------------------------ |
*| |m l|m d|m u|m r| | | l | d | u | r | | | |
*|-----------------------------------------------------------|
*| | | | | |mb1|mb2| |hm |pgd|pgu|end| |
*|-----------------------------------------------------------|
*| | | | | | | | | | |
*`-----------------------------------------------------------'
---- Layer 2 - NL ```
,-----------------------------------------------------------.
|ESC|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| DEL |
|-----------------------------------------------------------|
| | | | | | | | | | |prt| | | |
|------------------------------------------------------ |
| |m l|m d|m u|m r| | | l | d | u | r | | | |
|-----------------------------------------------------------|
| | | | | |mb1|mb2| |hm |pgd|pgu|end| |
|-----------------------------------------------------------|
| | | | | | | | | | |
`-----------------------------------------------------------'
```
## Layer 2 - NL
numbers numbers numbers... numbers numbers numbers...
first key (top left) to return to BL first key (top left) to return to BL
menu key (KC_APP) is used to move to the next layer menu key (KC_APP) is used to move to the next layer
*,-----------------------------------------------------------.
*|BL | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | ```
*|-----------------------------------------------------------| ,-----------------------------------------------------------.
*| | 4 | 5 | 6 | * | / | | 4 | 5 | 6 | * | / | ] | | |BL | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | |
*|------------------------------------------------------ | |-----------------------------------------------------------|
*| | 7 | 8 | 9 | + | - | | 1 | 2 | 3 | + | - | | | | | 4 | 5 | 6 | * | / | | 4 | 5 | 6 | * | / | ] | |
*|-----------------------------------------------------------| |------------------------------------------------------ |
*| | | 0 | , | . | = | | | 0 | , | . | = | | | | 7 | 8 | 9 | + | - | | 1 | 2 | 3 | + | - | | |
*|-----------------------------------------------------------| |-----------------------------------------------------------|
*| | | | | | | | | RL | | | | | 0 | , | . | = | | | 0 | , | . | = | |
*`-----------------------------------------------------------' |-----------------------------------------------------------|
| | | | | | | | | RL | |
`-----------------------------------------------------------'
```
---- Layer 3 - BL ## Layer 3 - BL
all the fancy lights all the fancy lights
and useful reset button (top right) and useful reset button (top right)
*,-----------------------------------------------------------.
*|BL | | | | | | | | | | | | |Reset | ```
*|-----------------------------------------------------------| ,-----------------------------------------------------------.
*| |tog|mod|hui|hud| | |sai|sad|vai|vad| | | | |BL | | | | | | | | | | | | |Reset |
*|------------------------------------------------------ | |-----------------------------------------------------------|
*| |sta|bre|rai|swi| | |sna|kni|gra|xms| | | | | |tog|mod|hui|hud| | |sai|sad|vai|vad| | | |
*|-----------------------------------------------------------| |------------------------------------------------------ |
*| | |bd |bt |bi |bs | | | | | | | | | |sta|bre|rai|swi| | |sna|kni|gra|xms| | | |
*|-----------------------------------------------------------| |-----------------------------------------------------------|
*| | | | | | | | | BL | | | | |bd |bt |bi |bs | | | | | | | |
*`-----------------------------------------------------------' |-----------------------------------------------------------|
| | | | | | | | | BL | |
`-----------------------------------------------------------'
```
@@ -112,12 +112,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------' * `-----------------------------------------------------------'
*/ */
[NL] = LAYOUT_60_iso_split( [NL] = LAYOUT_60_iso_split(
// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 // 1 2 3 4 5 6 7 8 9 10 11 12 13 14
TG(NL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, TG(NL), KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PPLS, KC_PMNS, _______,
_______, KC_4, KC_5, KC_6, KC_PAST, KC_PSLS, _______, KC_4, KC_5, KC_6, KC_PAST, KC_PSLS, _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, _______,
_______, KC_7, KC_8, KC_9, KC_PPLS, KC_PMNS, _______, KC_1, KC_2, KC_3, KC_PPLS, KC_PMNS, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_PMNS, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PMNS, _______, _______,
_______, KC_0, KC_COMM, KC_DOT, KC_EQL, _______, _______, _______, KC_0, KC_COMM, KC_DOT, KC_EQL, _______, _______, KC_P0, KC_COMM, KC_DOT, KC_PEQL, KC_PSLS, KC_PMNS, _______, KC_P0, KC_COMM, KC_DOT, KC_PEQL, _______,
_______, _______, _______, _______, MO(FL), _______, _______, _______, TG(RL), _______), _______, _______, _______, _______, MO(FL), _______, _______, _______, TG(RL), _______),
/* Keymap RL: RGB Layer /* Keymap RL: RGB Layer
* *
@@ -150,6 +150,23 @@ void persistent_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer); default_layer_set(default_layer);
} }
// always enable num lock on layer NL and disable on other layers
// thanks to spidey3 & Erovia on discord
layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) {
case NL:
if (!host_keyboard_led_state().num_lock) {
tap_code16(KC_NLCK);
}
break;
default: // for any other layers, or the default layer
if (host_keyboard_led_state().num_lock) {
tap_code16(KC_NLCK);
}
break;
}
return state;
}
// layer-activated RGB underglow // layer-activated RGB underglow
@@ -172,11 +189,11 @@ void matrix_scan_user(void) {
break; break;
case NL: case NL:
RGB_NL_MODE; RGB_NL_MODE;
// RGB_NL_LIGHT; RGB_NL_LIGHT;
break; break;
case RL: case RL:
RGB_RL_MODE; RGB_RL_MODE;
// RGB_RL_LIGHT; RGB_RL_LIGHT;
break; break;
} }
@@ -21,19 +21,19 @@ enum layers {
} }
const layers_leds_map[] = { const layers_leds_map[] = {
[_MAIN] = 17, [_MAIN] = 0,
[_INDEX] = 16, [_INDEX] = 1,
[_FN] = 15, [_FN] = 2,
[_MULTIMEDIA] = 14, [_MULTIMEDIA] = 3,
[_EMOJI] = 13, [_EMOJI] = 4,
[_EXT1] = 12, [_EXT1] = 5,
[_EXT2] = 11, [_EXT2] = 6,
[_EXT3] = 10, [_EXT3] = 7,
[_EXT4] = 9, [_EXT4] = 8,
[_EXT5] = 18, [_EXT5] = 9,
[_EXT6] = 19, [_EXT6] = 10,
[_RGB] = 20, [_RGB] = 11,
[_CONFIG] = 21, [_CONFIG] = 12,
}; };
enum unicode_names { enum unicode_names {
@@ -234,7 +234,7 @@ void rgb_matrix_indicators_user(void) {
// CapsLock Light // CapsLock Light
if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
rgb_matrix_set_color(8, MAIN_COLOR[0], MAIN_COLOR[1], MAIN_COLOR[2]); rgb_matrix_set_color(30, MAIN_COLOR[0], MAIN_COLOR[1], MAIN_COLOR[2]);
} }
// Show Selected Layer // Show Selected Layer
+5 -5
View File
@@ -15,11 +15,11 @@ BOOTLOADER = atmel-dfu
# comment out to disable the options. # comment out to disable the options.
# #
# BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration # BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
MOUSEKEY_ENABLE ?= yes # Mouse keys MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE ?= yes # Audio control and System control EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE ?= yes # Console for debug CONSOLE_ENABLE = yes # Console for debug
COMMAND_ENABLE ?= yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE ?= yes # USB Nkey Rollover - not yet supported in LUFA NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
# Optimize size but this may cause error "relocation truncated to fit" # Optimize size but this may cause error "relocation truncated to fit"
#EXTRALDFLAGS = -Wl,--relax #EXTRALDFLAGS = -Wl,--relax
-1
View File
@@ -1 +0,0 @@
SRC += engine.c
-1
View File
@@ -1 +0,0 @@
SRC += engine.c
+10 -10
View File
@@ -14,15 +14,15 @@ BOOTLOADER = atmel-dfu
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.
# #
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE ?= no # Mouse keys MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE ?= yes # Audio control and System control EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE ?= no # Console for debug CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE ?= no # Commands for debug and configuration COMMAND_ENABLE = no # Commands for debug and configuration
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE ?= no AUDIO_ENABLE = no
RGBLIGHT_ENABLE ?= no RGBLIGHT_ENABLE = no
LAYOUTS = fullsize_ansi fullsize_iso LAYOUTS = fullsize_ansi fullsize_iso
@@ -0,0 +1,4 @@
#pragma once
#undef PRODUCT
#define PRODUCT MadHatter\x27s Custom Spacc
@@ -0,0 +1,43 @@
/* Copyright 2019 Khader Syed
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
enum keyboard_layers {
_QWERTY,
_FNM
};
#define FNM MO(_FNM)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = 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_BSLS, KC_DEL, 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_BSPC, KC_PGUP,
KC_GRV, 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_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_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, FNM, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[_FNM] = LAYOUT(
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_VOLD, KC_VOLU, KC_MFFD,
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, RESET, KC_MRWD,
KC_TRNS, RGB_M_P, RGB_M_G, RGB_M_K, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS,
AG_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRID, KC_BRIU, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END
),
};
@@ -0,0 +1,5 @@
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = no
COMMAND_ENABLE = no
SLEEP_LED_ENABLE = no
NKRO_ENABLE = yes
+12 -12
View File
@@ -14,17 +14,17 @@ BOOTLOADER = halfkay
# Build Options # Build Options
# change yes to no to disable # change yes to no to disable
# #
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE ?= yes # Console for debug(+400) CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE ?= yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend 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 # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE ?= no # USB Nkey Rollover NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
MIDI_ENABLE ?= no # MIDI controls MIDI_ENABLE = no # MIDI controls
UNICODE_ENABLE ?= no # Unicode UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE ?= no # Audio output on port C6 AUDIO_ENABLE = no # Audio output on port C6
+14 -14
View File
@@ -15,21 +15,21 @@ BOOTLOADER = caterina
# change to "no" to disable the options, or define them in the Makefile in # change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically # the appropriate keymap folder that will get included automatically
# #
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= no # Audio control and System control(+450) EXTRAKEY_ENABLE = no # Audio control and System control(+450)
CONSOLE_ENABLE ?= no # Console for debug(+400) CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE ?= yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE ?= no # MIDI controls MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE ?= no # Audio output on port C6 AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE ?= no # Unicode UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
USE_I2C ?= no USE_I2C = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
CUSTOM_MATRIX = yes CUSTOM_MATRIX = yes
SRC += matrix.c \ SRC += matrix.c \
@@ -20,7 +20,7 @@ MCU = cortex-m4
ARMV = 7 ARMV = 7
USE_FPU = yes USE_FPU = yes
# Address of the booloader in system memory # Address of the booloader in system memory
STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000 STM32_BOOTLOADER_ADDRESS = 0x1FFF0000
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
@@ -20,7 +20,7 @@ MCU = cortex-m4
ARMV = 7 ARMV = 7
USE_FPU = yes USE_FPU = yes
# Address of the booloader in system memory # Address of the booloader in system memory
STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000 STM32_BOOTLOADER_ADDRESS = 0x1FFF0000
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+5 -5
View File
@@ -75,11 +75,11 @@
{"label":">", "x":10.25, "y":3}, {"label":">", "x":10.25, "y":3},
{"label":"?", "x":11.25, "y":3}, {"label":"?", "x":11.25, "y":3},
{"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Shift", "x":12.25, "y":3, "w":1.75},
{"label":"Up", "x":14.25, "y":3.25},
{"label":"1", "x":15.5, "y":3}, {"label":"1", "x":15.5, "y":3},
{"label":"2", "x":16.5, "y":3}, {"label":"2", "x":16.5, "y":3},
{"label":"3", "x":17.5, "y":3}, {"label":"3", "x":17.5, "y":3},
{"label":"Enter", "x":18.5, "y":3}, {"label":"Enter", "x":18.5, "y":3},
{"label":"Up", "x":14.25, "y":3.25},
{"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25},
{"label":"Win", "x":1.25, "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}, {"label":"Alt", "x":2.5, "y":4, "w":1.25},
@@ -87,12 +87,12 @@
{"label":"Ctrl", "x":10, "y":4}, {"label":"Ctrl", "x":10, "y":4},
{"label":"Win", "x":11, "y":4}, {"label":"Win", "x":11, "y":4},
{"label":"Alt", "x":12, "y":4}, {"label":"Alt", "x":12, "y":4},
{"label":"0", "x":16.5, "y":4},
{"label":".", "x":17.5, "y":4},
{"label":"Enter", "x":18.5, "y":4},
{"label":"Left", "x":13.25, "y":4.25}, {"label":"Left", "x":13.25, "y":4.25},
{"label":"Down", "x":14.25, "y":4.25}, {"label":"Down", "x":14.25, "y":4.25},
{"label":"Right", "x":15.25, "y":4.25} {"label":"Right", "x":15.25, "y":4.25},
{"label":"0", "x":16.5, "y":4},
{"label":".", "x":17.5, "y":4},
{"label":"Enter", "x":18.5, "y":4}
] ]
} }
} }
+14 -14
View File
@@ -14,19 +14,19 @@ BOOTLOADER = caterina
# Build Options # Build Options
# change yes to no to disable # change yes to no to disable
# #
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE ?= yes # Console for debug(+400) CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE ?= yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend 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 # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE ?= no # USB Nkey Rollover NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config) MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE ?= no # Unicode UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE ?= no # Audio output on port C6 AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
RGBLIGHT_ENABLE ?= no RGBLIGHT_ENABLE = no
@@ -0,0 +1,41 @@
/*
This is the c configuration file for the keymap
Copyright 2012 Jun Wako <[email protected]>
Copyright 2015 Jack Humbert
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
#undef TAPPING_TERM
#define TAPPING_TERM 200
#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */
#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
// If you need more program area, try select and reduce rgblight modes to use.
// Selection of RGBLIGHT MODE to use.
#if defined(LED_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
#endif
@@ -0,0 +1,235 @@
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
// See gfxfont.h for newer custom bitmap font info.
#pragma once
#include "progmem.h"
// Standard ASCII 5x7 font
static 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,
0xFC, 0xFE, 0x02, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0xC2, 0x82, 0x02,
0x02, 0xFE, 0x00, 0x00, 0xFE, 0xFE,
0x02, 0x62, 0x62, 0x62, 0x62, 0xE2,
0x62, 0x62, 0xE2, 0x02, 0x02, 0xFC,
0x00, 0x00, 0x00, 0xF0, 0xFC, 0xFC,
0xFC, 0x00, 0xFC, 0xFC, 0xF0, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0xF0,
0x30, 0x40, 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, 0x20, 0x00, 0x00, 0x24, 0xA4,
0xA4, 0xBC, 0xA4, 0x24, 0x24, 0x00,
0x00, 0x00, 0x24, 0xA4, 0x24, 0x24,
0x3C, 0x04, 0x04, 0x00, 0x00, 0x00,
0xB8, 0xA4, 0xA4, 0xA4, 0xBC, 0x00,
0x00, 0x00, 0x00, 0xFC, 0x00, 0xFC,
0x00, 0x44, 0x44, 0x44, 0xDC, 0x44,
0x04, 0x3C, 0x00, 0x00, 0x00, 0x00,
0xFC, 0xFE, 0xFE, 0x7E, 0x7E, 0x7E,
0x7E, 0x7E, 0x7E, 0x3E, 0x7E, 0xFE,
0xFE, 0xFE, 0x00, 0x00, 0xFE, 0xFE,
0xFE, 0x9E, 0x9E, 0x9E, 0x9E, 0x1E,
0x9E, 0x9E, 0x1E, 0xFE, 0xFE, 0xFC,
0x00, 0x00, 0x00, 0x00, 0x00, 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,
0x7F, 0x7F, 0x40, 0x41, 0x41, 0x41,
0x41, 0x41, 0x41, 0x41, 0x41, 0x40,
0x40, 0x7F, 0x00, 0x00, 0x7F, 0x7F,
0x40, 0x40, 0x40, 0x40, 0x40, 0x41,
0x40, 0x40, 0x43, 0x40, 0x40, 0x7F,
0x00, 0x20, 0x3C, 0x3E, 0x3E, 0x3E,
0x3E, 0x00, 0x3E, 0x3E, 0x3E, 0x3E,
0x38, 0x00, 0x00, 0xF0, 0xFB, 0xFB,
0x00, 0x50, 0x60, 0xFF, 0xFC, 0x3C,
0x1E, 0x0E, 0x0C, 0xFC, 0xF8, 0xE8,
0xE8, 0xE8, 0x30, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x00, 0x04, 0x04, 0x1B, 0x04, 0x04,
0x00, 0x00, 0x00, 0x00, 0x57, 0x50,
0x57, 0x54, 0x57, 0x10, 0x50, 0x00,
0x00, 0x00, 0x97, 0x94, 0x97, 0x94,
0xF7, 0x00, 0x00, 0x00, 0x00, 0x00,
0xE4, 0x14, 0xF4, 0x94, 0xF7, 0x00,
0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF,
0x00, 0x38, 0xA4, 0xA4, 0xA5, 0x3C,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7F, 0x7F, 0x7F, 0x7E, 0x7E, 0x7E,
0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x7F,
0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F,
0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7E,
0x7F, 0x7F, 0x7C, 0x7F, 0x7F, 0x7F,
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,
0xFE, 0xFE, 0x02, 0x62, 0x62, 0x62,
0xE2, 0x62, 0x62, 0x62, 0xC2, 0x02,
0x02, 0xFE, 0x00, 0x00, 0xFE, 0xFE,
0x02, 0x82, 0xC2, 0xE2, 0xF2, 0x82,
0x82, 0x82, 0x82, 0x02, 0x02, 0xFE,
0x00, 0x00, 0x00, 0x3C, 0x66, 0x66,
0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
0x00, 0x00, 0x00, 0x07, 0x7F, 0xDF,
0x00, 0x05, 0x03, 0x7F, 0x1F, 0x1E,
0x3C, 0x38, 0x18, 0x1F, 0x0F, 0x0D,
0x0D, 0x0D, 0x06, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x20, 0x20, 0x50,
0x8C, 0x50, 0x20, 0x20, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x09, 0x09,
0x06, 0x09, 0x09, 0x00, 0x00, 0x00,
0x00, 0x00, 0x1C, 0x12, 0x12, 0x12,
0x1E, 0x10, 0x10, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xFF, 0x00, 0x73,
0x84, 0xE7, 0x94, 0x94, 0x94, 0x67,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFE, 0xFE, 0xFE, 0x9E, 0x9E, 0x9E,
0x1E, 0x9E, 0x9E, 0x9E, 0x3E, 0xFE,
0xFE, 0xFE, 0x00, 0x00, 0xFE, 0xFE,
0xFE, 0x7E, 0x3E, 0x1E, 0x0E, 0x7E,
0x7E, 0x7E, 0x7E, 0xFE, 0xFE, 0xFE,
0x00, 0x00, 0x00, 0x3C, 0x66, 0x66,
0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
0x00, 0x00, 0x00, 0x07, 0x7F, 0xDF,
0x00, 0x00, 0xE0, 0xF8, 0xFC, 0xFC,
0xFC, 0xFC, 0xFC, 0xFC, 0xF0, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0xF0,
0x3F, 0x7F, 0x40, 0x46, 0x46, 0x46,
0x47, 0x46, 0x46, 0x46, 0x43, 0x40,
0x40, 0x7F, 0x00, 0x00, 0x7F, 0x7F,
0x40, 0x41, 0x43, 0x47, 0x4F, 0x41,
0x41, 0x41, 0x41, 0x40, 0x40, 0x3F,
0x00, 0x00, 0x00, 0x3E, 0x73, 0x60,
0x70, 0x3E, 0x07, 0x03, 0x67, 0x3E,
0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
0x06, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x08,
0x36, 0x08, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x1F, 0x00, 0x0E,
0x10, 0x1C, 0x12, 0x12, 0x12, 0x12,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3F, 0x7F, 0x7F, 0x79, 0x79, 0x79,
0x78, 0x79, 0x79, 0x79, 0x7C, 0x7F,
0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F,
0x7F, 0x7E, 0x7C, 0x78, 0x70, 0x7E,
0x7E, 0x7E, 0x7E, 0x7F, 0x7F, 0x3F,
0x00, 0x00, 0x00, 0x03, 0x03, 0x03,
0x03, 0x3F, 0x63, 0x63, 0x63, 0x3F,
0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
0x00, 0x00, 0x07, 0x1F, 0x3F, 0x0F,
0x07, 0x0F, 0x3F, 0x3F, 0x0F, 0x00,
0x03, 0x06, 0x00, 0xF0, 0xFB, 0xFB,
};
@@ -0,0 +1,822 @@
#include QMK_KEYBOARD_H
#include "keymap_jp.h"
#include <string.h>
#ifdef SSD1306OLED
#include "ssd1306.h"
#endif
extern uint8_t is_master;
#define DELAY_TIME 75
static uint16_t key_timer;
static uint16_t tap_timer;
static uint16_t delay_registered_code;
static uint8_t delay_registered_layer;
static uint8_t delay_mat_row;
static uint8_t delay_mat_col;
static bool delay_key_stat;
static bool delay_key_pressed;
static bool tapping_key;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
enum layer_number {
_BASE = 0,
_BASE_106,
_OPT,
_OPT_106,
_SYM,
_SYM_106,
_NUM,
_NUM_106,
_FUNC,
_LAYER_NUM,
};
bool RGBAnimation = false; //Flag for LED Layer color Refresh.
typedef union {
uint32_t raw;
struct {
bool mac_mode:1;
};
} user_config_t;
user_config_t user_config;
#define IS_MODE_106() ((default_layer_state & (1UL << _BASE_106)) != 0)
#define IS_MODE_MAC() (user_config.mac_mode)
#ifndef MAX
#define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
#endif
#ifndef MIN
#define MIN(X, Y) ((X) < (Y) ? (X) : (Y))
#endif
enum custom_keycodes {
QWERTY = SAFE_RANGE,
EISU,
KANA,
RGBRST,
RGBOFF,
RGB1,
RGB2,
RGB3,
OPT_TAP_SP,
DESKTOP,
MAC,
WIN,
L_SYM,
L_NUM,
TO_106,
TO_101,
};
enum macro_keycodes {
KC_SAMPLEMACRO,
};
//Macros
#define M_SAMPLE M(KC_SAMPLEMACRO)
#if MATRIX_ROWS == 10 // HELIX_ROWS == 5
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base
* ,-----------------------------------------. ,-----------------------------------------.
* | C+z | ; | [ | ( | < | { | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | KANA | P | K | R | A | F | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | BS | D | T | H | E | O | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | Shift| Y | S | N | I | U |Space | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | Alt | Gui | Sym | Num | OPT | Ent | | | | | | | |
* `-------------------------------------------------------------------------------------------------'
*/
[_BASE] = LAYOUT( \
LCTL(KC_Z), KC_SCLN, KC_LBRC, KC_LPRN, KC_LT, KC_LCBR, _______, _______, _______, _______, _______, _______, \
KANA, KC_P, KC_K, KC_R, KC_A, KC_F, _______, _______, _______, _______, _______, _______, \
KC_BSPC, KC_D, KC_T, KC_H, KC_E, KC_O, _______, _______, _______, _______, _______, _______, \
OSM(MOD_LSFT), KC_Y, KC_S, KC_N, KC_I, KC_U, KC_SPC, _______, _______, _______, _______, _______, _______, _______, \
OSM(MOD_LCTL), OSM(MOD_LALT), OSM(MOD_LGUI), L_SYM, L_NUM, OPT_TAP_SP, KC_ENT, _______, _______, _______, _______, _______, _______, _______ \
),
[_BASE_106] = LAYOUT( \
LCTL(KC_Z), JP_SCLN, JP_LBRC, JP_LPRN, JP_LT, JP_LCBR, _______, _______, _______, _______, _______, _______, \
KANA, KC_P, KC_K, KC_R, KC_A, KC_F, _______, _______, _______, _______, _______, _______, \
KC_BSPC, KC_D, KC_T, KC_H, KC_E, KC_O, _______, _______, _______, _______, _______, _______, \
OSM(MOD_LSFT), KC_Y, KC_S, KC_N, KC_I, KC_U, KC_SPC, _______, _______, _______, _______, _______, _______, _______, \
OSM(MOD_LCTL), OSM(MOD_LALT), OSM(MOD_LGUI), L_SYM, L_NUM, OPT_TAP_SP, KC_ENT, _______, _______, _______, _______, _______, _______, _______ \
),
/* Opt
* ,-----------------------------------------. ,-----------------------------------------.
* | Esc | : | ] | ) | > | } | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | EISU| J | M | B | ' | Tab | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | . | V | C | L | Z | Q | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | | X | G | W | - | Del | Esc | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | , | DTOP | | | | | | | | | |
* `-------------------------------------------------------------------------------------------------'
*/
[_OPT] = LAYOUT( \
KC_ESC, KC_COLN,KC_RBRC, KC_RPRN,KC_GT, KC_RCBR, _______, _______, _______, _______, _______, _______, \
EISU, KC_J, KC_M, KC_B, KC_QUOT, KC_TAB, _______, _______, _______, _______, _______, _______, \
KC_DOT, KC_V, KC_C, KC_L, KC_Z, KC_Q, _______, _______, _______, _______, _______, _______, \
_______, KC_X, KC_G, KC_W, KC_MINUS, KC_DEL, KC_ESC, _______, _______, _______, _______, _______, _______, _______, \
_______, _______,_______, KC_COMM,DESKTOP, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
[_OPT_106] = LAYOUT( \
KC_ESC, JP_COLN,JP_RBRC, JP_RPRN,JP_GT, JP_RCBR, _______, _______, _______, _______, _______, _______, \
EISU, KC_J, KC_M, KC_B, JP_QUOT, KC_TAB, _______, _______, _______, _______, _______, _______, \
KC_DOT, KC_V, KC_C, KC_L, KC_Z, KC_Q, _______, _______, _______, _______, _______, _______, \
_______, KC_X, KC_G, KC_W, JP_MINS, KC_DEL, KC_ESC, _______, _______, _______, _______, _______, _______, _______, \
_______, _______,_______, KC_COMM,DESKTOP, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
/* Sym
* ,-----------------------------------------. ,-----------------------------------------.
* | Ins | GRV | | PU | PD | ^ | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | \ | # | = | ? | % | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | $ | upA | @ | ! | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | CL | <- | dwA | -> | _ | & | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | | | PS | | ~ | | | | | | | | | |
* `-------------------------------------------------------------------------------------------------'
*/
[_SYM] = LAYOUT( \
KC_INS, KC_GRV, _______, KC_PGUP, KC_PGDN, KC_CIRC, _______, _______, _______, _______, _______, _______, \
_______, KC_BSLS, KC_HASH, KC_EQL, KC_QUES, KC_PERC, _______, _______, _______, _______, _______, _______, \
_______, KC_DLR, KC_UP, KC_AT, KC_EXLM, KC_PIPE, _______, _______, _______, _______, _______, _______, \
KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_UNDS, KC_AMPR, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, KC_PSCR, _______, KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
[_SYM_106] = LAYOUT( \
KC_INS, JP_GRV, _______, KC_PGUP, KC_PGDN, JP_CIRC, _______, _______, _______, _______, _______, _______, \
_______, JP_BSLS, JP_HASH, JP_EQL, JP_QUES, JP_PERC, _______, _______, _______, _______, _______, _______, \
_______, JP_DLR, KC_UP, JP_AT, JP_EXLM, JP_PIPE, _______, _______, _______, _______, _______, _______, \
KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT,JP_UNDS, JP_AMPR, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, KC_PSCR, _______, JP_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
/* Raise
* ,-----------------------------------------. ,-----------------------------------------.
* | | | Func | home | End | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | * | 7 | 8 | 9 | - | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | . | / | 4 | 5 | 6 | + | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | LN | 0 | 1 | 2 | 3 |C+S+F1| | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | | | . | , | | | | | | | | | | |
* `-------------------------------------------------------------------------------------------------'
*/
[_NUM] = LAYOUT( \
_______, _______, OSL(_FUNC), KC_HOME, KC_END, _______, _______, _______, _______, _______, _______, _______, \
_______, KC_ASTR, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, _______, _______, _______, _______, \
KC_DOT, KC_SLSH, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, _______, _______, _______, _______, _______, \
KC_NLCK, KC_P0, KC_P1, KC_P2, KC_P3, LCTL(S(KC_F1)), _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, KC_PDOT, KC_COMM, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
[_NUM_106] = LAYOUT( \
_______, _______, OSL(_FUNC), KC_HOME, KC_END, _______, _______, _______, _______, _______, _______, _______, \
_______, JP_ASTR, KC_P7, KC_P8, KC_P9, JP_MINS, _______, _______, _______, _______, _______, _______, \
KC_DOT, JP_SLSH, KC_P4, KC_P5, KC_P6, JP_PLUS, _______, _______, _______, _______, _______, _______, \
KC_NLCK, KC_P0, KC_P1, KC_P2, KC_P3, LCTL(S(KC_F1)), _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, KC_PDOT, JP_COMM, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
/* Func
* ,-----------------------------------------. ,-----------------------------------------.
* |RGBRST| Hue |To101 | RST | Mac | Win | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | RGB1 | VAL+ | F7 | F8 | F9 |To106 | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | RGB2 | VAL- | F4 | F5 | F6 | F12 | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | RGB3 | F10 | F1 | F2 | F3 | F11 | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* |RGBOFF| | | | | | | | | | | | | |
* `-------------------------------------------------------------------------------------------------'
*/
[_FUNC] = LAYOUT( \
RGBRST,RGB_HUI, TO_101, RESET, MAC, WIN, _______, _______, _______, _______, _______, _______, \
RGB1, RGB_VAI, KC_F7, KC_F8, KC_F9, TO_106, _______, _______, _______, _______, _______, _______, \
RGB2, RGB_VAD, KC_F4, KC_F5, KC_F6, KC_F12, _______, _______, _______, _______, _______, _______, \
RGB3, KC_F10, KC_F1, KC_F2, KC_F3, KC_F11, _______, _______, _______, _______, _______, _______, _______, _______, \
RGBOFF,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
)
};
#else
#error "undefined keymaps"
#endif
void set_mac_mode(bool enable) {
if(enable){
user_config.mac_mode = true;
keymap_config.swap_lalt_lgui = false;
keymap_config.swap_ralt_rgui = false;
}else{
user_config.mac_mode = false;
keymap_config.swap_lalt_lgui = true;
keymap_config.swap_ralt_rgui = true;
}
eeconfig_update_user(user_config.raw);
}
void eeconfig_init_user(void) {
user_config.raw = 0;
eeconfig_update_user(user_config.raw);
}
void keyboard_post_init_user(void) {
user_config.raw = eeconfig_read_user();
set_mac_mode(user_config.mac_mode);
}
bool find_mairix(uint16_t keycode, uint8_t *row, uint8_t *col){
int base_keymap = IS_MODE_106() ? _BASE_106 : _BASE;
for(uint8_t i=0; i<MATRIX_ROWS; i++){
for(uint8_t j=0; j<MATRIX_COLS; j++){
if( pgm_read_word(&(keymaps[base_keymap][i][j]))==keycode){
*row = i;
*col = j;
return true;
}
}
}
return false;
}
void unregister_delay_code(void){
if(delay_registered_code){
unregister_code(delay_registered_code);
if (delay_registered_code & QK_LSFT){
unregister_code(KC_LSFT);
}
if (delay_registered_code & QK_LCTL){
unregister_code(KC_LCTL);
}
if (delay_registered_code & QK_LALT){
unregister_code(KC_LALT);
}
if (delay_registered_code & QK_LGUI){
unregister_code(KC_LGUI);
}
delay_registered_code=0;
delay_registered_layer=0;
}
}
void register_delay_code(uint8_t layer){
if(delay_key_stat){
unregister_delay_code();
uint16_t code = pgm_read_word(&(keymaps[layer][delay_mat_row][delay_mat_col]));
if (code & QK_LSFT){
register_code(KC_LSFT);
}
if (code & QK_LCTL){
register_code(KC_LCTL);
}
if (code & QK_LALT){
register_code(KC_LALT);
}
if (code & QK_LGUI){
register_code(KC_LGUI);
}
register_code(code);
delay_registered_code = code;
delay_registered_layer = layer;
delay_key_stat = false;
tapping_key = true;
}
}
#ifdef RGBLIGHT_ENABLE
struct keybuf {
char col, row;
char frame;
};
struct keybuf keybufs[256];
unsigned char keybuf_begin, keybuf_end;
int col, row;
#endif
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef RGBLIGHT_ENABLE
col = record->event.key.col;
row = record->event.key.row;
if (record->event.pressed && ((row < 5 && is_master) || (row >= 5 && !is_master))) {
int end = keybuf_end;
keybufs[end].col = col;
keybufs[end].row = row % 5;
keybufs[end].frame = 0;
keybuf_end ++;
}
#endif
if(tap_timer&&keycode!=OPT_TAP_SP){
tapping_key = true;
}
if(keycode==delay_registered_code){
if (!record->event.pressed){
unregister_delay_code();
}
}
switch (keycode) {
case KC_SCLN:
case KC_LBRC:
case KC_LPRN:
case KC_LT:
case KC_LCBR:
case KC_P:
case KC_K:
case KC_R:
case KC_A:
case KC_F:
case KC_BSPC:
case KC_D:
case KC_T:
case KC_H:
case KC_E:
case KC_O:
case KC_Y:
case KC_S:
case KC_N:
case KC_I:
case KC_U:
case LCTL(KC_Z):
case KC_SPC:
//case JP_SCLN: // == KC_SCLN
case JP_LBRC:
case JP_LPRN:
//case JP_LT: // == KC_LT
case JP_LCBR:
if (IS_MODE_106()) {
if (keycode == KC_LBRC || keycode == KC_LPRN || keycode == KC_LCBR)
break;
}else{
if (keycode == JP_LBRC || keycode == JP_LPRN || keycode == JP_LCBR)
break;
}
if (record->event.pressed) {
if (IS_MODE_106())
register_delay_code(_BASE_106);
else
register_delay_code(_BASE);
if(find_mairix(keycode, &delay_mat_row, &delay_mat_col)){
key_timer = timer_read();
delay_key_stat = true;
delay_key_pressed = true;
}
}else{
delay_key_pressed = false;
}
return false;
break;
case L_SYM:
if (record->event.pressed) {
if (IS_MODE_106()) {
register_delay_code(_SYM_106);
layer_on(_SYM_106);
}else{
register_delay_code(_SYM);
layer_on(_SYM);
}
}else{
layer_off(_SYM);
layer_off(_SYM_106);
if(delay_registered_layer == _SYM || delay_registered_layer == _SYM_106) {
unregister_delay_code();
}
}
return false;
break;
case L_NUM:
if (record->event.pressed) {
if (IS_MODE_106()) {
register_delay_code(_NUM_106);
layer_on(_NUM_106);
}else{
register_delay_code(_NUM);
layer_on(_NUM);
}
}else{
layer_off(_NUM);
layer_off(_NUM_106);
if(delay_registered_layer == _NUM || delay_registered_layer == _NUM_106) {
unregister_delay_code();
}
}
return false;
break;
case OPT_TAP_SP:
if (record->event.pressed) {
tapping_key = false;
if (IS_MODE_106()) {
register_delay_code(_OPT_106);
layer_on(_OPT_106);
}else{
register_delay_code(_OPT);
layer_on(_OPT);
}
tap_timer = timer_read();
}else{
layer_off(_OPT);
layer_off(_OPT_106);
if(tapping_key==false && timer_elapsed(tap_timer) < TAPPING_TERM){
SEND_STRING(" ");
}else if(delay_registered_layer == _OPT || delay_registered_layer == _OPT_106) {
unregister_delay_code();
}
tap_timer = 0;
}
return false;
break;
case EISU:
if (record->event.pressed) {
if(IS_MODE_MAC()){
register_code(KC_LANG2);
}else{
SEND_STRING(SS_LALT("`"));
}
} else {
unregister_code(KC_LANG2);
}
return false;
break;
case KANA:
if (record->event.pressed) {
if(IS_MODE_MAC()){
register_code(KC_LANG1);
}else{
SEND_STRING(SS_LALT("`"));
}
} else {
unregister_code(KC_LANG1);
}
return false;
break;
case DESKTOP:
if (record->event.pressed) {
if(IS_MODE_MAC()){
register_code(KC_F11);
}else{
SEND_STRING(SS_LGUI("d"));
}
} else {
unregister_code(KC_F11);
}
return false;
break;
case RGBRST:
#ifdef RGBLIGHT_ENABLE
if (record->event.pressed) {
eeconfig_update_rgblight_default();
rgblight_enable();
RGBAnimation = false;
}
#endif
break;
case RGBOFF:
#ifdef RGBLIGHT_ENABLE
if (record->event.pressed) {
rgblight_disable();
}
#endif
break;
case RGB1:
#ifdef RGBLIGHT_ENABLE
if (record->event.pressed) {
RGBAnimation = true;
rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD);
}
#endif
break;
case RGB2:
#ifdef RGBLIGHT_ENABLE
if (record->event.pressed) {
RGBAnimation = true;
rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 1);
}
#endif
break;
case RGB3:
#ifdef RGBLIGHT_ENABLE
if (record->event.pressed) {
RGBAnimation = true;
rgblight_mode(RGBLIGHT_MODE_KNIGHT);
}
#endif
break;
case MAC:
if (record->event.pressed) {
set_mac_mode(true);
}
break;
case WIN:
if (record->event.pressed) {
set_mac_mode(false);
}
break;
case TO_101:
if (record->event.pressed) {
if (IS_MODE_106()) {
set_single_persistent_default_layer(_BASE);
}
}
break;
case TO_106:
if (record->event.pressed) {
if (!IS_MODE_106()) {
set_single_persistent_default_layer(_BASE_106);
}
}
break;
}
return true;
}
//keyboard start-up code. Runs once when the firmware starts up.
void matrix_init_user(void) {
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
#ifdef SSD1306OLED
iota_gfx_init(!has_usb()); // turns on the display
#endif
}
// LED Effect
#ifdef RGBLIGHT_ENABLE
unsigned char rgb[7][5][3];
void led_ripple_effect(char r, char g, char b) {
static int scan_count = -10;
static int keys[] = { 6, 6, 6, 7, 7 };
static int keys_sum[] = { 0, 6, 12, 18, 25 };
if (scan_count == -1) {
rgblight_enable_noeeprom();
rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
} else if (scan_count >= 0 && scan_count < 5) {
for (unsigned char c=keybuf_begin; c!=keybuf_end; c++) {
int i = c;
// FIXME:
int y = scan_count;
int dist_y = abs(y - keybufs[i].row);
for (int x=0; x<keys[y]; x++) {
int dist = abs(x - keybufs[i].col) + dist_y;
if (dist <= keybufs[i].frame) {
int elevation = MAX(0, (8 + dist - keybufs[i].frame)) << 2;
if (elevation) {
if ((rgb[x][y][0] != 255) && r) { rgb[x][y][0] = MIN(255, elevation + rgb[x][y][0]); }
if ((rgb[x][y][1] != 255) && g) { rgb[x][y][1] = MIN(255, elevation + rgb[x][y][1]); }
if ((rgb[x][y][2] != 255) && b) { rgb[x][y][2] = MIN(255, elevation + rgb[x][y][2]); }
}
}
}
}
} else if (scan_count == 5) {
for (unsigned char c=keybuf_begin; c!=keybuf_end; c++) {
int i = c;
if (keybufs[i].frame < 18) {
keybufs[i].frame ++;
} else {
keybuf_begin ++;
}
}
} else if (scan_count >= 6 && scan_count <= 10) {
int y = scan_count - 6;
for (int x=0; x<keys[y]; x++) {
int at = keys_sum[y] + ((y & 1) ? x : (keys[y] - x - 1));
led[at].r = rgb[x][y][0];
led[at].g = rgb[x][y][1];
led[at].b = rgb[x][y][2];
}
rgblight_set();
} else if (scan_count == 11) {
memset(rgb, 0, sizeof(rgb));
}
scan_count++;
if (scan_count >= 12) { scan_count = 0; }
}
#endif
layer_state_t layer_state_old;
//runs every scan cycle (a lot)
void matrix_scan_user(void) {
#ifdef SSD1306OLED
iota_gfx_task(); // this is what updates the display continuously
#endif
if(delay_key_stat && (timer_elapsed(key_timer) > DELAY_TIME)){
if (IS_MODE_106())
register_delay_code(_BASE_106);
else
register_delay_code(_BASE);
if(!delay_key_pressed){
unregister_delay_code();
}
}
if(layer_state_old != layer_state){
for (int8_t i = _LAYER_NUM-1; i > _BASE_106; i--) {
if(IS_LAYER_ON(i)){
register_delay_code(i);
break;
}
}
layer_state_old = layer_state;
}
#ifdef RGBLIGHT_ENABLE
if(!RGBAnimation){
if(IS_LAYER_ON(_FUNC)){
#ifdef RGBLED_BACK
led_ripple_effect(127,23,0);
#else
rgblight_setrgb(127,23,0);
#endif
}else if(IS_LAYER_ON(_NUM)||IS_LAYER_ON(_NUM_106)){
#ifdef RGBLED_BACK
led_ripple_effect(127,0,61);
#else
rgblight_setrgb(127,0,61);
#endif
}else if(IS_LAYER_ON(_SYM)||IS_LAYER_ON(_SYM_106)){
#ifdef RGBLED_BACK
led_ripple_effect(0,127,0);
#else
rgblight_setrgb(0,127,0);
#endif
}else if(IS_LAYER_ON(_OPT)||IS_LAYER_ON(_OPT_106)){
#ifdef RGBLED_BACK
led_ripple_effect(127,0,100);
#else
rgblight_setrgb(127,0,100);
#endif
} else {
#ifdef RGBLED_BACK
led_ripple_effect(0,112,127);
#else
rgblight_setrgb(0,112,127);
#endif
}
}
#endif
}
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
#ifdef SSD1306OLED
void matrix_update(struct CharacterMatrix *dest,
const struct CharacterMatrix *source) {
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
memcpy(dest->display, source->display, sizeof(dest->display));
dest->dirty = true;
}
}
// Render to OLED
void render_status(struct CharacterMatrix *matrix) {
// froggy logo
static char logo[4][17]=
{
{0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0},
{0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,0},
{0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,0},
{0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0},
};
static char modectl[4][2][4]=
{
{
{0x65,0x66,0x67,0}, //WIN
{0x85,0x86,0x87,0}, //WIN
},
{
{0xa5,0xa6,0xa7,0}, //US(101)
{0xc5,0xc6,0xc7,0}, //US(101)
},
{
{0xbd,0xbe,0xbf,0}, //MAC
{0xdd,0xde,0xdf,0}, //MAC
},
{
{0xba,0xbb,0xbc,0}, //JP(106)
{0xda,0xdb,0xdc,0}, //JP(106)
},
};
static char indctr[8][2][4]=
{
// white icon
{
{0x60,0x61,0x62,0}, //NUM
{0x63,0x64,0} //FUNC
},
{
{0x80,0x81,0x82,0}, //NUM
{0x83,0x84,0} //FUNC
},
{
{0xa0,0xa1,0xa2,0}, //CAPS
{0xa3,0xa4,0} //SCLK
},
{
{0xc0,0xc1,0xc2,0}, //CAPS
{0xc3,0xc4,0} //SCLK
},
// Black icon
{
{0x75,0x76,0x77,0}, //NUM
{0x78,0x79,0} //FUNC
},
{
{0x95,0x96,0x97,0}, //NUM
{0x98,0x99,0} //FUNC
},
{
{0xb5,0xb6,0xb7,0}, //CAPS
{0xb8,0xb9,0} //SCLK
},
{
{0xd5,0xd6,0xd7,0}, //CAPS
{0xd8,0xd9,0} //SCLK
},
};
int rown = 0;
int rowf = 0;
int rowa = 0;
int rows = 0;
int rowm = 0;
int rowj = 1;
//Set Indicator icon
if (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) { rown = 4; }
if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) { rowa = 4; }
if (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) { rows = 4; }
if (IS_LAYER_ON(_FUNC)) { rowf = 4; }
//Set Mode icon
if (IS_MODE_MAC()) { rowm = 2; }
if (IS_MODE_106()) { rowj = 3; }
matrix_write(matrix, indctr[rown] [0]);
matrix_write(matrix, indctr[rowf] [1]);
matrix_write(matrix, modectl[rowm] [0]);
matrix_write(matrix, logo[0]);
matrix_write(matrix, indctr[rown+1][0]);
matrix_write(matrix, indctr[rowf+1][1]);
matrix_write(matrix, modectl[rowm] [1]);
matrix_write(matrix, logo[1]);
matrix_write(matrix, indctr[rowa+2][0]);
matrix_write(matrix, indctr[rows+2][1]);
matrix_write(matrix, modectl[rowj] [0]);
matrix_write(matrix, logo[2]);
matrix_write(matrix, indctr[rowa+3][0]);
matrix_write(matrix, indctr[rows+3][1]);
matrix_write(matrix, modectl[rowj] [1]);
matrix_write(matrix, logo[3]);
}
void iota_gfx_task_user(void) {
struct CharacterMatrix matrix;
#if DEBUG_TO_SCREEN
if (debug_enable) {
return;
}
#endif
matrix_clear(&matrix);
if(is_master){
render_status(&matrix);
}
matrix_update(&display, &matrix);
}
#endif
// Local Variables:
// mode: c++
// truncate-lines: t
// indent-tabs-mode: nil
// End:
@@ -0,0 +1,85 @@
Froggy -one hand Helix- with 106-key mode
======
![Imgur](https://i.imgur.com/S1Dw3XW.jpg)
## Features
It is a one-handed keyboard with reference to Frogpad. Layout Designed by タクマ ([@humid](https://twitter.com/humid)).
This keymap has 106-key mode, This is usable when keyboard setting of OS is OADG 106/109 keyboard.
## Layout
### Base
```
,-----------------------------------------.
| C+z | ; | [ | ( | < | { |
|------+------+------+------+------+------|
| KANA | P | K | R | A | F |
|------+------+------+------+------+------|
| BS | D | T | H | E | O |
|------+------+------+------+------+------+------.
| Shift| Y | S | N | I | U | Space|
|------+------+------+------+------+------+------|
| Ctrl | Alt | win | Sym | Num | OPT | Ent |
`------------------------------------------------'
```
### Opt
```
,-----------------------------------------.
| Esc | : | ] | ) | > | } |
|------+------+------+------+------+------|
| EISU | J | M | B | ' | Tab |
|------+------+------+------+------+------|
| . | V | C | L | Z | Q |
|------+------+------+------+------+------+------.
| | X | G | W | - | Del | Esc |
|------+------+------+------+------+------+------|
| | | | , | DTOP | | |
`------------------------------------------------'
```
### Num
```
,-----------------------------------------.
| | | Func | home | End | |
|------+------+------+------+------+------|
| | * | 7 | 8 | 9 | - |
|------+------+------+------+------+------|
| . | / | 4 | 5 | 6 | + |
|------+------+------+------+------+------+------.
| LN | 0 | 1 | 2 | 3 |C+S+F1| |
|------+------+------+------+------+------+------|
| | | | , | | | |
`------------------------------------------------'
```
### Sym
```
,-----------------------------------------.
| Ins | GRV | | PU | PD | ^ |
|------+------+------+------+------+------|
| | \ | # | = | ? | % |
|------+------+------+------+------+------|
| | $ | upA | @ | ! | | |
|------+------+------+------+------+------+------.
| CL | <- | dwA | -> | _ | & | |
|------+------+------+------+------+------+------|
| | | PS | | ~ | | |
`-----------------------------------------------'
```
### Func
```
,-----------------------------------------.
|RGBRST| Hue | to101| RST | Mac | Win |
|------+------+------+------+------+------|
| RGB1 | VAL+ | F7 | F8 | F9 | to106|
|------+------+------+------+------+------|
| RGB2 | VAL- | F4 | F5 | F6 | F12 |
|------+------+------+------+------+------+------.
| RGB3 | F10 | F1 | F2 | F3 | F11 | |
|------+------+------+------+------+------+------|
|RGBOFF| | | | | | |
`------------------------------------------------'
```
@@ -0,0 +1,23 @@
# QMK Standard Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
# See TOP/keyboards/helix/rules.mk for a list of options that can be set.
# See TOP/docs/config_options.md for more information.
#
LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option
# Helix Spacific Build Options
# you can uncomment and edit follows 7 Variables
# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。
HELIX_ROWS = 5 # Helix Rows is 4 or 5
OLED_ENABLE = yes # OLED_ENABLE
LOCAL_GLCDFONT = yes # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.)
LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
LED_ANIMATIONS = yes # LED animations
# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
# convert Helix-specific options (that represent combinations of standard options)
# into QMK standard options.
include $(strip $(KEYBOARD_LOCAL_FEATURES_MK))
+9 -27
View File
@@ -24,34 +24,16 @@ void matrix_init_kb(void) {
matrix_init_user(); matrix_init_user();
} }
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
void led_init_ports(void) { void led_init_ports(void) {
DDRB |= (1<<5) | (1<<6); // OUT setPinOutput(B5);
setPinOutput(B6);
} }
void led_set_kb(uint8_t usb_led) { bool led_update_kb(led_t led_state) {
if (usb_led & (1<<USB_LED_CAPS_LOCK)) bool res = led_update_user(led_state);
PORTB &= ~(1<<5); if(res) {
else writePin(B5, !led_state.caps_lock);
PORTB |= (1<<5); writePin(B6, !led_state.scroll_lock);
}
if (usb_led & (1<<USB_LED_SCROLL_LOCK)) return res;
PORTB &= ~(1<<6);
else
PORTB |= (1<<6);
led_set_user(usb_led);
} }
+1 -6
View File
@@ -14,8 +14,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/>.
*/ */
#ifndef HID_LIBER_H #pragma once
#define HID_LIBER_H
#include "quantum.h" #include "quantum.h"
@@ -69,7 +68,3 @@
/* Q */ { ___ , ___ , KQ2 , ___ , ___ , ___ , ___ , KQ7 }, \ /* Q */ { ___ , ___ , KQ2 , ___ , ___ , ___ , ___ , KQ7 }, \
/* R */ { ___ , ___ , ___ , ___ , KR4 , ___ , ___ , ___ } \ /* R */ { ___ , ___ , ___ , ___ , KR4 , ___ , ___ , ___ } \
} }
#endif
+101
View File
@@ -0,0 +1,101 @@
{
"keyboard_name": "bpiphany HIDLiberation",
"url": "",
"maintainer": "qmk",
"width": 18.25,
"height": 6.5,
"layouts": {
"LAYOUT": {
"layout": [
{"label":"KG1", "x":0, "y":0},
{"label":"KH7", "x":2, "y":0},
{"label":"KJ7", "x":3, "y":0},
{"label":"KJ6", "x":4, "y":0},
{"label":"KJ1", "x":5, "y":0},
{"label":"KO5", "x":6.5, "y":0},
{"label":"KL1", "x":7.5, "y":0},
{"label":"KA6", "x":8.5, "y":0},
{"label":"KA7", "x":9.5, "y":0},
{"label":"KD7", "x":11, "y":0},
{"label":"KD5", "x":12, "y":0},
{"label":"KD1", "x":13, "y":0},
{"label":"KD2", "x":14, "y":0},
{"label":"KB5", "x":15.25, "y":0},
{"label":"KB3", "x":16.25, "y":0},
{"label":"KO3", "x":17.25, "y":0},
{"label":"KG7", "x":0, "y":1.5},
{"label":"KG5", "x":1, "y":1.5},
{"label":"KH5", "x":2, "y":1.5},
{"label":"KJ5", "x":3, "y":1.5},
{"label":"KI5", "x":4, "y":1.5},
{"label":"KI7", "x":5, "y":1.5},
{"label":"KK7", "x":6, "y":1.5},
{"label":"KK5", "x":7, "y":1.5},
{"label":"KL5", "x":8, "y":1.5},
{"label":"KA5", "x":9, "y":1.5},
{"label":"KC5", "x":10, "y":1.5},
{"label":"KC7", "x":11, "y":1.5},
{"label":"KL7", "x":12, "y":1.5},
{"label":"KD6", "x":13, "y":1.5, "w":2},
{"label":"KQ7", "x":15.25, "y":1.5},
{"label":"KN7", "x":16.25, "y":1.5},
{"label":"KM7", "x":17.25, "y":1.5},
{"label":"KG6", "x":0, "y":2.5, "w":1.5},
{"label":"KG3", "x":1.5, "y":2.5},
{"label":"KH3", "x":2.5, "y":2.5},
{"label":"KJ3", "x":3.5, "y":2.5},
{"label":"KI3", "x":4.5, "y":2.5},
{"label":"KI6", "x":5.5, "y":2.5},
{"label":"KK6", "x":6.5, "y":2.5},
{"label":"KK3", "x":7.5, "y":2.5},
{"label":"KL3", "x":8.5, "y":2.5},
{"label":"KA3", "x":9.5, "y":2.5},
{"label":"KC3", "x":10.5, "y":2.5},
{"label":"KC6", "x":11.5, "y":2.5},
{"label":"KL6", "x":12.5, "y":2.5},
{"label":"KD4", "x":13.5, "y":2.5, "w":1.5},
{"label":"KP7", "x":15.25, "y":2.5},
{"label":"KN5", "x":16.25, "y":2.5},
{"label":"KM5", "x":17.25, "y":2.5},
{"label":"KH6", "x":0, "y":3.5, "w":1.75},
{"label":"KG4", "x":1.75, "y":3.5},
{"label":"KH4", "x":2.75, "y":3.5},
{"label":"KJ4", "x":3.75, "y":3.5},
{"label":"KI4", "x":4.75, "y":3.5},
{"label":"KI1", "x":5.75, "y":3.5},
{"label":"KK1", "x":6.75, "y":3.5},
{"label":"KK4", "x":7.75, "y":3.5},
{"label":"KL4", "x":8.75, "y":3.5},
{"label":"KA4", "x":9.75, "y":3.5},
{"label":"KC4", "x":10.75, "y":3.5},
{"label":"KC1", "x":11.75, "y":3.5},
{"label":"KD0", "x":12.75, "y":3.5, "w":2.25},
{"label":"KF6", "x":0, "y":4.5, "w":1.25},
{"label":"KH1", "x":1.25, "y":4.5},
{"label":"KG0", "x":2.25, "y":4.5},
{"label":"KH0", "x":3.25, "y":4.5},
{"label":"KJ0", "x":4.25, "y":4.5},
{"label":"KI0", "x":5.25, "y":4.5},
{"label":"KI2", "x":6.25, "y":4.5},
{"label":"KK2", "x":7.25, "y":4.5},
{"label":"KK0", "x":8.25, "y":4.5},
{"label":"KL0", "x":9.25, "y":4.5},
{"label":"KA0", "x":10.25, "y":4.5},
{"label":"KC2", "x":11.25, "y":4.5},
{"label":"KF4", "x":12.25, "y":4.5, "w":2.75},
{"label":"KN1", "x":16.25, "y":4.5},
{"label":"KO7", "x":0, "y":5.5, "w":1.25},
{"label":"KE6", "x":1.25, "y":5.5, "w":1.25},
{"label":"KB1", "x":2.5, "y":5.5, "w":1.25},
{"label":"KP1", "x":3.75, "y":5.5, "w":6.25},
{"label":"KB2", "x":10, "y":5.5, "w":1.25},
{"label":"KR4", "x":11.25, "y":5.5, "w":1.25},
{"label":"KA2", "x":12.5, "y":5.5, "w":1.25},
{"label":"KO0", "x":13.75, "y":5.5, "w":1.25},
{"label":"KN2", "x":15.25, "y":5.5},
{"label":"KP2", "x":16.25, "y":5.5},
{"label":"KQ2", "x":17.25, "y":5.5}
]
}
}
}
@@ -1 +0,0 @@
#pragma once
+21 -40
View File
@@ -16,45 +16,26 @@
*/ */
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below. enum layer_names {
// The underscores don't mean anything - you can have a layer called STUFF or any other name. _BL, // Base Layer
// Layer names don't all need to be of the same length, obviously, and you can also skip them _FL, // Media Layer
// entirely and just use numbers.
#define _BL 0 // Base Layer
#define _FL 1 // Media Layer
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BL] = LAYOUT( \
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_BRK, \
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_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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
),
[_FL] = LAYOUT( \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MSTP, KC_VOLU, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_MPLY, KC_MNXT, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
}; };
void matrix_init_user(void) { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BL] = LAYOUT(
} KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_BRK,
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,
void matrix_scan_user(void) { 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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
bool process_record_user(uint16_t keycode, keyrecord_t *record) { ),
return true; [_FL] = LAYOUT(
} _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MSTP, KC_VOLU,
void led_set_user(uint8_t usb_led) { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_MPLY, KC_MNXT,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
} _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};
@@ -1,4 +1,4 @@
# ANSI Keymap for the HID Liberation Device # The default keymap for the HID Liberation Device
A basic keymap intended for the HID Liberation Device using the standard ANSI layout. A basic keymap intended for the HID Liberation Device using the standard ANSI layout.
@@ -19,9 +19,9 @@ This keymap has two layers. To access the functions on the second layer, hold do
|-----------------------------------------------------------| '-----------' |-----------------------------------------------------------| '-----------'
|Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return |
|-----------------------------------------------------------| ,---. |-----------------------------------------------------------| ,---.
|Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | |Up | |Sft |ISO| Z| X| C| V| B| N| M| ,| .| /|Shift | |Up |
|-----------------------------------------------------------| ,-----------. |-----------------------------------------------------------| ,-----------.
|Ctl|Gui|Alt| Space |Alt|Gui|Fn |Ctl| |Lef|Dow|Rig| |Ctl |Gui |Alt | Space |Alt |Gui |Fn |Ctl | |Lef|Dow|Rig|
`-----------------------------------------------------------' `-----------' `-----------------------------------------------------------' `-----------'
### Layer 2: Media Layer ### Layer 2: Media Layer
@@ -35,7 +35,7 @@ This keymap has two layers. To access the functions on the second layer, hold do
|-----------------------------------------------------------| '-----------' |-----------------------------------------------------------| '-----------'
| | | | | | | | | | | | | | | | | | | | | | | | | | | |
|-----------------------------------------------------------| ,---. |-----------------------------------------------------------| ,---.
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|-----------------------------------------------------------| ,-----------. |-----------------------------------------------------------| ,-----------.
| | | | | | | | | | | | | | | | | | | | | | | | | |
`-----------------------------------------------------------' `-----------' `-----------------------------------------------------------' `-----------'
@@ -1 +0,0 @@
CONSOLE_ENABLE = yes
+8 -6
View File
@@ -1,15 +1,17 @@
HID Liberation Device # HID Liberation Device
=====================
DIY daughterboard for Filco Majestouch TKL developed by Geekhack and Deskthority communities. DIY daughterboard for Filco Majestouch TKL developed by Geekhack and Deskthority communities. The PCB was engineered by bpiphany.
The PCB was engineered by bpiphany.
## Wiki on Deskthority.net ## Wiki on Deskthority.net
- [Instructions](http://deskthority.net/wiki/HID_Liberation_Device_-_Instructions) - [Instructions](http://deskthority.net/wiki/HID_Liberation_Device_-_Instructions)
- [Assembly Instructions](http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions) - [Assembly Instructions](http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions)
## Build * Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
* Hardware Supported: HID Liberation Device (ATmega32U4)
* Hardware Availability: Discontinued
Make example for this keyboard (after setting up your build environment): Make example for this keyboard (after setting up your build environment):
make hid_liber:default make hid_liber:default
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+1 -1
View File
@@ -17,7 +17,7 @@ BOOTLOADER = atmel-dfu
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug CONSOLE_ENABLE = yes # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
CUSTOM_MATRIX = yes # Custom matrix file CUSTOM_MATRIX = yes # Custom matrix file
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+3 -3
View File
@@ -3,12 +3,12 @@
#include "config_common.h" #include "config_common.h"
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0x414B // 'AK' Alpaca Keyboards
#define PRODUCT_ID 0xE11D #define PRODUCT_ID 0x0001 // sequentially numbered
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER Z.P.Z.O. #define MANUFACTURER Z.P.Z.O.
#define PRODUCT HotDox #define PRODUCT Alpaca Keyboards HotDox
#define DESCRIPTION QMK keyboard firmware for HotDox #define DESCRIPTION QMK keyboard firmware for HotDox
/* key matrix size */ /* key matrix size */
+4
View File
@@ -0,0 +1,4 @@
#pragma once
// place overrides here
#define DYNAMIC_KEYMAP_LAYER_COUNT 3
Loaded 100 of 435 files, more files were not shown because too many files have changed in this diff. Show more